Lighthouse MCP 服务器
MCP 服务器围绕 Google 的 Lighthouse 工具,帮助测量网页的各种性能指标。

特征
对任何 URL 运行全面的 Lighthouse 审核
获取绩效分数和指标
配置设备模拟(移动/桌面)
控制网络限制
选择特定的审计类别
安装
选项 1:使用 npx(推荐)
您可以直接使用 npx 运行该工具,无需安装:
选项 2:全局安装
全局安装包:
然后运行它:
选项 3:本地开发
克隆此存储库
安装依赖项:
npm install构建项目:
npm run build运行服务器:
npm start
MCP 配置
通过 npm(全局或 npx)安装时
将以下内容添加到您的 MCP 设置配置文件中:
使用本地开发版本时
将以下内容添加到您的 MCP 设置配置文件中:
将/absolute/path/to/lighthouse-mcp替换为此项目的实际路径。
可用工具
运行审计
对 URL 运行全面的 Lighthouse 审核。
参数:
url(必填):需要审核的 URLcategories(可选):要审核的类别数组(默认为全部)选项:“性能”、“可访问性”、“最佳实践”、“SEO”、“PWA”
device(可选):要模拟的设备(默认为“移动设备”)选项:“移动”、“桌面”
throttling(可选):是否应用网络节流(默认为 true)
例子:
获取绩效分数
仅获取 URL 的性能分数。
参数:
url(必填):需要审核的 URLdevice(可选):要模拟的设备(默认为“移动设备”)选项:“移动”、“桌面”
例子:
示例用法
一旦 MCP 服务器配置完毕,您就可以将其与 Claude 一起使用:
Claude 将使用get_performance_score工具来分析网站并返回结果。
要求
Node.js 16+
Chrome/Chromium 浏览器(适用于 Lighthouse)
代言
local-only server
The server can only run on the client's local machine because it depends on local resources.
允许 Cursor/Cline/GitHub Copilot 等 AI 助手使用 Google 的 Lighthouse 工具来测量您网页的性能指标。然后,您可以运行代理循环,让助手优化这些指标!
Related Resources
Related MCP Servers
- -security-license-qualityActs as a bridge between AI models and Google's PageSpeed Insights API, enabling detailed performance analysis of websites.Last updated -157MIT License
- Asecurity-licenseAqualityProvides LLM Agents with AI-powered mentorship for code review, design critique, writing feedback, and brainstorming using the Deepseek API, enabling enhanced output in various development and strategic planning tasks.Last updated -32Apache 2.0
- Asecurity-licenseAqualityEnables AI models to analyze webpage performance using the Google PageSpeed Insights API, providing real-time performance scores and improvement suggestions.Last updated -148MIT License
- Asecurity-licenseAqualityMCP-compatible server that enables AI assistants to interact with Lightdash analytics data, providing tools to list and retrieve projects, spaces, charts, dashboards, and metrics through a standardized interface.Last updated -13517MIT License