Summary
The MCP server currently does not include the account_analytics:read OAuth scope, which is required to query RUM (Real User Monitoring) / Web Analytics data via the Cloudflare GraphQL Analytics API.
Use Case
I want to retrieve Web Vitals metrics (TTFB, FCP, LCP, etc.) from Cloudflare RUM using the GraphQL Analytics API through the MCP server. The relevant GraphQL dataset is rumPerformanceEventsAdaptiveGroups, which lives under the accounts node and requires the account_analytics:read scope.
Example query:
{
viewer {
accounts(filter: { accountTag: "<account_id>" }) {
rumPerformanceEventsAdaptiveGroups(
filter: { datetime_gt: "2025-01-01T00:00:00Z", datetime_lt: "2025-01-02T00:00:00Z" }
limit: 10
orderBy: [count_DESC]
) {
count
dimensions { requestPath }
quantiles { requestTimeP50 requestTimeP75 requestTimeP95 }
}
}
}
}
This currently fails with not authorized for that account because the OAuth token lacks the account_analytics:read scope.
Proposed Change
Add account_analytics:read to ALL_SCOPES in src/auth/scopes.ts:
// Analytics
'account_analytics:read': 'View account-level analytics including RUM and Web Analytics data',
This would enable the scope to be included in both the read-only and yolo templates automatically.
Summary
The MCP server currently does not include the
account_analytics:readOAuth scope, which is required to query RUM (Real User Monitoring) / Web Analytics data via the Cloudflare GraphQL Analytics API.Use Case
I want to retrieve Web Vitals metrics (TTFB, FCP, LCP, etc.) from Cloudflare RUM using the GraphQL Analytics API through the MCP server. The relevant GraphQL dataset is
rumPerformanceEventsAdaptiveGroups, which lives under theaccountsnode and requires theaccount_analytics:readscope.Example query:
{ viewer { accounts(filter: { accountTag: "<account_id>" }) { rumPerformanceEventsAdaptiveGroups( filter: { datetime_gt: "2025-01-01T00:00:00Z", datetime_lt: "2025-01-02T00:00:00Z" } limit: 10 orderBy: [count_DESC] ) { count dimensions { requestPath } quantiles { requestTimeP50 requestTimeP75 requestTimeP95 } } } } }This currently fails with
not authorized for that accountbecause the OAuth token lacks theaccount_analytics:readscope.Proposed Change
Add
account_analytics:readtoALL_SCOPESinsrc/auth/scopes.ts:This would enable the scope to be included in both the
read-onlyandyolotemplates automatically.