PageSpeed Insights MCP Server
The PageSpeed Insights MCP Server provides 16 tools to analyze, compare, and optimize web performance using Google PageSpeed Insights and Chrome UX Report APIs, offering both lab and real-world data.
Core Analysis
analyze_page_speed: Full Lighthouse audits across performance, accessibility, SEO, best practices, and PWA for mobile or desktopget_performance_summary: Simplified report focusing on key metrics and opportunitiesget_recommendations: Prioritized, actionable performance recommendations with scoringfull_report: Unified report combining Lighthouse lab data with real-world CrUX field databatch_analyze: Analyze up to 10 URLs in parallel with progress tracking and ranked resultsclear_cache: Clear internal cache to force fresh API requests
CrUX & Comparison
crux_summary: Real-world Core Web Vitals (LCP, CLS, FID, INP, TTFB) from Chrome User Experience Report field datacompare_pages: Side-by-side performance comparison between two URLs with metric-level diffs
Advanced Diagnostics
get_visual_analysis: Screenshots, filmstrip frames, and full-page visuals showing page load progressionget_element_analysis: Identify specific DOM elements causing LCP, CLS, or lazy-load issuesget_network_analysis: Detailed network waterfall with request timings, sizes, and prioritiesget_javascript_analysis: JS bootup time, main-thread work, unused code, and duplicated modulesget_image_optimization_details: Find improperly sized, offscreen, or unoptimized images with savings estimatesget_render_blocking_details: Identify render-blocking CSS/JS and critical request chain dependenciesget_third_party_impact: Analyze third-party script impact (e.g., Google, Facebook) grouped by providerget_full_audit: Comprehensive Lighthouse audit across all categories with detailed scores and failing audit details
Provides web performance analysis using Google PageSpeed Insights API, including Lighthouse audits, Chrome UX Report data, and tools for analyzing page speed, mobile/desktop performance, recommendations, cache management, and detailed diagnostics like visual analysis, network waterfalls, and third-party script impact.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PageSpeed Insights MCP Serveranalyze https://example.com performance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PageSpeed Insights MCP Server
Six-tool MCP server for Google PageSpeed Insights & Chrome UX Report APIs. Analyze, compare, and optimize web performance directly through Claude, Cursor, or any MCP-compatible AI client.
⚡ Quick Start (Copy & Paste)
{
"mcpServers": {
"pagespeed-insights": {
"command": "npx",
"args": ["-y", "pagespeed-insights-mcp"],
"env": { "GOOGLE_API_KEY": "your-google-api-key" }
}
}
}Get a free API key at Google Cloud Console → paste into Claude Desktop's claude_desktop_config.json → restart. Done. (Codex/OpenAI config, Docker)
Related MCP server: page-speed-insights-mcp
🔥 What Makes It Different
Most PageSpeed MCP servers wrap one tool: "run PSI on a URL." This server ships six workflow tools covering the full performance workflow — not just a score, but an action plan:
Full toolkit: page analysis, CrUX real-user data (URL + origin), Lighthouse audits, multi-page & batch comparison, baselines, and regression tracking
Deep diagnostics: element-level, network, JavaScript, image optimization, render-blocking, and third-party impact analysis
Actionable output: a recommendations engine that turns raw Lighthouse data into prioritized fixes, plus visual analysis of screenshots
Practical extras: caching for repeat runs and smart recommendations tuned for AI agents to act on
Battle-tested: published on npm, listed in the Official MCP Registry and Glama, CI-tested with Vitest
🎬 View Interactive Demo → — See the tools in action with animated examples Fallback URL: https://ruslanlap.github.io/pagespeed-insights-mcp/demo.html
📖 Table of Contents
⚙️ Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"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"
}
}
}
}Codex / OpenAI
Add to your configuration (TOML):
[mcp_servers.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" }Note: The
pino-prettypackage is required for proper log formatting. The above configurations ensure it is installed automatically vianpx.
For Grok Build (config.toml)
Add to ~/.grok/config.toml (global) or <repo>/.grok/config.toml (project-scoped, higher priority):
[mcp_servers.pagespeed-insights]
command = "npx"
args = ["-y", "-p", "pino-pretty", "-p", "pagespeed-insights-mcp", "pagespeed-insights-mcp"]
env = { GOOGLE_API_KEY = "${GOOGLE_API_KEY}" }
enabled = true
# Recommended companion professional MCPs (add once):
# [mcp_servers.github] — PRs, issues, code search
# [mcp_servers.context7] — fresh library docs (Upstash)
# [mcp_servers.serena] — semantic code intelligence (uses your .serena/ if present)Project-scoped example (put in this repo's .grok/config.toml for local dist/index.js + tighter Serena):
[mcp_servers.pagespeed-insights]
command = "node"
args = ["/home/ubuntuvm/Projects/pagespeed-insights-mcp/dist/index.js"]
env = { GOOGLE_API_KEY = "${GOOGLE_API_KEY}", NODE_ENV = "development" }Verification inside Grok session:
/mcps(or Ctrl+L → MCP tab) → ensure pagespeed-insights shows "running"Use tools:
pagespeed-insights__pagespeed_analyze_page,pagespeed-insights__pagespeed_get_field_data, etc. (namespaced)
📊 Example Output
Real pagespeed_analyze_page results for github.com — one mobile Lighthouse run. CrUX numbers come from pagespeed_get_field_data with scope: "origin":
Lighthouse lab scores:
Category | Score | Status |
Performance (mobile) | 54/100 | 🔴 Poor |
Performance (desktop) | 52/100 | 🔴 Poor |
Core metrics (mobile):
Metric | Value | Rating |
First Contentful Paint | 11.9 s | 🔴 Poor |
Largest Contentful Paint | 13.4 s | 🔴 Poor |
Total Blocking Time | 30 ms | 🟢 Excellent |
Cumulative Layout Shift | 0.07 | 🟢 Good |
Speed Index | 11.9 s | 🔴 Poor |
CrUX field data — real users, github.com origin (phone):
Metric | p75 (real users) |
First Contentful Paint | 1.9 s |
Largest Contentful Paint | 2.2 s |
Interaction to Next Paint | 243 ms |
Cumulative Layout Shift | 0.02 |
Results vary between runs — Lighthouse lab data is noisy (a single run is one sample). Use
runs: 3-5for medians.Lab vs field: Lighthouse throttles the connection (hence 54/100 mobile), while CrUX shows how actual GitHub visitors experience it — both views come straight from this server's tools.
📚 Documentation
We have comprehensive documentation available online.
👉 View Full Documentation Site
You can also view the raw markdown files in the
docs/directory or runmkdocs servelocally.
📝 Release Notes
Current release: v2.0.0.
Recent highlights:
v2.0.0 — six workflow-oriented
pagespeed_*tools replace the 19 v1 endpoint-shaped tools; all data tools support Markdown or JSON with structured results.
The badges at the top of this README update automatically on every release (npm version, GitHub package version, downloads). No manual edits needed.
For the complete release history, see CHANGELOG.md.
🎯 Why You Need This
Pain point 1 — "My page is slow but I don't know why." You open PageSpeed Insights, get a wall of data, and still can't tell what to fix first. This MCP gives your AI assistant six focused workflows that cut through the noise: it identifies the exact render-blocking resources, the specific images wasting 2 MB, the third-party scripts eating 1.5 s of main-thread time — and ranks them by impact. Ask "why is my site slow?" and get a prioritized fix list, not a 40-metric dashboard.
Pain point 2 — "I ship performance regressions to production." Your team moves fast, deploys daily, and nobody runs a full Lighthouse audit before each merge. By the time someone notices the Core Web Vitals dropped, the regression is already live. This MCP lets any developer paste a URL into Claude/Cursor and get a complete audit — lab data, field data from real Chrome users (CrUX), element-level CLS/LCP debugging — in seconds. It's the difference between catching a regression at your desk and discovering it in a Slack message from the SEO team three days later.
✨ Features
Core Features
🚀 Performance Analysis of web pages using Google PageSpeed Insights
📱 Multi-platform Support: mobile and desktop devices
🔍 Detailed Lighthouse Reports with comprehensive metrics
📊 Simplified Reports with key performance indicators
🎯 Smart Recommendations with priority scoring and actionable fixes
💾 Intelligent Caching to reduce API calls and improve performance
🌍 Localization - support for multiple languages
⚡ Quick Installation - one command setup
🐳 Docker Support for containerized deployment
Advanced Analysis Tools (New!)
📸 Visual Analysis - Screenshots, filmstrip, and full-page captures
🎯 Element-Level Debugging - Find specific DOM elements causing issues
🌐 Network Waterfall - Detailed request timing and resource loading
⚡ JavaScript Profiling - Execution breakdown and unused code detection
🖼️ Image Optimization - Specific image issues with exact savings
🚫 Render-Blocking Analysis - Critical request chains and dependencies
🔌 Third-Party Impact - Script impact grouped by provider
📊 Full Audits - Complete Lighthouse audits for all categories
🚀 Quick Installation
Option 1: Automatic Installation (Recommended)
# Set environment variable
export GOOGLE_API_KEY=your-google-api-keycurl -sSL https://raw.githubusercontent.com/ruslanlap/pagespeed-insights-mcp/master/scripts/install.sh | bashThe installer uses the public npm package (pagespeed-insights-mcp) by default. To install the scoped GitHub Packages build instead, configure GitHub Packages authentication first and run:
curl -sSL https://raw.githubusercontent.com/ruslanlap/pagespeed-insights-mcp/master/scripts/install.sh | \
PAGESPEED_INSIGHTS_MCP_PACKAGE=@ruslanlap/pagespeed-insights-mcp bashOption 2: Via npm or GitHub Packages
From npm (Public Registry)
# Global installation from npm
npm install -g pagespeed-insights-mcp
# Or use without installation
npx pagespeed-insights-mcpFrom GitHub Packages
# First configure authentication (see GITHUB_PACKAGES.md for details)
# Then install globally
npm install -g @ruslanlap/pagespeed-insights-mcpNote: This package is available on both npm and GitHub Packages.
For npm: Use
npm install pagespeed-insights-mcpFor GitHub Packages: Use
npm install @ruslanlap/pagespeed-insights-mcp(requires GitHub authentication)For detailed instructions on installing from GitHub Packages, see GITHUB_PACKAGES.md or visit the GitHub Packages page
🔧 Configuration
The MCP server requires a Google API key to access the PageSpeed Insights API.
# Set environment variable
export GOOGLE_API_KEY=your-google-api-key
# Windows
$env:GOOGLE_API_KEY="your-google-api-key"
# Or pass directly when running
GOOGLE_API_KEY=your-google-api-key npx pagespeed-insights-mcp📝 MCP Configuration Examples
For Claude Desktop (with pino-pretty logging):
"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"
}
}For Codex (with pino-pretty logging):
[mcp_servers.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" }Note: These examples include
pino-prettyfor better log formatting. For production use without pretty logs, see the Logging section below.
Google Antigravity
Example configuration files are available in the examples directory.
Option 3: Docker
docker build -t pagespeed-insights-mcp .
docker run -e GOOGLE_API_KEY=your-key pagespeed-insights-mcp🔑 Getting Google API Key
To use this MCP server, you need a Google API key with the PageSpeed Insights API enabled.
⚡ Quick Setup Link: You can go directly to the Google Cloud Credentials Setup Page to quickly create a key in your project.
Step-by-Step Guide
Go to the Google Cloud Console (or use the Quick Setup Link).
Create a new project or select an existing one.
Enable PageSpeed Insights API:
Navigate to APIs & Services → Library.
Search for "PageSpeed Insights API" and click Enable.
Create an API key:
Go to APIs & Services → Credentials.
Click Create Credentials → API Key.
Copy the generated key and set it as
GOOGLE_API_KEYin your configuration.
⚙️ Claude Desktop Configuration
Config paths: macOS ~/Library/Application Support/Claude/claude_desktop_config.json · Windows %APPDATA%\Claude\claude_desktop_config.json · Linux ~/.config/claude/claude_desktop_config.json — see ⚙️ Client Configuration above for the JSON. Restart Claude Desktop after editing.
💻 Usage
After configuration, simply ask Claude any of these commands:
🔍 Full page analysis
Analyze the performance of https://example.com📱 Mobile device analysis
Analyze https://example.com for mobile devices with all categories⚡ Quick performance overview
Get a quick performance report for https://example.com🖥️ Desktop analysis
Analyze https://example.com performance for desktop devices🌐 Multi-category analysis
Perform a full audit of https://example.com including SEO, accessibility, and best practices🎯 Smart performance recommendations
Get smart recommendations for improving https://example.com performance💾 Cache management
Clear the cache to get fresh data for all subsequent requests📸 Visual analysis
Get visual analysis for https://example.com showing screenshots and loading timeline🎯 Element-level debugging
Show me which specific elements are causing performance issues on https://example.com🌐 Network waterfall analysis
Analyze the network requests and resource loading for https://example.com⚡ JavaScript performance
Get JavaScript execution breakdown for https://example.com🖼️ Image optimization opportunities
Show me which images need optimization on https://example.com🚫 Render-blocking resources
Find render-blocking resources on https://example.com🔌 Third-party script impact
Analyze third-party script impact on https://example.com performance📊 Full Lighthouse audit
Run a full audit including accessibility, SEO, and best practices for https://example.comAvailable Tools (v2)
Version 2 replaces the former 19 endpoint-shaped tools with six workflow tools. This is a breaking change: update MCP client prompts, saved tool calls, and integrations to use the names below. Every data-returning tool accepts responseFormat (markdown, default, or json) and returns MCP structuredContent.
Tool | Use it for |
| One-page Lighthouse health check, full report, recommendations, audit findings, or a Mermaid map ( |
| One focused investigation: |
| CrUX real-user Core Web Vitals for a |
| Compare two pages now, or compare one page with its saved baseline ( |
| Triage 1–10 pages with progress notifications when supported. |
| Clear this process's in-memory API cache after a deploy. |
Migration from v1
v1 tools | v2 replacement |
|
|
|
|
|
|
|
|
|
|
| Run |
Examples
{"url":"https://example.com","strategy":"mobile","report":"recommendations","responseFormat":"markdown"}{"url":"https://example.com","focus":"render-blocking","responseFormat":"json"}{"mode":"baseline","url":"https://example.com","strategy":"mobile","runs":3}Example
answer example from Claude Desktop with pagespeed-insights-mcp 🔥🔥🔥
Development
For better log formatting during development, it is recommended to install pino-pretty globally:
npm install -g pino-pretty# Development mode
npm run dev
# Build project
npm run build
# Run built server
npm startLogging / pino-pretty in MCP environments
This MCP server uses pino for logging and enables the pino-pretty transport when NODE_ENV=development.
If you just want it to work with minimal setup (Claude, Codex, etc.), set:
NODE_ENV=production GOOGLE_API_KEY=your-google-api-key npx pagespeed-insights-mcpor in your MCP config:
"pagespeed-insights": {
"command": "npx",
"args": ["pagespeed-insights-mcp"],
"env": {
"GOOGLE_API_KEY": "your-google-api-key-here",
"NODE_ENV": "production"
}
}If you want pretty logs in development via
npx, you can havenpxinstallpino-prettyalongside the server:
"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"
}
}Troubleshooting
"Google API key not provided"
Ensure the GOOGLE_API_KEY environment variable is set in your Claude Desktop configuration.
"PageSpeed Insights API error: 403"
Check if PageSpeed Insights API is enabled in your Google Cloud project.
"Invalid URL"
Ensure the URL includes the protocol — only http:// and https:// are accepted. Other schemes (file://, ftp://, javascript:, etc.) are rejected at the schema level.
Requirements
Node.js 20.19.0 or later (Node 18 is EOL since April 2025 and is no longer supported).
A Google API key with PageSpeed Insights and (optionally) Chrome UX Report APIs enabled.
Security
Please report security issues privately — do not open a public issue. See SECURITY.md for the disclosure policy and operator hardening notes.
Acknowledgments
Special thanks to @engmsaleh (Mohamed Saleh Zaied) for his significant contribution to the development of this project.
A very special thank you to @system-conf for their outstanding and invaluable contribution to the growth and development of this project. Your dedication, expertise, and continuous support have made a tremendous impact — this project wouldn't be where it is today without you. 🙏
License
Apache-2.0 — see LICENSE. Patents granted by contributors under the Apache License 2.0.
Support
For bug reports or feature requests, please create an issue in the repository.
Available Tools
6 toolspagespeed_analyze_batchAnalyze Multiple PagesARead-onlyIdempotent
Analyze 1–10 public URLs and return per-page results plus success/failure counts. Use pagespeed_analyze_page for one URL or pagespeed_compare_pages for a direct comparison. Example: triage the ten highest-traffic landing pages. Progress notifications are emitted when supported by the client.
| Name | Required | Description | Default |
|---|---|---|---|
| urls | Yes | One to ten public http(s) URLs. | |
| locale | No | BCP-47 locale such as en or uk-UA. | en |
| report | No | Per-page result detail. | summary |
| strategy | No | Lighthouse device profile. mobile is the default. | mobile |
| categories | No | Lighthouse categories to request. | |
| responseFormat | No | markdown is concise and readable; json is machine-readable and is also available as structuredContent. | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| tool | Yes | |
| result | Yes | |
| truncated | No | |
| truncationMessage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds meaningful context beyond annotations: it mentions progress notifications emitted when supported by the client and notes that results include success/failure counts. This gives the agent insight into execution behavior without contradicting annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, each earning its place: purpose is front-loaded, followed by sibling routing, a practical example, and a behavioral note about progress notifications. There is zero fluff or redundancy, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given six parameters with complete schema documentation, a robust output schema, and annotations covering safety (readOnly, idempotent, non-destructive), the description provides all necessary guidance for correct invocation. It covers usage, alternatives, an example, and a behavioral note—comprehensive for this tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for all six parameters, including units, defaults, and constraints. The tool description adds no additional parameter-level guidance, but since the schema fully documents semantics, the baseline of 3 is appropriate. The description's mention of '1–10 URLs' aligns with schema constraints but adds no new information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: analyze 1–10 public URLs and return per-page results plus success/failure counts. It distinguishes itself from sibling tools by explicitly naming pagespeed_analyze_page for a single URL and pagespeed_compare_pages for direct comparison, making selection unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit routing guidance: use pagespeed_analyze_page for one URL or pagespeed_compare_pages for direct comparison. It also includes a concrete example (triage ten highest-traffic landing pages) that grounds the tool in real usage, leaving no ambiguity about when to invoke it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pagespeed_analyze_pageAnalyze a Page with LighthouseARead-onlyIdempotent
Run a PageSpeed Insights Lighthouse analysis for one public 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. The Google API is contacted and results may be served from the local cache.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public http(s) URL, for example https://example.com/products. | |
| runs | No | Distinct measurements. Use 3–5 when you need a median and spread. | |
| locale | No | BCP-47 locale such as en or uk-UA. | en |
| report | No | Amount and shape of returned insight. | summary |
| strategy | No | Lighthouse device profile. mobile is the default. | mobile |
| categories | No | Lighthouse categories to request. | |
| responseFormat | No | markdown is concise and readable; json is machine-readable and is also available as structuredContent. | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| tool | Yes | |
| result | Yes | |
| truncated | No | |
| truncationMessage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark the tool read-only, idempotent, and non-destructive. The description adds that the Google API is contacted and results may come from a local cache, setting expectations about external dependency and possible staleness. No contradiction with the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences: purpose, report-mode guidance, a concrete example, and an external-behavior caveat. Each sentence earns its place, and the core purpose is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With a fully described schema, enums, annotations covering safety, and an output schema present, the only operational context an agent needs is report-mode selection and the external API/cache behavior — both provided. Nothing significant is missing for correct selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds meaning by mapping report enum values to intended use cases and giving a concrete example ('analyze a mobile product page and return the three most useful remediation steps'), which clarifies strategy and report selection beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Run a PageSpeed Insights Lighthouse analysis for one public page' — a specific verb, resource, and scope. Saying 'one public page' differentiates it from batch and compare siblings, and the list of report modes clarifies its capabilities further.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit decision rules for the report parameter ('summary for a health check', 'recommendations for a prioritized fix list'), which tells an agent which mode fits a goal. It does not mention sibling tools by name, but 'one public page' implies single-page scope versus batch analysis.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pagespeed_clear_cacheClear Local PageSpeed CacheAIdempotent
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| tool | Yes | |
| result | Yes | |
| truncated | No | |
| truncationMessage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the idempotentHint and destructiveHint annotations, the description adds valuable behavioral context: the cache is in-memory and process-local, later calls will contact Google again, and the tool does not alter the target website or remote data. This gives the agent a clear mental model of side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three compact sentences, each earning its place: the first states the action and effect, the second gives the recommended trigger, and the third clarifies safety and non-destructiveness. The most relevant information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with an output schema and no nested objects, the description fully covers what the agent needs to decide when to call it and what to expect. No critical behavioral or scoping details are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema description coverage is 100%, so there is nothing for the description to add about parameters. The baseline of 4 applies because the description correctly focuses on behavior instead.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Clear') and resource ('this server process's in-memory PageSpeed response cache'), and explicitly contrasts the scope with other tools. This clearly differentiates it from sibling analysis tools like pagespeed_analyze_page or pagespeed_get_field_data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives an explicit use case: use after a deploy when a cached result is stale. It also states what it does not do, preventing misuse. However, it does not name specific alternatives or explicitly state when not to use it, leaving a small gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pagespeed_compare_pagesCompare Pages or a Stored BaselineADestructive
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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public http(s) URL, for example https://example.com/products. | |
| mode | Yes | pages compares url and against; baseline compares url to its saved measurement. | |
| runs | No | Use 2–5 for baseline mode; 3 is recommended. | |
| against | No | Second URL, required when mode=pages. | |
| strategy | No | Device profile; part of baseline identity. | mobile |
| categories | No | Lighthouse categories to request. | |
| responseFormat | No | markdown is concise and readable; json is machine-readable and is also available as structuredContent. | markdown |
| replaceBaseline | No | Only baseline mode: overwrite the local stored baseline. |
Output Schema
| Name | Required | Description |
|---|---|---|
| tool | Yes | |
| result | Yes | |
| truncated | No | |
| truncationMessage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the destructiveHint annotation, the description discloses that baseline mode records the first call, warns to rely on guaranteed deltas rather than medians alone, and states that replaceBaseline overwrites local baseline state. This is meaningful behavioral transparency beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with no wasted words: the first states the core purpose, the second gives operational guidance, and the third provides examples and the destructive state-change warning. The structure is front-loaded and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 8-parameter tool with full schema descriptions and an output schema, the description covers the key operational nuances: mode selection, first-call baseline behavior, run counts, examples, and state overwriting. Nothing critical for correct invocation is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds value by explaining the behavioral semantics of baseline mode's first call and why runs=3 or more is recommended, rather than merely repeating schema defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Compare two pages now' or 'measure one page against its locally stored baseline.' It clearly distinguishes the two modes and gives concrete examples, making the tool's purpose distinct from sibling tools like pagespeed_analyze_page.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explains when to use pages versus baseline mode and provides practical examples such as comparing staging against production or verifying a deployed fix. It does not explicitly name sibling alternatives or exclusions, but the contexts are clear enough to route an agent correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pagespeed_diagnose_pageDiagnose a Page Performance ProblemARead-onlyIdempotent
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 rather than a full Lighthouse dump.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public http(s) URL, for example https://example.com/products. | |
| focus | Yes | The single diagnostic lens to return. | |
| strategy | No | Lighthouse device profile. mobile is the default. | mobile |
| responseFormat | No | markdown is concise and readable; json is machine-readable and is also available as structuredContent. | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| tool | Yes | |
| result | Yes | |
| truncated | No | |
| truncationMessage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, covering safety and side-effect expectations. The description adds a meaningful behavioral constraint: 'exactly one diagnostic lens' and 'Returns focused evidence rather than a full Lighthouse dump', which aligns with and enriches the annotation profile. No contradiction exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences of dense, useful information with zero fluff. It front-loads the core purpose, states the usage condition, and embeds a practical example in the same breath. Every sentence earns its place, making it highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that there is a full input schema, an output schema is present (per context), and annotations cover safety and idempotence, the description provides everything an agent needs to decide and invoke correctly: what it does, when to use it (vs. analyze), when not to, and a working example. Nothing essential is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all four parameters are fully documented in the schema itself (baseline 3). The description adds value by providing a concrete example ('focus=render-blocking to identify CSS/JS delaying first render') that clarifies the practical meaning of the focus parameter beyond its enum listing, which justifies a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Inspect') and resource ('one page') with a defined scope ('exactly one diagnostic lens'), and explicitly distinguishes itself from pagespeed_analyze_page by saying 'do not use it for a general score'. It also lists the available lenses, making the tool's purpose unambiguous and well-differentiated from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use guidance: 'Use after pagespeed_analyze_page identifies a problem' and when-not-to-use: 'do not use it for a general score'. It even provides a concrete example (focus=render-blocking) to illustrate proper invocation, which is more than most tool descriptions offer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pagespeed_get_field_dataGet Chrome UX Report Field DataARead-onlyIdempotent
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. Example: check mobile LCP and INP for https://example.com/checkout. Returns p75 field metrics or a clear no-data result.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public http(s) URL, for example https://example.com/products. | |
| scope | No | page queries one URL; origin aggregates every page on the origin. | page |
| formFactor | No | CrUX device segment. ALL is valid only for scope=origin. | PHONE |
| responseFormat | No | markdown is concise and readable; json is machine-readable and is also available as structuredContent. | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| tool | Yes | |
| result | Yes | |
| truncated | No | |
| truncationMessage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, openWorld, idempotent, and non-destructive behavior; the description adds meaningful behavioral context by stating that it returns p75 field metrics or a clear no-data result, and by clarifying real-user field data rather than lab measurements. It does not mention rate limits or auth, but the annotations cover the safety profile.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences carry distinct information: purpose, parameter guidance, example, and return behavior. Every sentence earns its place, and the most important scoping guidance is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an idempotent, read-only tool with a complete input schema and an output schema, the description covers the key decisions an agent must make: which URL/origin to query, what kind of metrics to expect, and what happens when no data exists. Nothing critical is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by explaining when to choose page vs origin, specifically mentioning insufficient traffic, and by giving a concrete mobile LCP/INP example that helps ground the formFactor and metric concepts.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: get real-user Core Web Vitals from Chrome UX Report. It also explicitly distinguishes itself from Lighthouse lab measurements, which sets it apart from sibling analysis tools without needing to inspect their schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives concrete selection guidance for scope: page for one URL, origin for a bare origin when page traffic is insufficient. It also clarifies that this is not Lighthouse lab data, but it does not name a specific sibling tool like pagespeed_analyze_page as the lab alternative, so the routing is clear but not fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
25 tool updates
v2.0.0- Removed
analyze_page_speed - Removed
batch_analyze - Removed
clear_cache - Removed
compare_baseline - Removed
compare_pages - Removed
crux_summary - Removed
full_report - Removed
get_element_analysis - Removed
get_full_audit - Removed
get_image_optimization_details - Removed
get_javascript_analysis - Removed
get_network_analysis - Removed
get_origin_crux - Removed
get_performance_map - Removed
get_performance_summary - Removed
get_recommendations - Removed
get_render_blocking_details - Removed
get_third_party_impact - Removed
get_visual_analysis - Added
pagespeed_analyze_batch - Added
pagespeed_analyze_page - Added
pagespeed_clear_cache - Added
pagespeed_compare_pages - Added
pagespeed_diagnose_page - Added
pagespeed_get_field_data
15 tool updates
v1.7.4- Changed
analyze_page_speed2 fields changed- added
Input schema / properties / runsAdded value: +{ + "default": 1, + "description": "Distinct analyses to run (default 1). >1 reports the median with min-max spread; cached replays (same fetchTime) are dropped and counted", + "maximum": 5, + "minimum": 1, + "type": "integer" +} - changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
batch_analyze1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
compare_pages1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
full_report2 fields changed- added
Input schema / properties / runsAdded value: +{ + "default": 1, + "description": "Distinct analyses to run (default 1). >1 reports the median with min-max spread; cached replays (same fetchTime) are dropped and counted", + "maximum": 5, + "minimum": 1, + "type": "integer" +} - changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_element_analysis1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_full_audit1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_image_optimization_details1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_javascript_analysis1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_network_analysis1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_performance_map1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_performance_summary1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_recommendations2 fields changed- added
Input schema / properties / runsAdded value: +{ + "default": 1, + "description": "Distinct analyses to run (default 1). >1 reports the median with min-max spread; cached replays (same fetchTime) are dropped and counted", + "maximum": 5, + "minimum": 1, + "type": "integer" +} - changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_render_blocking_details1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_third_party_impact1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
- Changed
get_visual_analysis1 field changed- changed
Input schema / properties / strategy / descriptionPrevious value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
16 tool updates
v1.7.0- Changed
analyze_page_speed1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
batch_analyze1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Added
compare_baseline - Changed
compare_pages1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
full_report1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_element_analysis1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_full_audit1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_image_optimization_details1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_javascript_analysis1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_network_analysis1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_performance_map1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_performance_summary1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_recommendations1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_render_blocking_details1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_third_party_impact1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
- Changed
get_visual_analysis1 field changed- changed
Input schema / properties / strategy / enumPrevious value: -[ - "mobile", - "desktop" -]New value: +[ + "mobile", + "desktop", + "both" +]
1 tool update
v1.5.0- Added
get_origin_crux
1 tool update
v1.4.0- Added
get_performance_map
3 tool updates
v1.2.7- Added
get_javascript_analysis - Added
get_network_analysis - Added
get_third_party_impact
3 tool updates
v1.2.6- Removed
get_javascript_analysis - Removed
get_network_analysis - Removed
get_third_party_impact
16 tool updates
v1.2.2- First observed
analyze_page_speed - First observed
batch_analyze - First observed
clear_cache - First observed
compare_pages - First observed
crux_summary - First observed
full_report - First observed
get_element_analysis - First observed
get_full_audit - First observed
get_image_optimization_details - First observed
get_javascript_analysis - First observed
get_network_analysis - First observed
get_performance_summary - First observed
get_recommendations - First observed
get_render_blocking_details - First observed
get_third_party_impact - First observed
get_visual_analysis
TDQS
Each tool has a distinct workflow: single-page analysis, batch analysis, focused diagnostics, field data, comparisons/baselines, and cache control. The only mild overlap is between analyze_page with audit/recommendation reports and diagnose_page, but the descriptions explicitly position diagnose as a follow-up for specific problem areas.
All tools share a consistent pagespeed_ prefix followed by a clear verb_noun pattern: analyze_page, diagnose_page, get_field_data, compare_pages, analyze_batch, clear_cache. The naming is predictable, uniform, and makes the action and target easy to infer.
Six tools is a well-scoped set for a PageSpeed Insights server. Each tool covers a meaningful part of the workflow without redundancy or bloat, and the count feels appropriate for both simple and more advanced performance analysis tasks.
The tool surface covers the core domain well: single and batch Lighthouse analysis, targeted diagnostics, real-user field data, comparison/baselining, and cache management. There are no obvious dead ends or missing operations that would prevent an agent from completing a typical PageSpeed investigation.
Maintenance
Related MCP Connectors
- RampifyOAuthdev.rampify
SEO MCP server: crawl your site, find AI-visibility gaps, and ship the fix from your coding agent.
Marketo MCP server for AI. 130 tools to operate Marketo from Claude, Cursor, or ChatGPT.
Cloudflare Workers MCP server: api-perf-analyzer
Pay-per-call AI evaluation MCP server. Score LLM outputs against benchmark rubrics via Workers AI.
Related MCP Servers
- AlicenseAqualityDmaintenanceCore Web Vitals analysis powered by Lighthouse. Four tools: analyze a URL, compare two URLs, check against thresholds, or crawl an entire site. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible AI tool.420MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server that wraps the Google PageSpeed Insights API to analyse web performance, providing tools for scores, Core Web Vitals, opportunities, diagnostics, and batch analysis.-
- AlicenseNot gradedqualityCmaintenanceThis MCP server integrates Google PageSpeed Insights to analyze website performance, accessibility, best practices, SEO, and PWA on mobile and desktop, returning detailed audits and optimization opportunities.MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that pulls PageSpeed Insights and Google Search Console data across multiple owned sites, enabling cross-site performance reports and synthesis via Claude.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ruslanlap/pagespeed-insights-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server