LightScout MCP
Core 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.
README
LightScout MCP
Part of the TestScout MCP Suite — AI-powered QA tools for modern development teams.
Core Web Vitals analysis powered by Lighthouse. Runs as an MCP server for AI coding tools (Claude Code, Cursor, Windsurf, etc.) or as a standalone CLI for CI pipelines and terminals. Four tools: analyze a URL, compare two URLs, check against thresholds, or crawl an entire site.
Requirements
- Node.js >= 18
- Google Chrome or Chromium
MCP Server Setup
Claude Code
claude mcp add lightscout -- npx -y lightscout-mcp
Cursor, VS Code, Windsurf, Cline, Roo Code, Gemini CLI
All use the same mcpServers JSON format. Add this to the appropriate config file:
{
"mcpServers": {
"lightscout": {
"command": "npx",
"args": ["-y", "lightscout-mcp"]
}
}
}
| Client | Config file |
|---|---|
| Cursor | ~/.cursor/mcp.json |
| VS Code (Copilot) | .vscode/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| Cline | Settings > MCP > Edit Config |
| Roo Code | .roo/mcp.json |
| Gemini CLI | ~/.gemini/settings.json |
Zed
Zed uses context_servers instead of mcpServers:
{
"context_servers": {
"lightscout": {
"command": "npx",
"args": ["-y", "lightscout-mcp"]
}
}
}
CLI
Install
npm install -g lightscout-mcp
Try without installing
npx -p lightscout-mcp lightscout analyze https://example.com
Commands
lightscout analyze <url> [--device mobile|desktop] [--categories perf,a11y,seo,best-practices]
lightscout compare <urlA> [urlB] [--device mobile|desktop]
lightscout crawl <url> [--max-pages N] [--device mobile|desktop]
lightscout check <url> [--perf 90] [--lcp 2500] [--fcp 3000] [--cls 0.1] [--tbt 300] [--ttfb 1800]
Examples
Analyze a single page:
lightscout analyze https://example.com
lightscout analyze https://example.com --device desktop --categories performance,accessibility
Compare two URLs, or the same URL on mobile vs desktop:
lightscout compare https://a.com https://b.com
lightscout compare https://example.com # mobile vs desktop
Crawl a site and audit discovered pages:
lightscout crawl https://example.com --max-pages 5
CI quality gate (exits 1 on failure):
lightscout check https://example.com --perf 90 --lcp 2500
Tools
analyze_performance
Run Lighthouse on a URL. Returns performance scores, Core Web Vitals (LCP, FCP, CLS, TBT, SI, TTFB) with good/needs-improvement/poor ratings, top recommendations sorted by impact, and diagnostics.
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | yes | URL to analyze |
device |
"mobile" | "desktop" |
no | Device emulation (default: mobile) |
categories |
string[] | no | Lighthouse categories (default: ["performance"]) |
compare_performance
Compare Core Web Vitals between two URLs, or the same URL on mobile vs desktop. Shows per-metric deltas with winner indicators.
| Parameter | Type | Required | Description |
|---|---|---|---|
urlA |
string | yes | First URL |
urlB |
string | no | Second URL. If omitted, compares urlA mobile vs desktop |
device |
"mobile" | "desktop" |
no | Device emulation when comparing two URLs (default: mobile) |
check_threshold
Pass/fail check against performance thresholds. Useful for CI quality gates.
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | yes | URL to check |
device |
"mobile" | "desktop" |
no | Device emulation (default: mobile) |
thresholds |
object | no | Custom thresholds (see defaults below) |
Default thresholds use Google's "poor" boundary -- only fails if metrics are genuinely bad:
| Metric | Default (fail if worse) |
|---|---|
| performance | < 50 |
| LCP | > 4000ms |
| FCP | > 3000ms |
| CLS | > 0.25 |
| TBT | > 600ms |
| TTFB | > 1800ms |
crawl_site
Discover pages on a site (via sitemap.xml or link crawling) and run Lighthouse on each. Returns per-page results plus site-wide summary with avg/min/max scores and common issues.
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | yes | Site URL or homepage to crawl |
device |
"mobile" | "desktop" |
no | Device emulation (default: mobile) |
maxPages |
number | no | Maximum pages to analyze (default: 20, max: 20) |
Pages are discovered via sitemap.xml first, falling back to link crawling. Up to 3 Lighthouse runs execute in parallel.
CWV Rating Thresholds
| Metric | Good | Needs Improvement | Poor |
|---|---|---|---|
| LCP | <= 2500ms | 2500-4000ms | > 4000ms |
| FCP | <= 1800ms | 1800-3000ms | > 3000ms |
| CLS | <= 0.1 | 0.1-0.25 | > 0.25 |
| TBT | <= 200ms | 200-600ms | > 600ms |
| SI | <= 3400ms | 3400-5800ms | > 5800ms |
| TTFB | <= 800ms | 800-1800ms | > 1800ms |
Notes
- TBT (Total Blocking Time) is used instead of INP/FID because Lighthouse runs lab-only tests with no real user interaction.
- Up to 3 concurrent Lighthouse runs (semaphore-controlled).
- Chrome is launched headless and killed after each audit.
- MCP responses are token-optimized with condensed metrics and compact JSON.
TestScout MCP Suite
LightScout is the first tool in the TestScout MCP Suite. More tools are coming:
| Tool | Description | Status |
|---|---|---|
| lightscout-mcp | Core Web Vitals & Lighthouse analysis | Available |
| testscout-diagnose | Error triage & root cause analysis | Coming soon |
| testscout-scrape | Structured data extraction for testing | Coming soon |
| testscout-plan | AI test plan & code generation | Coming soon |
| testscout-load | Load test generation & analysis | Coming soon |
| testscout-maintain | Self-healing test maintenance | Coming soon |
Follow development at testscout.dev.
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。