Google CrUX MCP

v1.2.1
io.github.A1-x-Tech/mcp-google-crux Checked 1 day ago Published 1 month ago

Real-user Core Web Vitals from the Chrome UX Report (CrUX) API for any origin or URL.

Values you need

VariableWhat it is
CRUX_API_KEYrequired secret Google Cloud API key with the Chrome UX Report API enabled (sent as the key= query parameter). Treat it as a secret.
CRUX_API_BASEoptional API root host override. Default: https://chromeuxreport.googleapis.com
CRUX_TIMEOUT_MSoptional Per-request timeout in milliseconds. Default: 30000
CRUX_MAX_RETRIESoptional Retries on transient errors (429, 5xx, network). Default: 3

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add mcp-google-crux -e 'CRUX_API_KEY=<CRUX_API_KEY>' -- npx -y mcp-google-crux@1.2.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-google-crux": {
      "args": [
        "-y",
        "mcp-google-crux@1.2.1"
      ],
      "command": "npx",
      "env": {
        "CRUX_API_KEY": "<CRUX_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-google-crux": {
      "args": [
        "-y",
        "mcp-google-crux@1.2.1"
      ],
      "command": "npx",
      "env": {
        "CRUX_API_KEY": "<CRUX_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "CRUX_API_KEY",
      "id": "crux-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-google-crux": {
      "args": [
        "-y",
        "mcp-google-crux@1.2.1"
      ],
      "command": "npx",
      "env": {
        "CRUX_API_KEY": "${input:crux-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-google-crux]
command = "npx"
args = ["-y", "mcp-google-crux@1.2.1"]
env = { "CRUX_API_KEY" = "<CRUX_API_KEY>" }

For AI agents

  1. Ask the user for: CRUX_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_core_web_vitals, compare_form_factors, compare_origin_vs_url, get_cwv_trend, query_record, query_history_record.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json