Get the FREE Ultimate OpenClaw Setup Guide →

mcp -pagespeed

MCP server from enemyrr/mcp-server-pagespeed

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio enemyrr-mcp-server-pagespeed node /absolute/path/to/mcp-server-pagespeed/build/index.js

How to use

This MCP server provides Google PageSpeed Insights analysis through the MCP interface. It exposes a tool named analyze_pagespeed that, when invoked, queries the PageSpeed Insights API for the given URL and returns a structured set of results including the overall performance score, loading experience metrics (such as First Contentful Paint and First Input Delay), and the top five improvement suggestions with details like title, description, potential impact, and current value. You can deploy and run the server locally via Node.js, and then interact with it from your AI model or your MCP client using the standard tool invocation pattern.

To use the server, first start it (for example by running the built index.js with Node). Then call the analyze_pagespeed tool through your MCP client or the provided use_mcp_tool helper format, supplying the target URL. The tool will respond with a structured payload containing the performance score, metrics, and actionable recommendations to optimize the page. This makes it easy for AI agents to reason about webpage performance and propose concrete optimizations within a consistent interface.

How to install

Prerequisites:

Installation steps:

  1. Clone the repository: git clone https://github.com/enemyrr/mcp-server-pagespeed.git cd mcp-server-pagespeed

  2. Install dependencies: npm install

  3. Build the project (if applicable): npm run build

  4. Run the server locally (example): npx mcp-server-pagespeed

Notes:

  • The server is implemented as a Node.js application. If you prefer to run the built bundle directly, ensure the path to build/index.js is correct in your mcp_config.
  • The Cursor IDE setup in the repository README shows how to register the server using the built index.js path.

Additional notes

Tips and common issues:

  • Ensure you run npm install in the project root to fetch dependencies before building or running.
  • If you encounter API rate limits with Google PageSpeed Insights, consider using an API key or scheduling requests to avoid bursts that trigger limits.
  • When deploying in a container or remote environment, adjust environment variables as needed (e.g., API keys or rate limit settings if your build includes such options).
  • The MCP interface exposes analyze_pagespeed as the primary tool. If you extend functionality, follow the same tool invocation pattern (server_name: pagespeed, tool_name: analyze_pagespeed) and pass arguments in a structured object.
  • If you change the server path, update the mcp_config accordingly so the runtime can locate the server entry point.

Related MCP Servers

Sponsor this space

Reach thousands of developers