Provides comprehensive web performance analysis through Google Lighthouse, including Core Web Vitals metrics, accessibility audits, SEO analysis, and actionable optimization recommendations with support for critical request chain analysis and unused code detection.
Lighthouse MCP
A Model Context Protocol (MCP) server and CLI tool for Google Lighthouse performance analysis.
Features
- 🚀 Performance Analysis: Comprehensive performance metrics including Core Web Vitals
- 🔍 Deep Analysis: Critical request chains, unused code detection, and performance patterns
- 📊 Multiple Categories: Performance, Accessibility, Best Practices, and SEO
- 🎯 Actionable Recommendations: Prioritized suggestions for performance improvements
- 💻 CLI & Library: Use as a command-line tool or integrate into your Node.js application
- 🤖 MCP Server: Model Context Protocol integration for AI-powered analysis
Installation
CLI Usage
Basic Usage
Options
Examples
Library Usage
MCP Server Usage
The MCP server provides tools for AI models to perform Lighthouse analysis:
Available MCP Tools
runLighthouse
: Execute Lighthouse analysis on a URLanalyzePerformance
: Deep analysis of Lighthouse reportsgetCriticalChain
: Analyze critical request chainsgetUnusedCode
: Detect unused JavaScript and CSS
Development
Project Structure
Output Example
Technologies Used
- Lighthouse: Google's automated tool for improving web pages
- Puppeteer: Headless Chrome automation
- TypeScript: Type-safe development
- Vitest: Fast unit testing
- oxlint: Fast linting with type-aware rules
- neverthrow: Type-safe error handling
- MCP SDK: Model Context Protocol for AI integration
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables AI models to perform Google Lighthouse website performance analysis, including Core Web Vitals, accessibility, SEO audits, and actionable optimization recommendations. Provides comprehensive web performance insights through natural language interactions.