# PageSpeed Insights MCP Server

> Analyze web performance from an AI client.

- **URL**: https://followmcp.com/en/servers/pagespeed-insights-mcp
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 87
- **FMRS Score**: 61/100 (Grade C)
- **Source**: https://github.com/ruslanlap/pagespeed-insights-mcp
- **Transports**: stdio (local process), Streamable HTTP
- **Runtimes**: Node.js 20.19.0+
- **Auth**: Optional API key

## Overview
PageSpeed Insights MCP Server analyzes web performance using Google PageSpeed Insights, Chrome UX Report (CrUX), and local Lighthouse. It supports audits of public pages and localhost, performance diagnostics, real-user Core Web Vitals data, page comparisons, and batch analysis.

## Best for
- Developers and SEO practitioners who want website performance analysis in an MCP client.
- Teams using Lighthouse, CrUX data, or performance budgets to investigate regressions.

## Not for
- Users seeking general-purpose web browsing or MCP features unrelated to performance audits.
- Users who require a Google-maintained official server; the source does not indicate that Google maintains this server.

## Required permissions
- Running the MCP server requires Node.js; the README specifies Node.js >= 20.19.0.
- Auditing public URLs uses Google PageSpeed Insights; local Lighthouse analysis of localhost or private addresses requires local Chrome/Chromium.
- GOOGLE_API_KEY can raise PSI quotas and provide CrUX field data; the manifest marks it optional.
- For HTTP mode, MCP_AUTH_TOKEN can optionally provide Bearer authentication.

## Risks
- Public URL analysis sends requests to Google PageSpeed Insights; avoid submitting URLs or information that should not be sent to an external service.
- Local analysis depends on local Chrome/Chromium; protected staging sites may need extra request headers.
- The README describes local baseline file storage and HTTP mode; protect baseline data and access tokens when deploying.

## Client config (JSON)
```json
{"mcpServers":{"pagespeed-insights":{"command":"npx","args":["-y","pagespeed-insights-mcp"],"env":{"GOOGLE_API_KEY":"your-google-api-key"}}}}
```

## Tools (6)
- `pagespeed_analyze_page`: Get a Lighthouse summary, full report, audit recommendations, audit results, or a performance map.
- `pagespeed_diagnose_page`: Diagnose a page through visual, elements, network, JavaScript, images, render-blocking, or third-party views.
- `pagespeed_get_field_data`: Get CrUX real-user Core Web Vitals, traffic histograms, and optional weekly history trends.
- `pagespeed_compare_pages`: Compare pages side by side or check multiple runs against a stored baseline for regressions.
- `pagespeed_analyze_batch`: Analyze 1–10 URLs in parallel with MCP progress notifications.
- `pagespeed_clear_cache`: Clear the in-memory response cache.
