MCP server· v1.0.0
PageSpeed MCP
Core Web Vitals and Lighthouse fixes, straight into your agent.
MCP server for PageSpeed Insights v5 and the Chrome UX Report: audits, real-user Core Web Vitals, 40-week history, prioritised fixes and sitemap batch audits.
- Claude Code
- Claude Desktop
- Cursor
- VS Code
- Codex
- PageSpeed Insights
- Chrome UX Report
- Docker
What you get out of it
- 01A prioritised fix list instead of a 40-section Lighthouse report
- 02Real-user Core Web Vitals and their trend in one question
- 03A whole sitemap audited worst-first while you do something else
- 04Pass/fail performance budgets before and after every deploy
One-time purchase · incl. VAT
Overview
From "the site feels slow" to a fix list
A Lighthouse report is long, a CrUX dashboard is somewhere else, and neither tells you what to fix first. So the usual routine is: run PageSpeed Insights, scroll, copy numbers into a ticket, repeat for the next template. An AI agent can do the scrolling, if it gets the data in a form it can reason about.
PageSpeed MCP gives Claude, Cursor, VS Code, Codex or any MCP client direct access to the PageSpeed Insights API v5 and the Chrome UX Report API, and turns their output into compact, rated, prioritised answers.
7 tools
- psi_audit: Lighthouse audit on mobile, desktop or both. Category scores, lab FCP, LCP, TBT, CLS, Speed Index and server response time, each rated; real-user field data for the URL and the whole origin; the top opportunities.
- psi_opportunities: every failing opportunity and Lighthouse insight, sorted by estimated savings in milliseconds and kilobytes, with the metrics it affects and the worst resources. Plus failing diagnostics like DOM size or main-thread work.
- psi_compare_urls: 2–10 URLs side by side (your template A vs. B, or you vs. competitors), with the best URL per metric.
- psi_batch_sitemap: reads a sitemap, sitemap index or
.xml.gz, filters URLs by regex and audits up to 200 of them with a concurrency limit and progress updates. Returns a worst-first table and a site summary. - psi_budget_check: pass/fail against a performance budget, before and after a deploy.
- crux_cwv: real-user LCP, INP, CLS, FCP and TTFB at p75 with good / needs-improvement / poor shares, per phone, desktop or tablet, with automatic fallback from URL to origin.
- crux_history: up to 40 weekly periods (about nine months) of field data with a trend summary, so you can see whether last month's fix actually reached users.
Plus a resource with the official CWV thresholds and two prompts: a CWV triage for one URL and a client-ready speed report for a whole site.
Lab explains, field decides
Google's Core Web Vitals assessment uses field data: the 75th percentile of real Chrome users. Lighthouse lab data is one simulated load, but it shows causes. The server keeps both apart, rates both with the official thresholds (LCP ≤ 2.5 s, INP ≤ 200 ms, CLS ≤ 0.1) and tells the agent which is which, so you don't get "INP is fine" from a lab run that cannot measure INP.
Built for real runs
PSI runs take 10–60 seconds. Results are cached for ten minutes, so asking for opportunities after an audit costs nothing. Batch and compare runs respect a concurrency limit. Transient errors are retried with backoff; pages Lighthouse cannot load are not retried pointlessly. Every audit comes with a small text gauge, ▰▰▰▰▰▰▰▱▱▱ 72/100.
Speed has always been our thing
ProvenCart spent years building WordPress performance plugins, and our logo is still a speedometer. This server is that experience, rebuilt for agents.
What you need
Node.js 20+ and a free Google API key with the PageSpeed Insights and Chrome UX Report APIs enabled. Five minutes with the included guide.
Made for
- Web developers and agencies who fix Core Web Vitals for clients
- SEO consultants who need performance data in their audits
- Shop and site owners who want to know what to fix first
Inside the tool
Features
Lab and field in one call
Lighthouse scores and lab metrics plus CrUX field data for URL and origin, rated with the official thresholds.
Fixes ranked by savings
Opportunities and Lighthouse insights sorted by estimated ms and KB saved, with affected metrics and offending resources.
40-week CWV history
Weekly CrUX p75 and good-share series with a trend summary to verify that fixes reached real users.
Sitemap batch audits
Sitemap, index or .xml.gz, regex filters, up to 200 URLs, concurrency limit and progress notifications.
Budgets and comparisons
Pass/fail budget checks for deploys and side-by-side comparison of up to 10 URLs.
stdio or HTTP
Runs locally over stdio or as a Streamable HTTP server with bearer token and Docker image.
Demo
See it work
→ psi_opportunities { "url": "https://shop.example.com/", "strategy": "mobile", "limit": 3 }
{
"performance": 61,
"gauge": "▰▰▰▰▰▰▱▱▱▱ 61/100 needs-improvement",
"opportunities": [
{ "title": "Eliminate render-blocking resources", "savings_ms": 850, "metrics": ["FCP", "LCP"],
"items": [ { "url": "https://shop.example.com/wp-content/themes/shop/style.css", "wasted_ms": 610 } ] },
{ "title": "LCP request discovery", "savings_ms": 600, "metrics": ["LCP"] },
{ "title": "Reduce unused JavaScript", "savings_ms": 420, "savings_kb": 176, "metrics": ["LCP"] }
],
"diagnostics": [ { "title": "Avoid an excessive DOM size", "display": "2,410 elements" } ]
}→ crux_cwv { "origin": "https://shop.example.com", "form_factor": "PHONE" }
{
"period": "2026-10-29..2026-11-25",
"passes_cwv": false,
"metrics": {
"LCP": { "p75": 2390, "rating": "good", "good_pct": 77.1, "ni_pct": 15, "poor_pct": 7.9 },
"INP": { "p75": 231, "rating": "needs-improvement", "good_pct": 71, "ni_pct": 20, "poor_pct": 9 },
"CLS": { "p75": 0.02, "rating": "good", "good_pct": 93 }
}
}You
We deferred our slider script on Oct 10. Did mobile LCP improve for real users?
Agent
Yes. crux_history (origin, PHONE) shows LCP p75 at 3,400 ms in the 28-day window ending Oct 4, 2,900 ms a week later and 2,450 ms in the window ending Oct 18: −28%, now rated good. The share of good LCP experiences rose from 60% to 74%. CLS stayed flat at 0.04–0.05. Keep watching INP, which this change doesn't affect.
What's inside
The exact contents of the zip you download.
- pagespeed-mcp/
- src/TypeScript source: 7 tools, CWV thresholds resource, 2 prompts, PSI/CrUX client with cache
- dist/Prebuilt JavaScript, runs with node dist/index.js
- test/Vitest unit tests with PSI and CrUX fixtures in the real response structure
- README.de.mdAPI key guide, client configs, tool reference, lab vs. field explainer
- .env.exampleEvery configuration option, documented
- DockerfileContainer image for stdio or HTTP mode
- LICENSE.md, CHANGELOG.mdCommercial license and version history
Install
Unzip and build (a prebuilt
dist/is included):cd pagespeed-mcp && npm install && npm run buildIn Google Cloud Console enable PageSpeed Insights API and Chrome UX Report API, then create an API key (APIs & Services → Credentials) and restrict it to those two APIs.
Register the server, e.g. in Claude Code:
claude mcp add pagespeed -e PAGESPEED_API_KEY=AIza... -- node /absolute/path/to/pagespeed-mcp/dist/index.jsConfigs for Claude Desktop, Cursor, VS Code and Codex are in the README.
Ask: "Audit https://your-site.com on mobile and desktop and tell me what to fix first."
Requirements
- Node.js 20 or newer (or Docker)
- Free Google API key with PageSpeed Insights API and Chrome UX Report API enabled
- Publicly reachable pages to audit
- An MCP client such as Claude Code, Claude Desktop, Cursor, VS Code or Codex
Works with
- Claude Code
- Claude Desktop
- Cursor
- VS Code
- Codex
- PageSpeed Insights
- Chrome UX Report
- Docker
Frequently asked
Do I need an API key?
For the CrUX tools, yes. For PageSpeed Insights it is technically optional, but the keyless quota is shared by everyone and often exhausted. A key is free and gives you 25,000 PSI queries per day by default.
How is the API key handled?
It stays in your MCP client config or environment. Both Google APIs expect it as a URL parameter; the server redacts it from every error message and log line. Restrict the key to the PageSpeed Insights and Chrome UX Report APIs in Google Cloud Console.
Why do lab and field numbers differ?
Lab data is one simulated load on a throttled phone; field data is the 75th percentile of real Chrome users over 28 days. Google's Core Web Vitals assessment uses field data. Use the lab results to find causes and crux_history to verify the effect after a release.
Why does CrUX say there is no data for my page?
The Chrome UX Report only publishes URLs and origins with enough real-user traffic. crux_cwv then falls back to the origin automatically; for very small sites use the lab data from psi_audit.
Can I run it on a server or in CI?
Yes. It runs over stdio or as a Streamable HTTP server (--http --port) with an optional bearer token, and a Dockerfile is included. psi_budget_check returns a clear pass/fail for deploy checks.
How do updates and licensing work?
You get 12 months of updates from your ProvenCart library; downloaded versions keep working forever. The license covers unlimited own and client projects; reselling or redistributing the files is not allowed. Setting PROVENCART_LICENSE_KEY enables an optional check (key, product and an anonymous installation ID) that only logs a message and never blocks the server.
Can I get a refund?
It's a digital product: at checkout you agree that the download starts immediately, so the statutory right of withdrawal expires (§ 356 (5) BGB). If something doesn't work for your setup, write us via the support page and we'll help you get it running.
Changelog
v1.0.0Latest
1.0.0 – First release: 7 read-only tools (audit, opportunities, compare, sitemap batch, budget check, CrUX Core Web Vitals, CrUX history), CWV thresholds resource, 2 prompts, result cache, stdio + HTTP transport, Dockerfile.
You might also like
Bundle· 6 products
Developer Bundle
MCP servers, Claude Code setup and production rules for client web projects.