@pipeworx/mcp-chrome-ux-report 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/bin/cli.js +17 -0
- package/package.json +32 -0
- package/server.json +18 -0
- package/src/index.ts +1047 -0
- package/src/server.ts +45 -0
- package/tsconfig.json +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mojibake Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# @pipeworx/chrome-ux-report
|
|
2
|
+
|
|
3
|
+
Real-user Core Web Vitals for any site with enough traffic, from Google's Chrome
|
|
4
|
+
UX Report — the 75th-percentile Largest Contentful Paint, Interaction to Next
|
|
5
|
+
Paint and Cumulative Layout Shift that actual Chrome visitors experienced over
|
|
6
|
+
the trailing 28 days, plus the distribution behind each number and ~40 weeks of
|
|
7
|
+
history.
|
|
8
|
+
|
|
9
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1679+ live data sources.
|
|
10
|
+
|
|
11
|
+
This is the field dataset Google Search uses for its Core Web Vitals assessment,
|
|
12
|
+
so it answers "is this site passing Core Web Vitals" — which no lab tool,
|
|
13
|
+
Lighthouse included, can.
|
|
14
|
+
|
|
15
|
+
## Tools
|
|
16
|
+
|
|
17
|
+
- `crux_query_origin(origin, form_factor?, metrics?)` — the whole site.
|
|
18
|
+
- `crux_query_url(url, form_factor?, metrics?)` — one page.
|
|
19
|
+
- `crux_history(origin? | url?, form_factor?, metrics?)` — ~40 weekly points.
|
|
20
|
+
|
|
21
|
+
## Auth
|
|
22
|
+
|
|
23
|
+
BYO with platform fallback: `_apiKey`, or `PLATFORM_GOOGLE_API_KEY` when that
|
|
24
|
+
secret is set on the gateway. **There is no keyless path** — the API answers an
|
|
25
|
+
unkeyed request with HTTP 403 "Method doesn't allow unregistered callers".
|
|
26
|
+
|
|
27
|
+
A key is free, instant and self-service, with **no billing account required**:
|
|
28
|
+
create one at <https://console.cloud.google.com/apis/credentials> and enable the
|
|
29
|
+
Chrome UX Report API at
|
|
30
|
+
<https://console.cloud.google.com/apis/library/chromeuxreport.googleapis.com>.
|
|
31
|
+
Quota is 150 queries/minute.
|
|
32
|
+
|
|
33
|
+
The same `PLATFORM_GOOGLE_API_KEY` serves the `pagespeed-insights` pack: one
|
|
34
|
+
Google Cloud key with both APIs enabled covers both.
|
|
35
|
+
|
|
36
|
+
## Data sources
|
|
37
|
+
|
|
38
|
+
- `https://chromeuxreport.googleapis.com/v1/records:queryRecord`
|
|
39
|
+
- `https://chromeuxreport.googleapis.com/v1/records:queryHistoryRecord`
|
|
40
|
+
|
|
41
|
+
## Traps, verified live 2026-09-17
|
|
42
|
+
|
|
43
|
+
- **The three credential failures look nothing alike.** Missing key → HTTP 403
|
|
44
|
+
`PERMISSION_DENIED` "Method doesn't allow unregistered callers". Wrong key →
|
|
45
|
+
HTTP 400 `INVALID_ARGUMENT` "API key not valid". Key whose project has not
|
|
46
|
+
enabled the API → a third shape (`SERVICE_DISABLED`). Collapsing them into
|
|
47
|
+
"auth failed" sends the caller after the wrong problem; each is reported
|
|
48
|
+
separately.
|
|
49
|
+
- **`origin` and `url` are different questions and exactly one may be sent.**
|
|
50
|
+
Both together is a 400. An origin must have no path.
|
|
51
|
+
- **HTTP 404 is the normal answer for most of the web.** CrUX only publishes a
|
|
52
|
+
page or origin once it has enough opted-in Chrome traffic to be statistically
|
|
53
|
+
sound and non-identifying. That is the dataset's answer, not an outage, and
|
|
54
|
+
this pack returns it as `found: false, reason: "insufficient_traffic"`. A URL
|
|
55
|
+
can be absent while its origin is present. Narrower form factors have
|
|
56
|
+
separate, higher thresholds.
|
|
57
|
+
- **The headline number is p75, not the mean.** Search assesses at the 75th
|
|
58
|
+
percentile; averaging the histogram gives a different, wrong number.
|
|
59
|
+
- **CLS is unitless; every other metric is milliseconds.** CrUX returns CLS p75
|
|
60
|
+
as a decimal *string* while timings are integers. (The PageSpeed Insights API
|
|
61
|
+
returns the same metric as an integer ×100 — the two Google APIs disagree on
|
|
62
|
+
the encoding of the same number.)
|
|
63
|
+
- **`crux_history` points are 28-day trailing windows.** Consecutive weekly
|
|
64
|
+
points overlap by 27 days, so a move in the series is a move in a rolling
|
|
65
|
+
average and a one-week regression shows up damped across four points.
|
|
66
|
+
|
|
67
|
+
## Quick Start
|
|
68
|
+
|
|
69
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"chrome-ux-report": {
|
|
75
|
+
"url": "https://gateway.pipeworx.io/chrome-ux-report/mcp"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### What this endpoint actually serves
|
|
82
|
+
|
|
83
|
+
`tools/list` at `https://gateway.pipeworx.io/chrome-ux-report/mcp` returns the tools in the table
|
|
84
|
+
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
|
|
85
|
+
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
|
|
86
|
+
gateway-wide set. So the tool count you see is larger than this table: a
|
|
87
|
+
single-pack endpoint currently lists roughly 30 shared tools alongside the
|
|
88
|
+
pack's own. The connection's `initialize` response states its exact scope, and
|
|
89
|
+
is the authoritative answer for a given day.
|
|
90
|
+
|
|
91
|
+
This is deliberate, not multiplexing by accident. The meta-tools are what let a
|
|
92
|
+
scoped connection answer a question this pack does not cover — via
|
|
93
|
+
`ask_pipeworx`, which routes across the whole catalog — without you adding a
|
|
94
|
+
second MCP server. There is currently no way to mount a pack endpoint without
|
|
95
|
+
them; if the extra schemas cost you more context than the routing is worth,
|
|
96
|
+
connect to the full gateway once rather than to several pack endpoints.
|
|
97
|
+
|
|
98
|
+
Or connect to the full Pipeworx gateway to get every pack's tools listed
|
|
99
|
+
directly, instead of just this one's:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"pipeworx": {
|
|
105
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Both URLs reach the same gateway and the same 1679+ data sources. The
|
|
112
|
+
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
|
|
113
|
+
reaches all of them from either one.
|
|
114
|
+
|
|
115
|
+
## No MCP client? Call it over HTTP
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
curl -X POST https://gateway.pipeworx.io/v1/tools/crux_query_origin \
|
|
119
|
+
-H 'Content-Type: application/json' \
|
|
120
|
+
-d '{"origin":"https://www.shopify.com"}'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/crux_query_origin`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
|
|
124
|
+
|
|
125
|
+
## Standalone (no gateway account)
|
|
126
|
+
|
|
127
|
+
This package also runs as a local stdio MCP server — no Pipeworx account, no
|
|
128
|
+
gateway round-trip:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcpServers": {
|
|
133
|
+
"chrome-ux-report": {
|
|
134
|
+
"command": "npx",
|
|
135
|
+
"args": ["-y", "@pipeworx/mcp-chrome-ux-report"]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Or run it directly to confirm it starts:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npx -y @pipeworx/mcp-chrome-ux-report
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
|
|
148
|
+
for **only** this pack's tools — none of the shared meta-tools the gateway
|
|
149
|
+
connection above adds. Same source, same tools, no ask_pipeworx routing.
|
|
150
|
+
|
|
151
|
+
## Using with ask_pipeworx
|
|
152
|
+
|
|
153
|
+
Instead of calling tools directly, you can ask questions in plain English —
|
|
154
|
+
this works on the pack endpoint above as well as on the full gateway:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
ask_pipeworx({ question: "your question about Chrome Ux Report data" })
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
161
|
+
|
|
162
|
+
## More
|
|
163
|
+
|
|
164
|
+
- [Docs and guides](https://pipeworx.io/docs)
|
|
165
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
166
|
+
|
|
167
|
+
## License
|
|
168
|
+
|
|
169
|
+
MIT
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
//
|
|
3
|
+
// Entry point for `npx @pipeworx/mcp-<slug>`.
|
|
4
|
+
//
|
|
5
|
+
// Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
|
|
6
|
+
// tsx sidesteps every extensionless-import / bare-JSON-import edge case a
|
|
7
|
+
// per-pack tsc build would have to solve one pack at a time). This file
|
|
8
|
+
// registers tsx's ESM loader programmatically, then hands off to src/server.ts,
|
|
9
|
+
// which wraps the pack's {tools, callTool} export in a stdio MCP server.
|
|
10
|
+
//
|
|
11
|
+
// Copied verbatim into every published pack repo by scripts/publish-pack.sh —
|
|
12
|
+
// edit this file, not a per-pack copy.
|
|
13
|
+
import { register } from 'tsx/esm/api';
|
|
14
|
+
|
|
15
|
+
register();
|
|
16
|
+
|
|
17
|
+
await import('../src/server.ts');
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeworx/mcp-chrome-ux-report",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Real-user Core Web Vitals for any website with enough traffic, from Google's Chrome UX Report — the field measurements Google Search itself uses.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"mcp-chrome-ux-report": "bin/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "chrome-ux-report"],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/pipeworx-io/mcp-chrome-ux-report.git"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"typecheck": "tsc --noEmit"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
22
|
+
"tsx": "^4.19.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5.9.3",
|
|
26
|
+
"@cloudflare/workers-types": "^4.20260405.1"
|
|
27
|
+
},
|
|
28
|
+
"pipeworx": {
|
|
29
|
+
"sourceHash": "v1-c533f89d149f36d8933eb8f7a8a4831a1f031de99a5f8ab59d9ad9b9bc1a0efa",
|
|
30
|
+
"sourceCommit": "839ab210d969ef7f822cd747ea516f6bb49e9231"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.pipeworx-io/chrome-ux-report",
|
|
4
|
+
"title": "Chrome Ux Report",
|
|
5
|
+
"description": "Real-user Core Web Vitals for any website with enough traffic, from Google's Chrome UX Report…",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/chrome-ux-report",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-chrome-ux-report",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/chrome-ux-report/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|