Playwright-Lighthouse MCP Server

Playwright-Lighthouse MCP Server

By kbyk004 GitHub

A MCP server that analyzes web site performance using Playwright and Lighthouse.

playwright lighthouse
Overview

What is Playwright-Lighthouse MCP Server?

Playwright-Lighthouse MCP Server is a server that analyzes website performance using Playwright and Lighthouse through the Model Context Protocol (MCP).

How to use Playwright-Lighthouse MCP Server?

To use the server, clone the repository, install the dependencies, and run the server with the appropriate configuration for MCP clients.

Key features of Playwright-Lighthouse MCP Server?

  • Performance analysis using Lighthouse
  • Screenshot capture of web pages
  • Integration with MCP clients like Claude for Desktop

Use cases of Playwright-Lighthouse MCP Server?

  1. Analyzing the performance of web applications.
  2. Capturing screenshots for visual regression testing.
  3. Integrating with other tools that support the Model Context Protocol.

FAQ from Playwright-Lighthouse MCP Server?

  • What are the prerequisites for using this server?

You need Node.js 18 or higher and npm installed.

  • Can I integrate this server with other applications?

Yes! It can be integrated with any client that supports the Model Context Protocol (MCP).

  • What kind of analysis does it perform?

It performs performance analysis and can capture screenshots of web pages.

Content

Playwright-Lighthouse MCP Server

A MCP server that analyzes web site performance using Playwright and Lighthouse. Through the Model Context Protocol (MCP), LLMs can perform web site performance analysis.

Features

  • Performance analysis with Lighthouse
  • Screenshot capture

Setup

Prerequisites

  • Node.js 18 or higher
  • npm

Installation

# Clone the repository
git clone https://github.com/kbyk004/playwright-lighthouse-mcp.git
cd playwright-lighthouse-mcp

# Install dependencies
npm install
npx playwright install

# Build
npm run build

Usage

Debugging MCP Server

npm run inspector

Integration with MCP Clients

This server is designed to be used with clients that support the Model Context Protocol (MCP). For example, it can be integrated with Claude for Desktop.

Configuration Example for Claude for Desktop

Add the following to the Claude for Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "playwright-lighthouse": {
      "command": "node",
      "args": [
        "/path-to/playwright-lighthouse-mcp/build/index.js"
      ]
    }
  }
}

Available Tools

1. run-lighthouse

Runs a Lighthouse performance analysis on the currently open page.

Parameters:

  • url: The URL of the website you want to analyze
  • categories: Array of categories to analyze (default: ["performance"])
    • Available categories: "performance", "accessibility", "best-practices", "seo", "pwa"
  • maxItems: Maximum number of improvement items to display for each category (default: 3, max: 5)

2. take-screenshot

Takes a screenshot of the currently open page.

Parameters:

  • url: The URL of the website you want to capture
  • fullPage: If true, captures a screenshot of the entire page (default: false)

Output Format

The analysis results include:

  • Overall scores for each selected category with color indicators
  • Key improvement areas grouped by category
  • Path to the saved report file

License

MIT License - see LICENSE for details

No tools information available.
Playwright
Playwright by microsoft

-

playwright browser-automation
View Details

mcp server demo project

playwright demo
View Details
playwright-mcp
playwright-mcp by playwright-mcp

This MCP Server will help you run browser automation and webscraping using Playwright

playwright browser-automation mcp playwright
View Details

A universal Playwright MCP server for browser automation in containerized environments

playwright browser-automation
View Details
Playwright
Playwright by 9olidity

-

playwright browser-automation
View Details