Skip to main content
Glama
roblox-analytics-mcp

roblox-analytics-mcp

by Haydebug

roblox-analytics-mcp

一个本地 MCP 服务器,通过 Open Cloud Analytics Query API 为 AI 代理提供对您的 Roblox 体验分析数据的只读访问。

它公开了 API 支持的全部 168 个指标,涵盖 16 个类别——留存、参与度、变现、获取、性能、经济、漏斗、自定义事件、缩略图、匹配、数据存储、安全和广告——外加一层分析工具,将“我的游戏表现如何?”转化为一次调用。

为什么不直接调用 API

原始 API 难以驱动:

  • 指标名称、粒度和维度区分大小写,在运行时不可发现,并且每个无效组合都返回相同的模糊 400 / 2001。

  • 每个账户每分钟只有 30 次查询,因此一次浪费的调用代价高昂。

  • 大型查询返回 202 和一个需要轮询的路径。

  • 没有活动的存储桶会被省略,而不是返回为零,因此间隙是模糊的。

  • 漏斗步骤和产品 ID 必须先被发现,然后才能进行过滤。

此服务器处理了所有这些:它在花费查询之前根据捆绑的目录验证请求,在速率限制下自我调节,将长时间运行的操作跟踪到完成,明确报告缺失的存储桶而不是虚构零,并为您完成两阶段漏斗查找。

Related MCP server: Roblox Executor MCP

设置

npm install
npm run build
npm link          # optional, puts `roblox-analytics-mcp` on your PATH

在 Creator Dashboard 创建 API 密钥:

  1. 在 访问权限 下添加每个要查询的体验。

  2. 在 universe-analytics 系统下授予 universe.analytics:read 操作。

然后存储它:

roblox-analytics-mcp setup     # prompts for the key and an optional default universe
roblox-analytics-mcp test      # runs a live DAU query to confirm it works

存储的密钥优先于 ROBLOX_API_KEY 环境变量。

注册到 Claude Code

claude mcp add roblox-analytics -- node /absolute/path/to/AnalyticsMcp/dist/cli.js

工具

发现可查询的内容

工具

用途

list_metrics

浏览所有 168 个指标;按搜索、类别、支持的维度或粒度进行筛选。

describe_metric

完整定义:粒度、留存窗口、每个有效维度。

list_dimensions

所有 69 个维度以及每个维度支持的指标。

list_dimension_values

数据中的实际国家、产品 ID、漏斗名称或地点版本。

读取数据

工具

用途

query_metric

一个指标作为时间序列,包含汇总统计、异常值和覆盖率。

query_metrics

在相同范围内查询多个指标,在速率限制下进行节流。

get_analytics_operation

用于超时操作的逃生舱口。

分析

工具

用途

get_experience_overview

17 个关键 KPI 与上一期对比,并标记显著变化。

get_metric_report

主题包——变现、性能、获取、经济、安全、广告等。

breakdown_metric_by_segments

一个指标按它支持的每个维度切片,并排序。

compare_periods

两个任意时间窗口,每个序列的绝对和百分比变化。

analyze_funnel

发现漏斗和步骤 ID,然后报告每个步骤的流失和完成率。

上下文

工具

用途

get_universe_info

体验元数据以及公开统计(点赞、收藏、实时 CCU)。

get_public_game_stats

一次最多 50 个 universe。无需 API 密钥——也适用于竞争对手。

whoami

API 密钥属于谁,它可以读取什么,以及所有者的群组。

find_universes

按名称或创建者查找 universe ID——自己的账户和所有群组。

get_place_info

地点元数据,用于性能指标指向地点 ID 时。

set_default_universe

存储默认 universe 和可选别名。

get_server_status

密钥来源、默认 universe、缓存状态、目录大小、速率限制。

身份:服务器如何知道这些游戏属于谁

Open Cloud API 密钥对它们调用的端点来说是匿名的——没有分析响应会揭示调用者,也没有额外的密钥权限可以改变这一点。服务器通过一个单独的端点来解析身份:

POST https://apis.roblox.com/api-keys/v1/introspect   { "apiKey": "..." }

密钥在正文中传输,调用本身不需要任何作用域——任何有效的密钥都可以自省。它返回 authorizedUserId、密钥的作用域、是否启用且未过期,以及它覆盖哪些 universe(* 表示所有者可以访问的每个体验)。

该用户 ID 通过公共端点解锁其余部分:所有者的用户名、他们的个人体验以及他们所属的每个群组。群组扫描很重要——工作室作品通常位于开发者仅属于的群组下,因此仅个人账户的查找会完全错过真正的游戏。

whoami                                  → who owns this key, what can it read
find_universes { search: "party" }      → ranked matches across account + groups

群组列表缓存 6 小时(可通过 ROBLOX_ANALYTICS_CACHE_TTL_MINUTES 更改,使用 refresh: true 绕过)。冷扫描 40 个群组大约需要一分钟;热查找是即时的。缓存是按所有者进行的,因此只有被速率限制的群组列表会在下次重试。

任何无法读取的来源都会在 errors 中报告,而不是被丢弃——带有错误出现的空结果意味着扫描被节流,而不是创建者没有游戏。否则这两种状态看起来相同,混淆它们会产生自信的错误答案。

值得了解的事情

聚合是报告的,而不是假设的。 将一个月内的每日活跃用户相加并不能得到月度活跃用户——它会重复计算任何玩过两次的人。在 API 支持的地方,期间总计来自单个全范围查询(aggregation: "api-period-total");在不支持的地方,回退标记为 mean-of-buckets 或 sum-of-buckets,因此数字永远不会是匿名的。

sum 并不总是有意义的。 每个结果都带有 aggregationHint。对于比率、平均值和百分位数(ForwardD1Retention、ClientFpsP90、PayingUsersCVR),它读作 average-only——sum 字段是算术的,而不是信息。

间隙不是零。 API 会省略没有活动的存储桶。结果报告 missingBuckets 列表,而不是填充会拉低平均值的零。

时间是 UTC。 endTime 是排他的,默认为今天的 UTC 午夜,因此您只会得到完整的存储桶。传递 endTime: "now" 以包含部分当前日期。范围接受 RFC 3339、普通日期或相对简写(-30d、-12w、-6mo、today、yesterday),或使用 lastDays。

留存窗口不同。 标准指标保留 4 年;性能和稳定性指标仅保留 28 天。超出窗口的查询会在本地被拒绝,并显示最早可查询的时间戳。

Beta API。 Analytics Query API 处于测试阶段,其架构可能会更改。指标目录是从官方文档生成的——如果 Roblox 添加指标,请使用 npm run generate:catalog 刷新它。

开发

npm run build             # compile TypeScript
npm test                  # 6 suites: time, validation, query pipeline, reports, packs, MCP protocol
npm run generate:catalog  # regenerate src/catalog.ts from the Roblox docs

测试为面向 API 的套件模拟了 fetch,因此只有 MCP 协议套件会接触网络(公共端点,无需密钥)。

许可证

MIT

Available Tools

19 tools
analyze_funnelA

Resolve an experience's funnels end to end: discover which funnels exist, discover their step IDs, then pull users, overall completion, step-to-step completion, and churn for every step — ordered, with the biggest drop-off called out.

Funnel step IDs are defined by your own AnalyticsService:LogFunnelStepEvent calls rather than by Roblox, so they must be discovered before they can be queried; this handles that two-stage lookup for you. Omit funnelName to report on every funnel found.

Steps only appear for days a player actually reached them, so use a generous range (90 days is a safe default) or late steps will look absent rather than unreached.

Inputs: endTime, lastDays, breakdown, startTime, +2 more.

breakdown_metric_by_segmentsA

Slice one metric by every dimension it supports — platform, country, age group, new vs returning, payer status, device, locale, place version, and so on — in a single call, ranked within each dimension.

This is the fastest way to answer 'who is this bad for?'. A crash rate or retention figure that looks acceptable overall is often far worse on one platform or in one country, and this surfaces that without guessing which dimension to try. For rate-like metrics it flags segments running at least 1.5x or at most 0.67x the overall value.

Costs one query per dimension, so restrict dimensions if you only care about a few.

Inputs: metric (required), filter, endTime, lastDays, +4 more.

compare_periodsA

Compare metrics between two time ranges, with absolute and percent change per series. Use it to measure the effect of an update, an event, or a marketing push: set current to the window after the change and leave baseline empty to compare against the equal-length window immediately before it, or set baseline explicitly to compare against, say, the same week last year.

With a breakdown, series are matched by label so you can see which platform or country actually moved.

Inputs: metrics (required), filter, breakdown, universeId, +6 more.

describe_metricA

Full definition of one or more metrics: display label, category, every granularity the API accepts, how many days of history are retained, and every dimension valid in breakdown or filter. Check this before querying an unfamiliar metric — an unsupported granularity or dimension returns an opaque 400 and burns query budget.

Inputs: metrics (required).

find_universesA

Find universe IDs for experiences, by name or by creator.

With no arguments it identifies the API key's owner automatically and returns every experience on their account plus every experience in all of their groups — which is where studio titles usually live, so a personal-account-only search will often miss the game you want. Add search to filter by name; results are ranked by lifetime visits, so the real title outranks similarly-named test places.

Pass username, userId, or groupId to target someone else instead.

Scanning many groups takes several requests. Any source that could not be read is reported in errors rather than silently omitted — an empty result with errors present means the scan was throttled, not that the creator has no games.

Inputs: limit, search, userId, groupId, +3 more.

get_analytics_operationA

Fetch the result of a long-running analytics operation by its path. Queries normally poll themselves to completion; this is the escape hatch for one that timed out, using the path reported in the timeout message.

Inputs: operationPath (required).

get_experience_overviewA

One-call health check for an experience. Pulls the headline KPIs — DAU, MAU, stickiness, visits, peak CCU, session length, playtime, D1/D7/D30 retention, revenue, ARPU, ARPPU, paying users and conversion — for a period, compares each against the immediately preceding period of equal length, and flags the ones that moved sharply.

Start here when asked how a game is doing, then drill in with breakdown_metric_by_segments or get_metric_report.

Each KPI reports how it was aggregated: api-period-total values come from a whole-period query, so user counts are distinct users rather than summed daily figures. This issues roughly two queries per metric against a 30-per-minute budget, so a full comparison run takes about a minute.

Inputs: endTime, metrics, lastDays, startTime, +3 more.

get_metric_reportA

Query a themed group of related metrics in one call. Packs: • retention: ForwardD1Retention, ForwardD7Retention, ForwardD30Retention, DailyCohortRetention, WeeklyCohortRetention, DauMauStickiness • engagement: DailyActiveUsers, MonthlyActiveUsers, AverageSessionLengthMinutes, AveragePlayTimeMinutesPerDAU, TotalPlayTimeHours, PeakConcurrentPlayers, Visits, SessionDurationSecondsP50, SessionDurationSecondsP90, TotalSessionsEndedInBucket • monetization: DailyRevenue, AverageRevenuePerUser, AverageRevenuePerPayingUser, PayingUsers, PayingUsersCVR, ItemMonetizationRevenue • acquisition: UniqueUsersWithImpressions, UniqueUsersWithClicks, UniqueUsersWithPlaySessions, QualifiedUniqueUsersWithPlaySessions, ImpressionCVR, ClickCVR, EndToEndCVR, QualifiedEndToEndCVR, RFYPlayThroughRate, RFYQualifiedPTR, RFYDeepEngagementRate • performance: ClientCrashRate15m, ClientCrashCount, ServerCrashCount, OomUnexpectedExits, ClientFpsP50, ClientFpsP10, ServerFrameRateP50, ClientMemoryUsageP90, ClientMemoryUsagePercentageP90, MemoryUsageP90, CpuTimeP90, ClientCpuTimeAvg, CpuCoreUtilization • economy: EconomyTransactionAmount, EconomyTransactionCount, EconomyAverageWalletBalance • thumbnails: ThumbnailImpressions, ThumbnailQualifiedPlays, ThumbnailQualifiedPTR, ThumbnailL7QualifiedPTR, ThumbnailAverageSessionLengthMinutes • safety: TotalAbuseReports, UniqueAbuseReportSubmittersPer1000PlaytimeHours • ads: AdsPublisherReportingTotalImpressions, AdsPublisherReportingTotalRevenueRobux, AdsPublisherReportingVideo2DImpressions, AdsPublisherReportingVideo2DRevenueRobux, AdsPublisherReportingVideo2DDailyUniqueViewer, AdsPublisherReportingVideo2DEpmNoUnvalidatedPc • infrastructure: DataStoreRequests, DataStoreStorageUsageBytes, DataStoreReadRequests, DataStoreWriteRequests, DataStoreRequestsByStatus, MemoryStoreRequests, MemoryStoreMemoryUsageBytes • customEvents: CustomEventCount, CustomEventCountUser, CustomEventSumValue, CustomEventAvgValue, CustomEventAvgPerUserValue

Use this when a question is about an area rather than a single number — 'how is monetization doing', 'is performance regressing', 'where is acquisition leaking'. Optionally break every metric down by a dimension and compare against the preceding period. Metrics the experience has no data for come back with an error field rather than failing the report.

Note the performance pack only retains 28 days of history.

Inputs: pack (required), filter, endTime, lastDays, +6 more.

get_place_infoA

Open Cloud metadata for one place within a universe: name, description, server size, and current server fill behaviour. Useful when performance metrics broken down by Place point at a specific place ID you need to identify.

Inputs: placeId (required), universeId.

get_public_game_statsA

Public storefront stats for up to 50 universes at once: live player count, lifetime visits, favourites, like/dislike ratio, genre, server size, and last-update date. No API key needed, so this works for any public experience.

Use it to benchmark against competitors, or to size up several of your own experiences before deciding which to analyse in depth.

Inputs: universeIds (required).

get_server_statusA

Check how this MCP server is configured: whether an API key is available and where it came from, the default universe, saved aliases, and the query budget. Call this first if an analytics tool returns an authentication error — it distinguishes a missing key from a key that lacks the analytics scope.

Inputs: no named parameters.

get_universe_infoA

Metadata and public storefront stats for an experience: name, description, creator, creation and last-update dates, root place, live player count, lifetime visits, favourites, and the like/dislike ratio.

The like ratio, favourite count, and lifetime visits are not available through the Analytics Query API at all, so this complements the metric tools — a retention problem alongside a falling like ratio reads very differently from one without.

Public stats need no API key and work for experiences you do not own, which makes this usable for competitor comparison. The Open Cloud metadata portion needs a key with universe read access and is reported as an error if the key is analytics-only.

Inputs: universeId, includeOpenCloudMetadata.

list_dimensionsA

List the 69 dimensions available for breakdowns and filters, each with the metrics that support it. Use this to answer 'what can I slice this by' or, in reverse, 'which metrics can I break down by Country'. Dimension values (the actual countries, product IDs, funnel steps) come from list_dimension_values.

Inputs: search, includeMetrics.

list_dimension_valuesA

List the actual values a dimension took over a date range — the countries, product IDs, funnel names, funnel step IDs, custom event names, or place versions present in your data. Run this before filtering: filters match raw values exactly, and guessing them wastes queries.

Values only appear for periods with activity, so widen the range if something you expect is missing. The metric argument selects which namespace of dimensions to resolve against; it does not compute the metric.

Inputs: metric (required), dimensions (required), limit, filter, +6 more.

list_metricsA

Browse the 168 metrics the Roblox Analytics Query API supports, across 16 categories (Retention, Engagement, Monetization, Acquisition, Performance & Stability, Economy, Funnels, Custom Events, Thumbnails, Speech-to-Text, Text-to-Speech, Matchmaking, Data Store, Memory Stores, Safety, Advertising). Start here when you do not already know the exact metric name — names are case-sensitive and the API rejects anything it does not recognise. Filter by free-text search, category, a dimension the metric must support, or a granularity it must allow. Returns names and labels only unless includeDetails is set.

Inputs: search, category, includeDetails, supportsDimension, +1 more.

query_metricA

Query one analytics metric as a time series. This is the core read tool — everything the Analytics Query API exposes is reachable through it.

Returns, per series: summary statistics (first, last, min, max, mean, median, stdDev, sum, percent change, trend per bucket), outlier buckets beyond 2.5 standard deviations, any buckets the API returned no data for, and the raw data points.

Use breakdown to split into one series per dimension value, and filter to narrow the population. The request is validated against the metric's documented capabilities before it is sent, so mistakes come back as a clear message rather than an opaque 400.

Note aggregationHint: for rates, averages, and percentiles the sum of buckets is not a meaningful number — read mean instead.

Inputs: metric (required), limit, filter, endTime, +8 more.

query_metricsA

Query several metrics over the same time range in one call, with the same breakdown and filter applied to each. Prefer this over repeated query_metric calls: the API allows only 30 queries per minute per account, and this paces them automatically.

A metric that fails (commonly because the experience does not use that feature) is reported with an error field and does not abort the rest. Breakdowns and filters a given metric does not support are dropped for that metric rather than failing it.

Inputs: metrics (required), filter, endTime, lastDays, +5 more.

set_default_universeA

Store a default universe ID so later tool calls can omit universeId, and optionally save a short alias for it. Writes to this server's local config file; it does not change anything on Roblox.

Inputs: universeId (required), alias.

whoamiA

Identify the owner of the configured API key, and report exactly what it can read.

Open Cloud keys are otherwise anonymous — no analytics endpoint reveals the caller — so call this first whenever you need to know whose experiences these are, or when a query fails and you cannot tell whether the cause is a missing scope, a disabled key, or the wrong universe.

Returns the key's name, the Roblox account that created it (with username), whether it is enabled and unexpired, its scopes, and which universes it covers — where * means every experience the owner can access. Optionally also lists the owner's groups, which is usually where a studio's real titles live.

Inputs: includeGroups.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 19 tools

    Disambiguation4/5

    The query-related tools (query_metric, query_metrics, get_metric_report, get_experience_overview, compare_periods, breakdown_metric_by_segments) all read analytics data, but each description carves a distinct usage: single series, batch, themed packs, health check, period comparison, exhaustive segment scan. A couple of metadata/auth tools (get_server_status vs whoami, get_universe_info vs get_public_game_stats) are adjacent but their descriptions separate them.

    Naming Consistency4/5

    Names are consistently snake_case and mostly verb-first: list_*, get_*, query_*, compare_periods, analyze_funel, find_universes. Minor deviations: 'whoami' is an idiom rather than verb_noun, and 'breakdown_metric_by_segments' uses 'breakdown' as a verb-ish noun instead of 'break_down_metric_by_segments'.

    Tool Count4/5

    At 19 tools this is above the ideal 3-15 range, but the server spans analytics querying, metric/dimension discovery, reporting wrappers, funnel analysis, universe/place lookup, and account/config diagnostics, so the count is defensible. A few convenience tools could theoretically be folded into query_metric, but none feel disposable.

    Completeness4/5

    Core analytics workflows are well covered: discover metrics/dimensions, query single/bulk metrics, break down, compare periods, analyze funnels, and retrieve async results. Minor gaps: no direct place-list endpoint (place IDs must be discovered via dimension values then resolved with get_place_info) and alias configuration can be set but not explicitly removed.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI agents to execute Lua code, inspect scripts, spy on remotes, and interact with running Roblox game clients, including support for mobile executors on Android and iOS.
      2
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      Unofficial MCP server that lets AI agents query Aptabase analytics using cookie-authenticated dashboard endpoints, providing tools for metrics, events, and sessions.
      17
      1
      MIT