Pagespeed

Provides real-time PageSpeed Insights analysis for webpages via an MCP tool interface.
  • typescript

0

GitHub Stars

typescript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mcp-mirror-enemyrr_mcp-server-pagespeed": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-server-pagespeed/build/index.js"
      ]
    }
  }
}

You have a dedicated MCP server that provides Google PageSpeed Insights analysis, enabling you to perform standardized web performance checks for any URL. This server exposes a tool to analyze pages and returns actionable metrics and optimization suggestions, helping you build smarter AI-assisted workflows around performance data.

How to use

To analyze a webpage, invoke the analyze_pagespeed tool on the pagespeed server from your MCP client. You specify the server name, the tool name, and the target URL. The tool returns a performance score, loading experience metrics, and the top improvement suggestions.

Example usage pattern (conceptual): use the pagespeed analyze_pagespeed tool with the target URL you want to evaluate. You should receive: a total performance score (0-100), loading metrics such as First Contentful Paint and First Input Delay, and a list of five improvement ideas with their potential impact and current values.

For reference, a typical tool invocation resembles the following structure in your MCP client: a request to the pagespeed server with tool name analyze_pagespeed and arguments including the target URL.

Code example (TypeScript) you can adapt in your client to call the tool via MCP:

```ts
use_mcp_tool({
  server_name: "pagespeed",
  tool_name: "analyze_pagespeed",
  arguments: {
    url: "https://example.com"
  }
});

This code triggers the analysis for the specified URL and returns the structured results.

## How to install

Prerequisites: you need Node.js and npm installed on your system to build and run the MCP server.

Step 1: Clone the project

git clone https://github.com/enemyrr/mcp-server-pagespeed.git

Step 2: Install dependencies

cd mcp-server-pagespeed
npm install

Step 3: Build the server

npm run build

Step 4: Run the server directly via MCP command (stdio mode)

npx mcp-server-pagespeed

Note: If you are integrating with a specific editor or client, you can also add the server by pointing to the built index via a Node run command once the build is complete.

Step 5: If you are configuring an editor integration, you may provide a full path to the built entry point. For example:

node /absolute/path/to/mcp-server-pagespeed/build/index.js

Replace /absolute/path/to/ with the actual path where you built the project.

## Additional configuration and notes

The server is designed to work with MCP clients that issue a tool call to analyze a webpage using Google PageSpeed Insights. It emphasizes real-time performance analysis, loading experience metrics, and prioritized optimization suggestions, with robust error handling for invalid URLs or API failures.

Environment and deployment notes: there are no extra environment variables shown for runtime beyond what you provide in your client calls. If you choose to run the server in a broader deployment, you can manage you own environment configuration as needed for your hosting setup.

Troubleshooting tips: ensure the built server index is accessible and that your MCP client uses the correct server name (pagespeed) and tool name (analyze\_pagespeed). If the server fails to start, verify Node.js and npm versions are compatible with the project requirements and that dependencies are installed correctly.

## Available tools

### analyze\_pagespeed

Analyze a webpage using Google PageSpeed Insights API. Returns overall score, loading metrics, and top optimization suggestions.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational