playwright-lighthouse-mcp
A MCP server that analyzes web site performance using Playwright and Lighthouse.
Documentation
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 buildUsage
Debugging MCP Server
npm run inspectorIntegration 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
Frequently asked questions
What is playwright-lighthouse-mcp?
playwright-lighthouse-mcp is A MCP server that analyzes web site performance using Playwright and Lighthouse.
How do I install playwright-lighthouse-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is playwright-lighthouse-mcp open source?
Yes — it is hosted on GitHub at https://github.com/kbyk004/playwright-lighthouse-mcp and has 5 stars.
Related MCP tools
Playwright Model Context Protocol Server - Tool to automate Browsers and APIs in Claude Desktop, Cline, Cursor IDE and More 🔌
MCP server for fetch web page content using Playwright headless browser. TypeScript-based implementation. Trusted by 800+ developers.
A Playwright-based Node.js tool that bypasses search engine anti-scraping mechanisms to execute Google searches. Built for the Model Context Protocol to...
This MCP server provides browser automation capabilities through Puppeteer, allowing interaction with both new browser instances and existing Chrome windows.
🍒 Cherry Studio is a desktop client that supports for multiple LLM providers. Built for the Model Context Protocol to enhance AI capabilities.
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini...
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP