home / mcp / lighthouse mcp server
Allows AI assistants such as Amp/Cline/Cursor/Claude Code/Codex/GitHub Copilot to use Google's lighthouse tool to measure perf metrics for your webpage. You can then run an agentic loop and get the assistants to optimize those metrics!
Configuration
View docs{
"mcpServers": {
"priyankark-lighthouse-mcp": {
"command": "node",
"args": [
"/absolute/path/to/lighthouse-mcp/build/index.js"
]
}
}
}You can run Lighthouse audits through an MCP server that wraps the Lighthouse tool, giving you easy access to performance scores and metrics for any URL. It supports device emulation, network throttling, and selective audit categories, all accessible via your MCP client.
To use this MCP server, configure it in your MCP client and then call the available tools to audit a URL or retrieve a performance score. You can audit a full page with multiple categories or target a single metric. Use the audit tools to compare pages, test mobile versus desktop experiences, and adjust network throttling to simulate real user conditions. The two primary tools are run_audit for comprehensive audits and get_performance_score for a quick performance snapshot.
Prerequisites you need before installing include Node.js 16+ and a Chrome/Chromium browser for Lighthouse to run.
Option 1: From MCP Registry (recommended) Install it using your MCP client or Claude Desktop.
Option 2: Using npx Run the tool directly without installation.
Option 3: Global Installation Install the package globally from npm and then run it.
Option 4: Local Development Follow these steps to clone, build, and run the server locally.
The MCP configuration is shown in two common scenarios when you run the server locally or via npm/npx. Use the appropriate snippet for your setup.
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["lighthouse-mcp"],
"disabled": false,
"autoApprove": []
}
}
}{
"mcpServers": {
"lighthouse": {
"command": "node",
"args": ["/absolute/path/to/lighthouse-mcp/build/index.js"],
"disabled": false,
"autoApprove": []
}
}
}Run a comprehensive Lighthouse audit on a URL with optional categories, device, and throttling settings.
Retrieve only the performance score for a given URL and device setting.