pagespeed-insights-mcp
v2.5.0Google PageSpeed Insights and CrUX: six workflow tools for web performance.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pagespeed_analyze_page Analyze a Page with Lighthouse
Run a PageSpeed Insights (or local Lighthouse for localhost/private URLs) analysis for one page. Start with report=summary for a health check; choose full for audits, recommendations for a prioritized fix list, audit for non-performance categories, or performance-map for Mermaid. Example: analyze a mobile product page and return the three most useful remediation steps. Returns a report plus structured result.
| Parameter | Type | Description |
|---|---|---|
url * | string | Public or local http(s) URL, for example https://example.com/products or http://localhost:3000. |
budget | object | Optional performance budget thresholds to validate against the measured result. Per-call values override the project's .pagespeed.json route budget and defaults. |
categories | array | Lighthouse categories to request. |
engine | string | Analysis engine: auto (default, uses local Lighthouse for localhost/private URLs and Google PSI for public URLs), psi, or local. |
extraHeaders | object | Optional HTTP headers (for example Authorization or Cookie) passed when running local Lighthouse against protected staging sites. |
locale | string | BCP-47 locale such as en or uk-UA. |
report | string | Amount and shape of returned insight. |
responseFormat | string | markdown is concise and readable; json is machine-readable and is also available as structuredContent. |
runs | integer | Distinct measurements. Use 3–5 when you need a median and spread. |
strategy | string | Lighthouse device profile. mobile is the default. |
workspaceDir | string | Optional local repository path to map Lighthouse selectors and asset filenames to source files. |
pagespeed_diagnose_page Diagnose a Page Performance Problem
Inspect one page through exactly one diagnostic lens: visual, elements, network, javascript, images, render-blocking, or third-parties. Use after pagespeed_analyze_page identifies a problem; do not use it for a general score. Example: focus=render-blocking to identify CSS/JS delaying first render. Returns focused evidence (including native image screenshots when focus=visual).
| Parameter | Type | Description |
|---|---|---|
focus * | string | The single diagnostic lens to return. |
url * | string | Public or local http(s) URL, for example https://example.com/products or http://localhost:3000. |
engine | string | Analysis engine: auto (default, uses local Lighthouse for localhost/private URLs and Google PSI for public URLs), psi, or local. |
extraHeaders | object | Optional HTTP headers (for example Authorization or Cookie) passed when running local Lighthouse against protected staging sites. |
responseFormat | string | markdown is concise and readable; json is machine-readable and is also available as structuredContent. |
strategy | string | Lighthouse device profile. mobile is the default. |
pagespeed_get_field_data Get Chrome UX Report Field Data
Get real-user Core Web Vitals from Chrome UX Report, not Lighthouse lab measurements. Use scope=page for one URL; use scope=origin with a bare origin when the page has insufficient traffic. Set includeHistory=true to inspect multi-week historical trends. Returns p75 field metrics, distribution histograms, or a clear no-data result.
| Parameter | Type | Description |
|---|---|---|
url * | string | Public or local http(s) URL, for example https://example.com/products or http://localhost:3000. |
formFactor | string | CrUX device segment. ALL is valid only for scope=origin. |
includeHistory | boolean | Fetch multi-week historical CrUX timeseries to spot when regressions began. |
responseFormat | string | markdown is concise and readable; json is machine-readable and is also available as structuredContent. |
scope | string | page queries one URL; origin aggregates every page on the origin. |
pagespeed_compare_pages Compare Pages or a Stored Baseline
Compare two pages now (mode=pages) or measure one page against its locally stored baseline (mode=baseline). Baseline mode records the first call; use runs=3 or more and rely on guaranteed deltas, not medians alone. Example: compare staging against production, or verify whether a deployed fix improved mobile LCP. replaceBaseline overwrites local baseline state.
| Parameter | Type | Description |
|---|---|---|
mode * | string | pages compares url and against; baseline compares url to its saved measurement. |
url * | string | Public or local http(s) URL, for example https://example.com/products or http://localhost:3000. |
against | string | Second URL, required when mode=pages. |
budget | object | Optional performance budget thresholds to validate against the measured result. Per-call values override the project's .pagespeed.json route budget and defaults. |
categories | array | Lighthouse categories to request. |
engine | string | Analysis engine: auto (default, uses local Lighthouse for localhost/private URLs and Google PSI for public URLs), psi, or local. |
extraHeaders | object | Optional HTTP headers (for example Authorization or Cookie) passed when running local Lighthouse against protected staging sites. |
replaceBaseline | boolean | Only baseline mode: overwrite the local stored baseline. |
responseFormat | string | markdown is concise and readable; json is machine-readable and is also available as structuredContent. |
runs | integer | Use 2–5 for baseline mode; 3 is recommended. |
strategy | string | Device profile; part of baseline identity. |
pagespeed_analyze_batch Analyze Multiple Pages
Analyze 1–10 URLs in parallel (bounded by concurrency) and return per-page results plus success/failure counts. Use pagespeed_analyze_page for one URL or pagespeed_compare_pages for a direct comparison. Progress notifications are emitted when supported by the client.
| Parameter | Type | Description |
|---|---|---|
urls * | array | One to ten http(s) URLs. |
categories | array | Lighthouse categories to request. |
engine | string | Analysis engine: auto (default, uses local Lighthouse for localhost/private URLs and Google PSI for public URLs), psi, or local. |
extraHeaders | object | Optional HTTP headers (for example Authorization or Cookie) passed when running local Lighthouse against protected staging sites. |
locale | string | BCP-47 locale such as en or uk-UA. |
report | string | Per-page result detail. |
responseFormat | string | markdown is concise and readable; json is machine-readable and is also available as structuredContent. |
strategy | string | Lighthouse device profile. mobile is the default. |
pagespeed_clear_cache Clear Local PageSpeed Cache
Clear only this server process's in-memory PageSpeed response cache, forcing later analysis calls to contact Google again. Use after a deploy when a cached result is stale. It does not change the target website, files, or remote data; repeating the call is safe.