A server that analyzes website performance using Playwright and Lighthouse, allowing LLMs to perform web performance analysis through the Model Context Protocol.
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.
# 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
npm run inspector
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.
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" ] } } }
Runs a Lighthouse performance analysis on the currently open page.
Parameters:
url
: The URL of the website you want to analyzecategories
: Array of categories to analyze (default: ["performance"])
maxItems
: Maximum number of improvement items to display for each category (default: 3, max: 5)Takes a screenshot of the currently open page.
Parameters:
url
: The URL of the website you want to capturefullPage
: If true, captures a screenshot of the entire page (default: false)The analysis results include:
MIT License - see LICENSE for details
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!