lighthouse-mcp
Provides tools for running Lighthouse web performance audits, including Core Web Vitals (LCP, CLS, INP), performance scores, and optimization opportunities.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lighthouse-mcp Audit https://example.com performance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Lighthouse MCP Server
通过 MCP 协议在 Claude 中直接运行 Lighthouse 网页性能审计,获取 Core Web Vitals、性能评分和优化建议。
功能
提供两个 MCP 工具:
audit_url — 单页审计
对一个 URL 运行 Lighthouse,返回:
Core Web Vitals: LCP、CLS、INP
其他性能指标: FCP、TTFB、Speed Index、TBT
分类评分: Performance / Accessibility / SEO / Best Practices (0-100)
优化建议: 按预计可节省时间排序的改进机会
audit_batch — 批量审计
对多个 URL(最多 10 个)并行运行 Lighthouse,返回每个页面的核心指标,适合跨页面对比。
Related MCP server: LightScout MCP
前置条件
Node.js >= 18
Google Chrome — Lighthouse 依赖 Chrome 运行,
chrome-launcher会自动查找。macOS 上安装 Chrome 即可。
安装
git clone <repo-url>/lighthouse-mcp.git
cd lighthouse-mcp
npm install
npm run build在 Claude Code 中使用
在 ~/.claude/claude_desktop_config.json(或对应配置文件)中添加:
{
"mcpServers": {
"lighthouse": {
"command": "node",
"args": ["/path/to/lighthouse-mcp/build/index.js"]
}
}
}配置后重启 Claude Code,即可使用:
帮我审计一下 https://example.com 的性能
对比这三个页面的性能: https://a.com https://b.com https://c.com
用桌面模式审计 https://example.com输出示例
{
"url": "https://example.com",
"device": "mobile",
"scores": { "performance": 85 },
"coreWebVitals": {
"lcp_ms": 2500,
"cls": 0.1,
"inp_ms": 150
},
"otherMetrics": {
"fcp_ms": 1800,
"ttfb_ms": 200,
"speedIndex_ms": 3000,
"tbt_ms": 200
},
"opportunities": [
{ "title": "Reduce unused JavaScript", "potentialSavingsMs": 500 }
]
}技术栈
@modelcontextprotocol/sdk— MCP 协议实现lighthouse— Google Chrome 网页审计工具chrome-launcher— 无头 Chrome 启动TypeScript + ESM
License
MIT
Available Tools
2 toolsaudit_batchA
Run Lighthouse performance audits on multiple URLs in parallel. Returns a summary comparing Core Web Vitals across all URLs, plus detailed metrics for each.
Inputs: urls (required), device.
audit_urlA
Run a Lighthouse performance audit on a URL. Returns Core Web Vitals (LCP, CLS, INP), other performance metrics (FCP, TTFB, Speed Index, TBT), category scores (0-100), and a prioritized list of improvement opportunities with estimated savings.
Inputs: url (required), device, categories.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are clearly distinct: audit_url handles a single URL while audit_batch handles multiple URLs. There is no overlap or ambiguity in their purposes.
Both tools use the consistent verb_noun pattern (audit_url, audit_batch), making the naming predictable and easy to follow.
With only 2 tools, the server feels thin for a full-featured Lighthouse server, though the tools cover the core audit functionality. It is below the typical 3-15 range.
The tools cover both single and batch audits, returning comprehensive metrics and opportunities. Minor gaps include lack of custom configuration options (e.g., device, categories) or historical comparison, but these are not critical.
Maintenance
Related MCP Connectors
Core Web Vitals and Lighthouse, as one MCP tool through Apify
SEO site audit MCP: up to 5 supplied URLs for on-page issues, plus Lighthouse page-speed scores.
SEO site audit MCP: up to 5 supplied URLs for on-page issues, plus Lighthouse page-speed scores. On-page and technical SEO checks for up to 5 pages (status code, on-page score, title, meta description, H1, canonical, word count, links, load time and every failed check), plus Lighthouse scores and Core Web Vitals for a page. Use before publishing or after a migration to check up to 5 supplied URLs per audit, or inspect a page's speed. This is a focused SEO Data subset, not an automatic whole-site crawler. Distinguish Lighthouse lab checks from field measurements. Billing: paid data calls use API credits; get_api_credit_balance is free. The focused connections and SEO Data use the same balance and prices. Example prompts: - Audit the owned page I provide for title, headings and canonical issues after I approve the API-credit spend. - Within my approved API-credit budget, compare failed technical checks for up to five supplied pages. - After confirming the API-credit cost, report Lighthouse scores and available Core Web Vitals for my page, distinguishing lab checks from field data. Docs: https://docs.crakseo.com/mcp-servers/site-audit
Free MCP server that audits any public URL: technical SEO, Core Web Vitals, indexing checks.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server that enables AI agents to perform comprehensive web audits using Google Lighthouse with 13+ tools for performance, accessibility, SEO, and security analysis.111,975 npm75MIT
- AlicenseAqualityDmaintenanceCore Web Vitals analysis powered by Lighthouse. Four tools: analyze a URL, compare two URLs, check against thresholds, or crawl an entire site. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible AI tool.464 npmMIT
- AlicenseAqualityDmaintenanceEnables MCP-compatible agents to run real browser-based performance scans on any URL and receive a rich Markdown dashboard with Core Web Vitals, grades, and actionable recommendations.1MIT
- AlicenseAqualityBmaintenanceEnables running comprehensive website audits from any MCP client, returning actionable plain-language reports covering SEO, accessibility, performance, security, and more.685 npmMIT