mcpField
G
Google CrUX MCP

Google CrUX MCP

Local
github.comData & Analytics0Updated 4w ago

About Google CrUX MCP

Google CrUX MCP gives AI apps real-user Core Web Vitals data from the Chrome UX Report. It supports device and origin-versus-page comparisons and historical trends, limited to public sites with sufficient traffic data.

Key features

  1. 01Assess Core Web Vitals
  2. 02Compare device measurements
  3. 03Compare origins and pages
  4. 04View 40-week trends
  5. 05Read latest and historical records
  6. 06Query real-user data only

Use cases

  1. 01Check whether a page passes Core Web Vitals
  2. 02Compare mobile and desktop metrics
  3. 03Compare a page with its origin average
  4. 04Review LCP, INP, and CLS trends

MCP support

As an MCP server, it exposes read-only tools for querying public CrUX data, including assessments, comparisons, and historical records.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"a1-x-tech-mcp-google-crux": {
"command": "npx",
"args": [
"-y",
"mcp-google-crux"
],
"env": {
"CRUX_API_KEY": "<CRUX_API_KEY>",
"CRUX_API_BASE": "<CRUX_API_BASE>",
"CRUX_TIMEOUT_MS": "<CRUX_TIMEOUT_MS>",
"CRUX_MAX_RETRIES": "<CRUX_MAX_RETRIES>"
}
}
}
}
Run commandnpx -y mcp-google-crux
Environment variables to set
CRUX_API_KEYSecretGoogle Cloud API key with the Chrome UX Report API enabled (sent as the key= query parameter). Treat it as a secret.
CRUX_API_BASEAPI root host override.
CRUX_TIMEOUT_MSPer-request timeout in milliseconds.
CRUX_MAX_RETRIESRetries on transient errors (429, 5xx, network).

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-google-crux1.1.0

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
urlstringNoA specific page URL, e.g. https://example.com/pricing/. Mutually exclusive with `origin`. Pass the final post-redirect URL (the API does not follow redirects); fragments and query params are stripped by the dataset. Single pages have fewer samples and often have no data — fall back to `origin` on a no_data result.
originstringNoSite origin — scheme + host only, e.g. https://example.com (no path, no trailing slash). Aggregates real-user data across ALL pages of the site. Mutually exclusive with `url`. http/https and www/non-www are distinct keys; use the canonical variant.
form_factorenumNoDevice class filter. Omit for the aggregated record across all devices. tablet traffic is tiny and usually has no data.phone | desktop | tablet

Details

From the project README

A1 Google CrUX MCP

English | Русский

npm Glama CI License: MIT

A1 Google CrUX MCP brings real-user Core Web Vitals data into an AI app. Check whether a public site or page passes LCP, INP and CLS, compare mobile with desktop, and see how the metrics changed over time.

It reads Google’s Chrome UX Report dataset — field data collected from Chrome users, not a synthetic speed test or a way to change your site.

  • 6 read-only tools. Core Web Vitals assessment, device comparison, origin-versus-page comparison, 40-week trend and raw latest or historical records.
  • Real-user data. It is the same CrUX field data used by PageSpeed Insights and Google’s Core Web Vitals signals.
  • Clear availability boundary. Only public origins and URLs with enough real-user traffic have data; no_data is a valid result.
  • Known quota cost. CrUX allows 150 queries per minute per project. Device comparison makes four API calls; origin-versus-page makes two.

Start with a read-only question:

Does https://example.com pass Core Web Vitals on mobile?

Connect the server · Explore use cases · Open technical documentation


See it work in a minute

You: Does https://example.com/pricing pass Core Web Vitals on mobile?

Assistant: Shows p75 LCP, INP and CLS, their good/needs-improvement/poor ratings and the overall result. Nothing changes.

You: Compare this page with the site average and show how mobile differs from desktop.

Assistant: Compares the origin and URL, then device groups and their traffic shares. All six tools read the public CrUX dataset only.

Contents

Quick start

You need Node.js 20+ and a Google Cloud API key with Chrome UX Report API enabled.

  1. Create a restricted API key.
  2. Add the server to your AI app.
  3. Ask the read-only question above.
Codex

In Settings → MCP servers, select Add server, choose STDIO, enter the command npx -y mcp-google-crux@latest and environment variables CRUX_API_KEY, then select Save and Restart.

codex mcp add google-crux --env CRUX_API_KEY=your_key -- npx -y mcp-google-crux@latest
codex mcp list

Codex MCP documentation

Claude Code
claude mcp add --env CRUX_API_KEY=your_key --transport stdio --scope user google-crux -- npx -y mcp-google-crux@latest
claude mcp list

Claude Code MCP documentation

Claude Desktop

The current official path is Settings → Extensions. For a custom desktop extension, open Advanced settings → Extension Developer → Install Extension…, select a .mcpb file and follow the prompts.

This repository currently publishes an npm stdio package and does not contain a .mcpb bundle. For Claude Desktop builds that still support local configuration, use the following JSON stdio configuration as a fallback:

{"mcpServers":{"google-crux":{"command":"npx","args":["-y","mcp-google-crux@latest"],"env":{"CRUX_API_KEY":"your_key"}}}}

In those builds, save it to ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows.

Claude Desktop MCP documentation

Cursor

Add {"mcpServers":{"google-crux":{"type":"stdio","command":"npx","args":["-y","mcp-google-crux@latest"],"env":{"CRUX_API_KEY":"your_key"}}}} to ~/.cursor/mcp.json on macOS/Linux or %USERPROFILE%\.cursor\mcp.json on Windows. Cursor MCP documentation

VS Code

Run MCP: Open User Configuration and add:

{"servers":{"google-crux":{"type":"stdio","command":"npx","args":["-y","mcp-google-crux@latest"],"env":{"CRUX_API_KEY":"${input:crux_api_key}"}}},"inputs":[{"type":"promptString","id":"crux_api_key","description":"Google Cloud API key","password":true}]}

Check it with MCP: List Servers. VS Code MCP documentation

What you can ask it to do

  • Does this public origin or URL pass Core Web Vitals?
  • Compare phone, desktop, tablet and all-device results.
  • Is this page faster or slower than the site average?
  • How did LCP, INP and CLS change during the last 25 weeks?
  • Show the raw CrUX histograms and percentiles for a technical review.

How to read CrUX data

CrUX reports a rolling 28-day window, updated daily. Historical data is weekly and updates on Mondays. The key value is p75: 75% of observed visits are at or below it. get_core_web_vitals interprets metric thresholds for you; raw record tools expose full histograms and density fractions.

No data does not mean the site is broken. It means Google has no sufficiently large public Chrome-user sample for that origin, URL or device group. Tablets and individual URLs often have no data.

Getting access

  1. In Google Cloud Console, create or select a project; no billing account is needed for CrUX.
  2. Enable the Chrome UX Report API.
  3. Create an API key in APIs & Services → Credentials.
  4. Restrict the key to Chrome UX Report API and pass it as CRUX_API_KEY.

The key is stored in the MCP client configuration and is sent in the API request URL, so treat it as a password.

Configuration

VariableRequiredDescription
CRUX_API_KEYYesGoogle Cloud key with Chrome UX Report API enabled.
CRUX_API_BASENoAPI base URL override.
CRUX_TIMEOUT_MSNoPer-request timeout; default 30000 ms.
CRUX_MAX_RETRIESNoRetries for 429, 5xx and network failures; default 3.

Data, limits and background work

  • Read-only public dataset. The server cannot alter sites, Search Console, CrUX records or Google rankings.
  • Quota-aware retries. It retries 429, 5xx and network errors with backoff. Keep compound comparisons in mind when budgeting the 150 queries per minute project quota.
  • No background monitoring. The server works only while called. If your AI app supports scheduled tasks, it can create a recurring performance report.
  • Anonymous telemetry. It sends installation and version data plus tool names, never API keys, queried URLs, results, arguments or prompts. Set ASKADS_TELEMETRY=0 to opt out.

Technical documentation

Support

Found a bug or need a scenario? Create an issue or write in Telegram.


Две Моны дают пять

You made it to the end!

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.