Lighthouse MCP
The Lighthouse MCP Server provides comprehensive web performance auditing and analysis using Google Lighthouse, enabling detailed website assessments across multiple dimensions:
Performance Analysis: Run full Lighthouse audits, monitor Core Web Vitals, and evaluate performance scores
Accessibility Audits: Check WCAG compliance and get improvement recommendations
SEO Analysis: Conduct technical audits and receive optimization guidelines
Security Assessments: Perform scans for HTTPS, CSP, and vulnerabilities
Resource Optimization: Analyze JavaScript, CSS, images, and fonts
Device Comparison: Compare performance across mobile and desktop devices
Performance Budgets: Monitor and enforce custom performance thresholds
PWA Readiness: Assess Progressive Web App compliance
Unused Code Detection: Identify and reduce unused JavaScript
Reference Resources: Access guidelines, best practices, and framework guides
Integrated Analysis: Use prompts to analyze results, compare audits, and create optimization plans
Provides integration with Codecov for tracking code coverage metrics of the server codebase itself.
Integrates with GitHub for CI/CD workflows, enabling automated quality gates and performance regression detection through GitHub Actions.
Provides comprehensive web performance auditing and analysis capabilities using Google Lighthouse, enabling detailed website performance assessments, accessibility audits, SEO analysis, security checks, and Core Web Vitals monitoring.
Offers tools to check Progressive Web App readiness and provides PWA-specific analysis to evaluate whether a website meets PWA standards and requirements.
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 performance for https://example.com"
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
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, INP, CLS monitoring with threshold checking
🎯 Performance Budgets: Custom performance thresholds and budget monitoring
🤖 Agentic Browsing: Lighthouse 13 audits for how well a page serves AI agents (WebMCP tools, agent accessibility tree, llms.txt)
🧩 Structured Output: Every tool declares an
outputSchemaand returns validatedstructuredContent, so clients get typed data instead of a JSON string to parse📚 Reference Resources: Built-in guidelines and best practices for web performance, accessibility, SEO, and security
Related MCP server: mcp-seo
🛠️ 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"]
}
}
}Persistent Chrome Profiles (Login Sessions)
If you need authenticated sessions, launch with a persistent Chrome profile and run headed:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": [
"@danielsogl/lighthouse-mcp@latest",
"--profile-path",
"<profile-path>",
"--no-headless"
]
}
}
}You can pass extra Chrome flags with --chrome-flag, for example --chrome-flag=--disable-gpu.
If the flag value starts with -- and matches a known option name, prefer --chrome-flag=... to avoid parsing it as a top-level option.
Profile mode disables Lighthouse's storage reset so cookies and local storage persist between runs.
If --user-data-dir points to a missing directory, it will be created and treated as a fresh profile.
Set --profile-path to the Profile Path shown in chrome://version (e.g. .../Default).
Note: Chrome's remote debugging requires a non-default user data directory, so reuse a dedicated profile directory instead of the system default.
You can also pass --user-data-dir + --profile-directory separately if you prefer.
Attaching with --chrome-port alone does not preserve storage; include a profile flag to keep sessions.
CLI Options
Supported runtime flags for the MCP server:
--profile-path <path>: use the Profile Path fromchrome://version(auto-derives user data dir + profile name)--user-data-dir <path>: reuse a Chrome profile directory for persistent sessions--profile-directory <name>: select a profile within the user data dir--chrome-path <path>: explicit path to the Chrome/Chromium executable (overrides auto-detection; also respects theCHROME_PATHenvironment variable)--chrome-flag <flag>or--chrome-flag=<flag>: pass through extra Chrome flags (repeatable)--chrome-port <port>or--remote-debugging-port <port>: attach to an existing Chrome instance launched with remote debugging enabled--headless: force headless mode--no-headless: force headed mode
Logging
Lighthouse logs to stderr. The server keeps this at error so it does not flood your MCP
client's logs; set LIGHTHOUSE_LOG_LEVEL to silent, info or verbose when debugging
(for example when Chrome fails to launch).
LIGHTHOUSE_LOG_LEVEL=verbose npx @danielsogl/lighthouse-mcp@latestWSL2 / Custom Chrome Path
If the wrong Chrome binary is picked up (e.g. Windows Chrome instead of the Linux binary on WSL2), set the path explicitly:
# Via CLI flag
npx @danielsogl/lighthouse-mcp@latest --chrome-path /usr/bin/google-chrome
# Via environment variable
CHROME_PATH=/usr/bin/google-chrome npx @danielsogl/lighthouse-mcp@latestIn your MCP config:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest", "--chrome-path", "/usr/bin/google-chrome"]
}
}
}E2E Smoke Test (Profile)
Run a real audit with a persistent profile (use an existing profile directory and log in once if needed):
npm run smoke:profile -- --url https://example.com \
--profile-path "<profile-path>" \
--no-headlessE2E Smoke Test (Attach to Existing Chrome)
Start Chrome with remote debugging enabled:
/path/to/GoogleChromeExecutable \
--remote-debugging-port=9222 \
--user-data-dir /path/to/chrome-profileReplace /path/to/GoogleChromeExecutable with your platform's Chrome/Chromium binary path.
Then attach Lighthouse to that instance:
npm run smoke:profile -- --url https://example.com --chrome-port 9222To preserve storage when attaching, pass the profile path so Lighthouse keeps cookies/local storage:
npm run smoke:profile -- --url https://example.com \
--chrome-port 9222 \
--profile-path "<profile-path>"Install in VS Code
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.
Install in Cursor
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"]
}
}
}Install in Windsurf
Follow the Windsurf MCP documentation. Use the following configuration:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}Install in Claude Desktop
Follow the MCP install guide, use the following configuration:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}🔧 Available Tools
The Lighthouse MCP server provides the following tools for comprehensive web analysis:
🏁 Audit Tools
Tool | Description | Parameters |
| Run a comprehensive Lighthouse audit |
|
| Get accessibility score and recommendations |
|
| Get SEO analysis and recommendations |
|
⚡ Performance Tools
Tool | Description | Parameters |
| Get overall performance score |
|
| Get Core Web Vitals metrics |
|
| Compare performance across devices |
|
| Check against performance budgets |
|
| Find LCP optimization opportunities |
|
🔍 Analysis Tools
Tool | Description | Parameters |
| Find unused JavaScript code |
|
| Analyze all website resources |
|
🔒 Security Tools
Tool | Description | Parameters |
| Perform comprehensive security audit |
|
💬 Available Prompts
The Lighthouse MCP server includes reusable prompts that help LLMs provide structured analysis and recommendations:
📊 Analysis Prompts
Prompt | Description | Parameters |
| Analyze Lighthouse audit results |
|
| Compare before/after audit results |
|
| Get Core Web Vitals optimization recommendations |
|
| Get resource optimization recommendations |
|
📚 Available Resources
The Lighthouse MCP server provides built-in reference resources with essential guidelines and best practices:
Resource | Description | URI |
| Core Web Vitals performance thresholds |
|
| Performance optimization techniques and impact |
|
| WCAG 2.1 accessibility guidelines and issues |
|
| SEO best practices and optimization opportunities |
|
| Web security best practices and vulnerabilities |
|
| Performance budget recommendations by site type |
|
| Lighthouse audit categories and scoring methods |
|
| Framework-specific optimization guides |
|
🎯 Strategy Prompts
Prompt | Description | Parameters |
| Generate comprehensive performance improvement plan |
|
| Create custom performance budget recommendations |
|
| Generate SEO improvement recommendations |
|
| Create accessibility improvement guide |
|
🔧 Prompt Parameter Details
auditResults: JSON audit results from Lighthouse toolsfocusArea: Specific category to focus on ("performance","accessibility","seo","best-practices","agentic-browsing")beforeAudit/afterAudit: Lighthouse audit results before and after changeschangesImplemented: Description of changes made between auditscurrentMetrics: Current performance metrics from auditstargetGoals: Specific performance targets or business goalstimeframe: Timeline for implementing improvementsframework: Frontend framework or technology stackconstraints: Technical or business constraintswebsiteType: Type of website (e.g., e-commerce, blog, corporate)targetAudience: Target audience or market informationcomplianceLevel: WCAG compliance level ("AA"or"AAA")userGroups: Specific user groups to consider for accessibility
📋 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", "agentic-browsing"])threshold: Custom thresholds for metrics (e.g.,{"lcp": 2.5, "inp": 200, "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", "csp", "hsts", "origin-isolation", "clickjacking", "trusted-types", "third-party-cookies", "deprecations"])
💡 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,
"inp": 200,
"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
}
}Using Reference Resources
Access built-in guidelines and best practices:
// Get Core Web Vitals thresholds
{
"resource": {
"uri": "lighthouse://performance/core-web-vitals-thresholds"
}
}
// Access WCAG accessibility guidelines
{
"resource": {
"uri": "lighthouse://accessibility/wcag-guidelines"
}
}
// Get framework-specific optimization guides
{
"resource": {
"uri": "lighthouse://frameworks/optimization-guides"
}
}Using Prompts for Analysis
// Analyze audit results with focused recommendations
{
"prompt": "analyze-audit-results",
"arguments": {
"auditResults": "{...lighthouse audit json...}",
"focusArea": "performance"
}
}
// Create a performance improvement plan
{
"prompt": "create-performance-plan",
"arguments": {
"currentMetrics": "{...current performance metrics...}",
"targetGoals": "Achieve 90+ performance score and sub-2s LCP",
"timeframe": "3 months"
}
}
// Compare before/after audit results
{
"prompt": "compare-audits",
"arguments": {
"beforeAudit": "{...before audit results...}",
"afterAudit": "{...after audit results...}",
"changesImplemented": "Implemented lazy loading and image optimization"
}
}🎯 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
🧪 Testing
npm run test:run # unit tests
npm run test:coverage # unit tests with coverage
npm run test:e2e # end-to-end testsThe end-to-end suite builds the server, launches it over stdio with a real MCP client, and
runs actual Lighthouse audits against a fixture page served on loopback. It requires Chrome
to be installed; set CHROME_PATH if it lives somewhere non-standard.
🤝 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
Available Tools
11 toolsanalyze_resourcesAnalyze Page ResourcesARead-only
Analyze website resources (images, JS, CSS, fonts) for optimization opportunities
Inputs: url (required), device, minSize, resourceTypes. Returns: url, device, filters, summary, +3 more
check_performance_budgetCheck Performance BudgetBRead-only
Check if website performance meets specified budget thresholds
Inputs: url (required), budget (required), device. Returns: data, summary, recommendations
compare_mobile_desktopCompare Mobile vs DesktopARead-only
Compare website performance between mobile and desktop devices
Inputs: url (required), categories, throttling, includeDetails. Returns: data, summary, recommendations
find_unused_javascriptFind Unused JavaScriptBRead-only
Find unused JavaScript code to reduce bundle size
Inputs: url (required), device, minBytes. Returns: url, device, summary, timestamp, +3 more
get_accessibility_scoreGet Accessibility ScoreBRead-only
Get the accessibility score and recommendations for a website
Inputs: url (required), device, includeDetails. Returns: data, summary, recommendations
get_core_web_vitalsGet Core Web VitalsARead-only
Get Core Web Vitals metrics for a website
Inputs: url (required), device, threshold, includeDetails. Returns: data, summary, recommendations
get_lcp_opportunitiesGet LCP OpportunitiesBRead-only
Get LCP optimization opportunities for a website
Inputs: url (required), device, threshold, includeDetails. Returns: data, summary, recommendations
get_performance_scoreGet Performance ScoreCRead-only
Get the performance score for a website
Inputs: url (required), device. Returns: data, summary, recommendations
get_security_auditGet Security AuditARead-only
Perform security audit checking HTTPS, CSP, and other security measures
Inputs: url (required), checks, device. Returns: data, summary, recommendations
get_seo_analysisGet SEO AnalysisCRead-only
Get SEO analysis and recommendations for a website
Inputs: url (required), device, includeDetails. Returns: data, summary, recommendations
run_auditRun Lighthouse AuditBRead-only
Run a comprehensive Lighthouse audit on a website
Inputs: url (required), device, categories, throttling. Returns: data, summary, recommendations
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
There is significant overlap between run_audit and the specific getter tools (accessibility, SEO, performance), as run_audit likely encompasses all of those. Additionally, get_lcp_opportunities, find_unused_javascript, and analyze_resources all target performance optimization with unclear boundaries.
Most tools follow a clear verb_noun pattern (e.g., get_*, run_audit, compare_mobile_desktop, check_performance_budget). Minor deviations include run_audit vs. get_security_audit (both use 'audit' but different verbs) and find_unused_javascript/analyze_resources not using 'get_' prefix, but the overall convention is consistent.
With 11 tools, the set is well-scoped for a website auditing server. Each tool covers a distinct aspect of Lighthouse auditing (performance, SEO, accessibility, security, resources), and the count is within the ideal 3-15 range without feeling bloated.
The tool surface covers major Lighthouse categories (performance, accessibility, SEO, security, Core Web Vitals, resources) and includes useful extras like budget checks and mobile/desktop comparison. However, it lacks explicit best practices and PWA audits, which are standard Lighthouse categories, creating minor gaps.
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
Website QA for your coding agent: audit SEO, performance, security, accessibility over MCP.
Your agent needs to crawl a site and say what is wrong with it — broken tags, duplicate content, pages nothing can index, resources that never load. **What you can ask for** • "Crawl this site and list every page with a duplicate title or missing description." • "Which pages are non-indexable, and why?" • "Run Lighthouse on these URLs and give me the failing audits." • "Show the internal link graph and the orphan pages." • "Give me this page's raw HTML and its microdata." **How to use it** Point any MCP client at https://mcp.aisa.one/seo-onpage/mcp and sign in with OAuth — there is no key to create or paste. 20 tools: submit a crawl and read its summary, pages, resources, links and waterfall; duplicate content and duplicate tags; keyword density; non-indexable and uncrawlable resources; parsed content, raw HTML, microdata, screenshots and Lighthouse. **Why this rather than the source** A crawler you drive from the agent, with the audit results as structured data rather than a PDF. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the broken pages here, then ask the same agent what those pages used to rank for — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/seo/mcp for all of it at once — rankings, keywords, backlinks, site health and AI-answer visibility across DataForSEO, Semrush and Ahrefs.
Screenshot, diff, audit and sitemap-capture any web page — 5 MCP tools for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceA comprehensive MCP server providing 15 web tools including search, scraping, screenshots, SEO audits, and DNS/SSL checks through a single installation. It delivers clean, LLM-optimized outputs so AI agents can focus on reasoning rather than parsing raw HTML.1511 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to perform comprehensive SEO audits on web pages, including meta tags, headings, links, images, performance, and more, via a CLI or MCP server.181MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for SEO, performance, GEO, and UX audits with 37 tools covering technical SEO, Lighthouse performance, AI search optimization, content analysis, accessibility, security, and more.1MIT
- AlicenseAqualityDmaintenanceAn MCP server that audits websites for accessibility (WCAG 2.1 AA/EAA), performance, SEO, design quality, and mobile responsiveness, providing actionable scores, grades, and prioritized fixes.6MIT