pagespeed-insights-mcp
MCP server by ruslanlap Community
Runs Google PageSpeed Insights and Chrome UX Report analysis for web pages through an AI assistant. It is aimed at developers who want performance audits and prioritized fixes without leaving their AI client.
Install pagespeed-insights-mcp
Built from the published package, never by AI.
claude mcp add pagespeed-insights-mcp -e GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY -- npx -y pagespeed-insights-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"pagespeed-insights-mcp": {
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY"
},
"args": [
"-y",
"pagespeed-insights-mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
Step-by-step: install pagespeed-insights-mcp in Claude Desktop
{
"mcpServers": {
"pagespeed-insights-mcp": {
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY"
},
"args": [
"-y",
"pagespeed-insights-mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"pagespeed-insights-mcp": {
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY"
},
"args": [
"-y",
"pagespeed-insights-mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add pagespeed-insights-mcp --env GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY -- npx -y pagespeed-insights-mcp{
"mcpServers": {
"pagespeed-insights-mcp": {
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY"
},
"args": [
"-y",
"pagespeed-insights-mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install pagespeed-insights-mcp in Antigravity CLI
gemini mcp add pagespeed-insights-mcp npx -y pagespeed-insights-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the pagespeed-insights-mcp block.
About
PageSpeed Insights MCP Server is an MCP server for Google PageSpeed Insights and the Chrome UX Report (CrUX) APIs. It lets an MCP-compatible AI client such as Claude, Cursor, or Codex analyze a page's web performance. The source describes six workflow tools covering page analysis, CrUX real-user data for a URL or origin, Lighthouse audits, multi-page and batch comparison, baselines, and regression tracking.
The server is installed with npx using a Google API key set in the environment, and a Docker option is also described. Output includes Lighthouse lab scores and core metrics, plus CrUX field data at the 75th percentile. The source also mentions a recommendations engine that turns Lighthouse data into prioritized fixes. It is intended for developers and teams who want to catch performance regressions before or after deployment.
Written from the project's README and checked against it.
Tools it gives your assistant
pagespeed_analyze_pageRuns a Lighthouse analysis of a page, shown in the source with mobile and desktop scores.pagespeed_get_field_dataReturns CrUX real-user field data for a URL or origin, using scope set to origin or URL.
What you need
- Google API key from Google Cloud Console
- npx (Node.js) to run the npm package
- Docker, optional, for containerized deployment
| Setting | Needed | What it is |
|---|---|---|
GOOGLE_Environment variable, secret | Optional | Optional Google API key for higher PSI quotas and Chrome UX Report field data |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Analyze the mobile performance of my homepage and list the top fixes
- Compare lab and field data for github.com
- Run a performance audit on my staging site and flag regressions
Good to know
- Lighthouse lab data is noisy, so a single run is one sample; the source suggests 3 to 5 runs for medians
- Lab results throttle the connection, so mobile scores can differ from real-user field data
Security check
C- Downloads a script from the internet and runs itIn
README.md:curl -sSL https://raw.githubusercontent.com/ruslanlap/pagespeed-insights-mcp/master/scripts/install.sh | bash
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to pagespeed-insights-mcp
All alternatives →Browser Use runs an AI model in a real browser, where it completes web tasks by writing Python against Chrome DevTools Protocol. It is for developers who want to fill forms, navigate sites and extract data locally or on Browser Use Cloud.
Pomerado builds MCP integrations for websites, including sites without an API, from a plain language task description. It is for people who want their agent to use a site reliably without computer use.
Selenide MCP server runs browser automation for AI assistants. It is built on the Selenide Java testing framework, which wraps Selenium WebDriver 4.0+. It suits developers who want AI agents to drive UI tests.
SeleniumBase is a Python browser automation framework for stealth browsing, end-to-end testing and web scraping. It uses CDP Mode to work with Chromium-based browsers, and it is aimed at software teams.
Camofox Browser MCP exposes the camofox-browser REST API as MCP tools for AI coding assistants. It proxies to an already-running camofox-browser server, so agents can browse sites that block standard automation.
Cline is an open source coding agent that edits files, runs commands, and uses the browser. It works in a terminal CLI, a macOS and Windows desktop app, VS Code, JetBrains IDEs, and an SDK for developers building their own agents.
Compare with browser-use, Pomerado or Selenide
pagespeed-insights-mcp: common questions
Does PageSpeed Insights MCP need a Google API key?
Yes. The source says to get a free API key from Google Cloud Console and set it as GOOGLE_API_KEY in the MCP client configuration.
What data does the server return?
The source describes Lighthouse lab scores and metrics such as FCP, LCP, TBT, CLS, and Speed Index, plus CrUX field data at the p75 level for real Chrome users.
Which AI clients work with this MCP server?
The source says it works with Claude, Cursor, or any MCP-compatible AI client, and gives configuration examples for Claude Desktop, Codex/OpenAI, and Grok Build.
How do I install pagespeed-insights-mcp?
In Claude Code run claude mcp add pagespeed-insights-mcp -e GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY -- npx -y pagespeed-insights-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is pagespeed-insights-mcp the official server?
pagespeed-insights-mcp is a community project by ruslanlap, not verified by a company domain.
Is pagespeed-insights-mcp free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is pagespeed-insights-mcp safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality B. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.
What are alternatives to pagespeed-insights-mcp?
Similar MCP servers: browser-use, Pomerado, Selenide, SeleniumBase MCP.
Does pagespeed-insights-mcp work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
