Skip to main content
Glama
ruslanlap

PageSpeed Insights MCP Server

PageSpeed Insights MCP Server

Buy Me A Coffee

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)

npm version npm downloads MCP Toplist Glama MCP

GitHub Package Version CI Documentation Live Demo License: Apache-2.0

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-pretty package is required for proper log formatting. The above configurations ensure it is installed automatically via npx.

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-5 for 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 run mkdocs serve locally.

📝 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

# Set environment variable
export GOOGLE_API_KEY=your-google-api-key
curl -sSL https://raw.githubusercontent.com/ruslanlap/pagespeed-insights-mcp/master/scripts/install.sh | bash

The 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 bash

Option 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-mcp

From GitHub Packages

# First configure authentication (see GITHUB_PACKAGES.md for details)
# Then install globally
npm install -g @ruslanlap/pagespeed-insights-mcp

Note: This package is available on both npm and GitHub Packages.

  • For npm: Use npm install pagespeed-insights-mcp

  • For 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-pretty for 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.

TIP

⚡ 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

  1. Go to the Google Cloud Console (or use the Quick Setup Link).

  2. Create a new project or select an existing one.

  3. Enable PageSpeed Insights API:

    • Navigate to APIs & ServicesLibrary.

    • Search for "PageSpeed Insights API" and click Enable.

  4. Create an API key:

    • Go to APIs & ServicesCredentials.

    • Click Create CredentialsAPI Key.

    • Copy the generated key and set it as GOOGLE_API_KEY in 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.com

Available 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

pagespeed_analyze_page

One-page Lighthouse health check, full report, recommendations, audit findings, or a Mermaid map (report).

pagespeed_diagnose_page

One focused investigation: visual, elements, network, javascript, images, render-blocking, or third-parties.

pagespeed_get_field_data

CrUX real-user Core Web Vitals for a page or origin.

pagespeed_compare_pages

Compare two pages now, or compare one page with its saved baseline (mode).

pagespeed_analyze_batch

Triage 1–10 pages with progress notifications when supported.

pagespeed_clear_cache

Clear this process's in-memory API cache after a deploy.

Migration from v1

v1 tools

v2 replacement

analyze_page_speed, get_performance_summary, get_recommendations, get_full_audit, get_performance_map

pagespeed_analyze_page with report=full, summary, recommendations, audit, or performance-map

get_visual_analysis, get_element_analysis, get_network_analysis, get_javascript_analysis, get_image_optimization_details, get_render_blocking_details, get_third_party_impact

pagespeed_diagnose_page with the matching focus

crux_summary, get_origin_crux

pagespeed_get_field_data with scope=page or origin

compare_pages, compare_baseline

pagespeed_compare_pages with mode=pages or baseline

batch_analyze, clear_cache

pagespeed_analyze_batch, pagespeed_clear_cache

full_report

Run pagespeed_analyze_page and pagespeed_get_field_data; lab and field data stay explicit rather than being mixed.

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 start

Logging / 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-mcp

or 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 have npx install pino-pretty alongside 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 tools
pagespeed_analyze_batchAnalyze Multiple PagesA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlsYesOne to ten public http(s) URLs.
localeNoBCP-47 locale such as en or uk-UA.en
reportNoPer-page result detail.summary
strategyNoLighthouse device profile. mobile is the default.mobile
categoriesNoLighthouse categories to request.
responseFormatNomarkdown is concise and readable; json is machine-readable and is also available as structuredContent.markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
toolYes
resultYes
truncatedNo
truncationMessageNo

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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 LighthouseA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesPublic http(s) URL, for example https://example.com/products.
runsNoDistinct measurements. Use 3–5 when you need a median and spread.
localeNoBCP-47 locale such as en or uk-UA.en
reportNoAmount and shape of returned insight.summary
strategyNoLighthouse device profile. mobile is the default.mobile
categoriesNoLighthouse categories to request.
responseFormatNomarkdown is concise and readable; json is machine-readable and is also available as structuredContent.markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
toolYes
resultYes
truncatedNo
truncationMessageNo

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 CacheA
Idempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
toolYes
resultYes
truncatedNo
truncationMessageNo

TDQS

A4.7/5.0
Behavior5/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 BaselineA
Destructive

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesPublic http(s) URL, for example https://example.com/products.
modeYespages compares url and against; baseline compares url to its saved measurement.
runsNoUse 2–5 for baseline mode; 3 is recommended.
againstNoSecond URL, required when mode=pages.
strategyNoDevice profile; part of baseline identity.mobile
categoriesNoLighthouse categories to request.
responseFormatNomarkdown is concise and readable; json is machine-readable and is also available as structuredContent.markdown
replaceBaselineNoOnly baseline mode: overwrite the local stored baseline.

Output Schema

ParametersJSON Schema
NameRequiredDescription
toolYes
resultYes
truncatedNo
truncationMessageNo

TDQS

A4.7/5.0
Behavior5/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 ProblemA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesPublic http(s) URL, for example https://example.com/products.
focusYesThe single diagnostic lens to return.
strategyNoLighthouse device profile. mobile is the default.mobile
responseFormatNomarkdown is concise and readable; json is machine-readable and is also available as structuredContent.markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
toolYes
resultYes
truncatedNo
truncationMessageNo

TDQS

A4.7/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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 DataA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesPublic http(s) URL, for example https://example.com/products.
scopeNopage queries one URL; origin aggregates every page on the origin.page
formFactorNoCrUX device segment. ALL is valid only for scope=origin.PHONE
responseFormatNomarkdown is concise and readable; json is machine-readable and is also available as structuredContent.markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
toolYes
resultYes
truncatedNo
truncationMessageNo

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 25 tool updatesv2.0.0
    • Removedanalyze_page_speed
    • Removedbatch_analyze
    • Removedclear_cache
    • Removedcompare_baseline
    • Removedcompare_pages
    • Removedcrux_summary
    • Removedfull_report
    • Removedget_element_analysis
    • Removedget_full_audit
    • Removedget_image_optimization_details
    • Removedget_javascript_analysis
    • Removedget_network_analysis
    • Removedget_origin_crux
    • Removedget_performance_map
    • Removedget_performance_summary
    • Removedget_recommendations
    • Removedget_render_blocking_details
    • Removedget_third_party_impact
    • Removedget_visual_analysis
    • Addedpagespeed_analyze_batch
    • Addedpagespeed_analyze_page
    • Addedpagespeed_clear_cache
    • Addedpagespeed_compare_pages
    • Addedpagespeed_diagnose_page
    • Addedpagespeed_get_field_data
  2. 15 tool updatesv1.7.4
    • Changedanalyze_page_speed2 fields changed
      • addedInput schema / properties / runs
        Added 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"
        +}
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedbatch_analyze1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedcompare_pages1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedfull_report2 fields changed
      • addedInput schema / properties / runs
        Added 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"
        +}
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_element_analysis1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_full_audit1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_image_optimization_details1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_javascript_analysis1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_network_analysis1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_performance_map1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_performance_summary1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_recommendations2 fields changed
      • addedInput schema / properties / runs
        Added 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"
        +}
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_render_blocking_details1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_third_party_impact1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
    • Changedget_visual_analysis1 field changed
      • changedInput schema / properties / strategy / description
        Previous value: -"Analysis strategy"New value: +"Device to simulate: mobile (default), desktop, or both"
  3. 16 tool updatesv1.7.0
    • Changedanalyze_page_speed1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedbatch_analyze1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Addedcompare_baseline
    • Changedcompare_pages1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedfull_report1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_element_analysis1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_full_audit1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_image_optimization_details1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_javascript_analysis1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_network_analysis1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_performance_map1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_performance_summary1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_recommendations1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_render_blocking_details1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_third_party_impact1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
    • Changedget_visual_analysis1 field changed
      • changedInput schema / properties / strategy / enum
        Previous value: -[
        -  "mobile",
        -  "desktop"
        -]New value: +[
        +  "mobile",
        +  "desktop",
        +  "both"
        +]
  4. 1 tool updatev1.5.0
    • Addedget_origin_crux
  5. 1 tool updatev1.4.0
    • Addedget_performance_map
  6. 3 tool updatesv1.2.7
    • Addedget_javascript_analysis
    • Addedget_network_analysis
    • Addedget_third_party_impact
  7. 3 tool updatesv1.2.6
    • Removedget_javascript_analysis
    • Removedget_network_analysis
    • Removedget_third_party_impact
  8. 16 tool updatesv1.2.2
    • First observedanalyze_page_speed
    • First observedbatch_analyze
    • First observedclear_cache
    • First observedcompare_pages
    • First observedcrux_summary
    • First observedfull_report
    • First observedget_element_analysis
    • First observedget_full_audit
    • First observedget_image_optimization_details
    • First observedget_javascript_analysis
    • First observedget_network_analysis
    • First observedget_performance_summary
    • First observedget_recommendations
    • First observedget_render_blocking_details
    • First observedget_third_party_impact
    • First observedget_visual_analysis

TDQS

A4.7/5.0
Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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

ActivityActive
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Core 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.
    4
    20
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    An 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.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    This 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
  • A
    license
    Not graded
    quality
    B
    maintenance
    An 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

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