Skip to main content
MCP server CX Codex

pagespeed-insights-mcp — Claude Code MCP server: six performance tools

Wires Google PageSpeed Insights and the Chrome UX Report into your AI client. Useful when a page is slow and you want a ranked list of fixes, not just a score.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add pagespeed-insights-mcp -e GOOGLE_API_KEY=<GOOGLE_API_KEY> -- npx -y pagespeed-insights-mcp
Open on GitHub

What pagespeed-insights-mcp does

This server ships six tools rather than the usual single “run PSI on a URL”. You get page analysis, CrUX field data for a URL and for an origin, Lighthouse audits, multi-page and batch comparison, baselines, and regression tracking. Diagnostics reach element level: network, JavaScript, images, render-blocking resources, third-party impact.

A recommendations engine turns raw Lighthouse output into a prioritised fix list, and screenshots get analysed too. Repeat runs are cached. The package is on npm, listed in the Official MCP Registry and Glama, and CI runs Vitest.

You need a GOOGLE_API_KEY; the server will not start without one. The Claude Desktop and Codex configurations pull in pino-pretty through npx so logs are formatted readably — the minimal launch command skips it.

What it helps with

  • find out which resources drag a Lighthouse score down
  • compare load speed across several pages in one run
  • pull real-user CrUX numbers instead of lab-only results
  • record a baseline and catch regressions after a deploy
  • spot third-party scripts blocking the first paint

Example prompts for the agent

  • Run pagespeed_analyze_page on the homepage and tell me which fixes matter most
  • Compare mobile scores for three catalog pages and put them in a table
  • Fetch CrUX origin data and explain how it differs from the lab run

How to install pagespeed-insights-mcp

Platform CLI

claude mcp add pagespeed-insights-mcp -e GOOGLE_API_KEY=<GOOGLE_API_KEY> -- npx -y pagespeed-insights-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about pagespeed-insights-mcp

How do I install pagespeed-insights-mcp in Claude Code?

Run claude mcp add pagespeed-insights-mcp -e GOOGLE_API_KEY=<GOOGLE_API_KEY> -- npx -y pagespeed-insights-mcp. The alternative form is claude mcp add --env GOOGLE_API_KEY=<GOOGLE_API_KEY> --transport stdio pagespeed-insights-mcp -- npx -y pagespeed-insights-mcp.

What does pagespeed-insights-mcp do?

It exposes six tools over Google PageSpeed Insights and the Chrome UX Report: page analysis, CrUX data, Lighthouse audits, page comparison, baselines, and regression tracking.

What does the server need to run?

A GOOGLE_API_KEY, passed as an environment variable when you register the server. The Claude Desktop and Codex configs also install pino-pretty so log output stays readable.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor