Pagespeed MCP Server

MCP server for Google PageSpeed Insights & Chrome UX Report APIs — 16 tools to analyze, compare, and optimize web performance with Claude, Cursor, or

Local serverstdioGo

What is the Pagespeed MCP server?

MCP server for Google PageSpeed Insights & Chrome UX Report APIs — 16 tools to analyze, compare, and optimize web performance with Claude, Cursor, or any MCP-compatible AI client. That is what the pagespeed mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

Add to ~/.grok/config.toml (global) or <repo>/.grok/config.toml (project-scoped, higher priority):

Getting it running

Installation goes through your MCP client rather than a global install: point it at pagespeed-insights-mcp on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • analyze_page_speed — The analyze_page_speed tool exposed by this server
  • get_performance_summary — The get_performance_summary tool exposed by this server
  • get_recommendations — Generate smart performance recommendations with priority scoring and actionable fixes
  • clear_cache — Clear the internal cache to force fresh API requests for all subsequent analyses
  • get_visual_analysis — Get screenshots and visual timeline showing how the page loads
  • get_element_analysis — The get_element_analysis tool exposed by this server
  • get_network_analysis — Get detailed network waterfall showing all requests with timing and size
  • get_javascript_analysis — Get JavaScript execution breakdown showing performance impact
  • get_image_optimization_details — Get specific images needing optimization with exact savings potential
  • get_render_blocking_details — The get_render_blocking_details tool exposed by this server
  • get_third_party_impact — The get_third_party_impact tool exposed by this server
  • get_full_audit — Get comprehensive audit results for all Lighthouse categories

What it needs from you

Configuration is passed through the environment: GOOGLE_API_KEY, YOUR_GOOGLE_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Pagespeed.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Pagespeed's toolset — analyze_page_speed, get_performance_summary, get_recommendations and 11 more — is a fair guide to whether it matches your workflow. It is maintained by ruslanlap; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
analyze_page_speedThe analyze_page_speed tool exposed by this server.
get_performance_summaryThe get_performance_summary tool exposed by this server.
get_recommendationsGenerate smart performance recommendations with priority scoring and actionable fixes.
clear_cacheClear the internal cache to force fresh API requests for all subsequent analyses.
get_visual_analysisGet screenshots and visual timeline showing how the page loads.
get_element_analysisThe get_element_analysis tool exposed by this server.
get_network_analysisGet detailed network waterfall showing all requests with timing and size.
get_javascript_analysisGet JavaScript execution breakdown showing performance impact.
get_image_optimization_detailsGet specific images needing optimization with exact savings potential.
get_render_blocking_detailsThe get_render_blocking_details tool exposed by this server.
get_third_party_impactThe get_third_party_impact tool exposed by this server.
get_full_auditGet comprehensive audit results for all Lighthouse categories.
crux_summaryGet real-world Core Web Vitals from the Chrome UX Report (field data from actual Chrome users).
compare_pagesThe compare_pages tool exposed by this server.

How to install the Pagespeed MCP server

{
  "mcpServers": {
    "pagespeed-insights": {
      "command": "npx",
      "args": ["-y", "-p", "pino-pretty", "-p", "pagespeed-insights-mcp", "pagespeed-insights-mcp"],
      "env": {
        "GOOGLE_API_KEY": "your-google-api-key-here"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GOOGLE_API_KEYCredential the server authenticates with.Yes
YOUR_GOOGLE_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Pagespeed to analyze page speed.
  • Use Pagespeed to get performance summary.
  • Use Pagespeed to get recommendations.

Frequently asked questions

It connects Pagespeed to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (analyze_page_speed, get_performance_summary, get_recommendations, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Pagespeed directly.