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
{
"mcpServers": {
"playwright-lighthouse": {
"env": {},
"args": [
"/path-to/playwright-lighthouse-mcp/build/index.js"
],
"command": "node"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.