Get the FREE Ultimate OpenClaw Setup Guide →

Pagespeed

Pull pagespeed data using this MCP server.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio phialsbasement-pagespeed-mcp-server node path/to/mcp-pagespeed-server/dist/index.js \
  --env GOOGLE_API_KEY="<YOUR-API-KEY>"

How to use

The PageSpeed MCP Server extends your AI assistant with Google's PageSpeed Insights data, enabling it to analyze any URL for performance metrics, best practices, SEO results, and accessibility checks. It returns structured JSON containing lighthouse-style in-depth results, including metrics like FCP, LCP, TTI, CLS, TBT, TTFB, as well as audits across performance, accessibility, best-practices, and SEO categories. You can call the server through your MCP client by invoking the PageSpeed module (configured as the pagespeed server) and passing the target URL along with optional analysis options. Typical usage includes requesting a full performance analysis for a page to inform optimization decisions or to generate a performance report for a given site.

Usage scenarios include:

  • Basic analysis: analyze a URL with default settings to receive a comprehensive performance report.
  • Custom configuration: specify strategy (mobile or desktop), select categories, and locale to tailor the report to your needs. The server supports adjusting thresholds and focusing on particular aspects of the site (e.g., performance and accessibility).
  • Integration in AI workflows: embed the PageSpeed analysis into your assistant’s decision loop so it can provide actionable optimization recommendations alongside other context data.

How to install

Prerequisites:

  • Node.js (v14+ recommended) and npm installed on your machine or server
  • Access to the internet to fetch dependencies from npm
  • Optional: Smithery CLI if you want to install via Smithery for Claude Desktop integration

Step 1: Install the MCP server package

  • Manual installation (recommended for direct usage):
npm install pagespeed-mcp-server

Step 2: Build or run the server (if applicable)

  • If the project ships a build step, run:
npm run build
  • If you’re importing the server in an MCP architecture, ensure the entry point matches dist/index.js (or the built artifact you generate) and point your mcp config accordingly.

Step 3: Configure access (API keys)

  • Obtain a Google PageSpeed Insights API key and set it in your environment or configuration file where the MCP server reads environment variables. Example:
export GOOGLE_API_KEY=<YOUR-API-KEY>

Step 4: Start the server (if running standalone)

  • If you run the server directly, start with Node using your build output:
node path/to/mcp-pagespeed-server/dist/index.js

Optional Smithery installation:

  • If you want to install via Smithery for Claude Desktop, use:
npx -y @smithery/cli install mcp-pagespeed-server --client claude

This installs the Pagespeed MCP server client for Claude.

Additional notes

Notes and tips:

  • Ensure the GOOGLE_API_KEY is valid and has access to Google PageSpeed Insights API; monitor quotas to avoid rate limiting.
  • The MCP server returns rich JSON with lighthouse results; you can parse and present performance metrics, audits, and recommendations to users or AI models.
  • Typical environment variable to configure is GOOGLE_API_KEY; you can extend configuration to support additional parameters such as locale, strategy, and specific category filters depending on your integration.
  • If you encounter timeouts or memory issues, consider increasing Node.js memory limits or implementing retry logic with exponential backoff at the MCP client level.
  • When using custom options, you can specify: strategy (mobile or desktop), category (array of category strings), locale (e.g., en), and threshold (desired score targets for each category).

Related MCP Servers

Sponsor this space

Reach thousands of developers