
Lighthouse MCP
Lighthouse MCP
README
Lighthouse MCP Server
A Model Context Protocol (MCP) server that provides comprehensive web performance auditing and analysis capabilities using Google Lighthouse. This server enables LLMs and AI agents to perform detailed website performance assessments, accessibility audits, SEO analysis, security checks, and Core Web Vitals monitoring.
🌟 Key Features
- 🚀 Performance Analysis: Complete Lighthouse audits with Core Web Vitals, performance scores, and optimization recommendations
- ♿ Accessibility Audits: WCAG compliance checking and accessibility score analysis
- 🔍 SEO Analysis: Search engine optimization audits and best practice recommendations
- 🔒 Security Assessment: HTTPS, CSP, and security vulnerability scanning
- 📊 Resource Analysis: JavaScript, CSS, image, and font optimization opportunities
- 📱 Mobile vs Desktop: Comparative analysis across devices with throttling options
- ⚡ Core Web Vitals: LCP, FID, CLS monitoring with threshold checking
- 🎯 Performance Budgets: Custom performance thresholds and budget monitoring
🛠️ Requirements
- Node.js 22.0.0 or newer
- Chrome/Chromium browser (automatically managed by Lighthouse)
- VS Code, Cursor, Windsurf, Claude Desktop, or any other MCP client
🚀 Getting Started
Install the Lighthouse MCP server with your preferred client using one of the configurations below:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}
Install in VS Code
<details> <summary><b>Manual VS Code Installation</b></summary>
You can also install the Lighthouse MCP server using the VS Code CLI:
# For VS Code
code --add-mcp '{"name":"lighthouse","command":"npx","args":["-y","@danielsogl/lighthouse-mcp@latest"]}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"lighthouse","command":"npx","args":["-y","@danielsogl/lighthouse-mcp@latest"]}'
After installation, the Lighthouse MCP server will be available for use with your GitHub Copilot agent in VS Code.
</details>
Install in Cursor
<details> <summary><b>Manual Cursor Installation</b></summary>
Go to Cursor Settings
→ MCP
→ Add new MCP Server
. Name it "lighthouse", use command
type with the command npx @danielsogl/lighthouse-mcp@latest
:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}
</details>
Install in Windsurf
<details> <summary><b>Manual Windsurf Installation</b></summary>
Follow the Windsurf MCP documentation. Use the following configuration:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}
</details>
Install in Claude Desktop
<details> <summary><b>Claude Desktop Installation</b></summary>
Follow the MCP install guide, use the following configuration:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}
</details>
🔧 Available Tools
The Lighthouse MCP server provides the following tools for comprehensive web analysis:
🏁 Audit Tools
Tool | Description | Parameters |
---|---|---|
run_audit |
Run a comprehensive Lighthouse audit | url , categories? , device? , throttling? |
get_accessibility_score |
Get accessibility score and recommendations | url , device? , includeDetails? |
get_seo_analysis |
Get SEO analysis and recommendations | url , device? , includeDetails? |
check_pwa_readiness |
Check Progressive Web App readiness | url , device? , includeDetails? |
⚡ Performance Tools
Tool | Description | Parameters |
---|---|---|
get_performance_score |
Get overall performance score | url , device? |
get_core_web_vitals |
Get Core Web Vitals metrics | url , device? , includeDetails? , threshold? |
compare_mobile_desktop |
Compare performance across devices | url , categories? , throttling? , includeDetails? |
check_performance_budget |
Check against performance budgets | url , device? , budget |
get_lcp_opportunities |
Find LCP optimization opportunities | url , device? , includeDetails? , threshold? |
🔍 Analysis Tools
Tool | Description | Parameters |
---|---|---|
find_unused_javascript |
Find unused JavaScript code | url , device? , minBytes? , includeSourceMaps? |
analyze_resources |
Analyze all website resources | url , device? , resourceTypes? , minSize? |
🔒 Security Tools
Tool | Description | Parameters |
---|---|---|
get_security_audit |
Perform comprehensive security audit | url , device? , checks? |
📋 Parameter Details
Common Parameters
url
(required): The website URL to analyzedevice
: Target device ("desktop"
or"mobile"
, default:"desktop"
)includeDetails
: Include detailed audit information (default:false
)throttling
: Enable network/CPU throttling (default:false
)
Specific Parameters
categories
: Lighthouse categories to audit (["performance", "accessibility", "best-practices", "seo", "pwa"]
)threshold
: Custom thresholds for metrics (e.g.,{"lcp": 2.5, "fid": 100, "cls": 0.1}
)budget
: Performance budget limits (e.g.,{"performanceScore": 90, "largestContentfulPaint": 2500}
)resourceTypes
: Resource types to analyze (["images", "javascript", "css", "fonts", "other"]
)minBytes
: Minimum file size threshold for analysis (default:2048
)checks
: Security checks to perform (["https", "mixed-content", "csp", "hsts", "vulnerabilities"]
)
💡 Usage Examples
Basic Performance Audit
// Get overall performance score
{
"tool": "get_performance_score",
"arguments": {
"url": "https://example.com",
"device": "mobile"
}
}
Core Web Vitals Analysis
// Check Core Web Vitals with custom thresholds
{
"tool": "get_core_web_vitals",
"arguments": {
"url": "https://example.com",
"device": "mobile",
"includeDetails": true,
"threshold": {
"lcp": 2.5,
"fid": 100,
"cls": 0.1
}
}
}
Security Assessment
// Comprehensive security audit
{
"tool": "get_security_audit",
"arguments": {
"url": "https://example.com",
"checks": ["https", "csp", "hsts"]
}
}
Resource Optimization
// Find optimization opportunities
{
"tool": "analyze_resources",
"arguments": {
"url": "https://example.com",
"resourceTypes": ["images", "javascript"],
"minSize": 1024
}
}
🎯 Use Cases
- Performance Monitoring: Automated performance tracking and Core Web Vitals monitoring
- Accessibility Compliance: WCAG 2.1 compliance checking and remediation guidance
- SEO Optimization: Technical SEO audits and search engine optimization recommendations
- Security Assessment: Vulnerability scanning and security best practice validation
- Resource Optimization: Bundle analysis and optimization opportunity identification
- Performance Budgets: Automated performance budget monitoring and alerting
- CI/CD Integration: Automated quality gates and performance regression detection
🏗️ Architecture
The server is built using:
- Model Context Protocol SDK: For MCP server implementation
- Google Lighthouse: For web performance auditing
- Chrome Launcher: For browser automation
- TypeScript: For type safety and better developer experience
- Zod: For runtime schema validation
🤝 Contributing
Contributions are welcome! Please read our Contributing Guide for details on:
- Code style and standards
- Testing requirements
- Pull request process
- Development setup
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔒 Security
For security issues, please see our Security Policy.
📞 Support
- 🐛 Bug Reports: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📧 Email: security@codingrules.ai
🙏 Acknowledgments
- Google Lighthouse team for the excellent auditing engine
- Anthropic for the Model Context Protocol specification
- The open source community for continuous inspiration and contributions
Built with ❤️ by Daniel Sogl
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。