What is MCP, and why does it matter for game analytics?
MCP is a standard way for an AI assistant to use tools and data. A data source exposes an MCP server, and an AI app connects to it as a client. Anthropic describes it as a replacement for one custom connector per data source.
At launch, Anthropic released the specification and SDKs, local MCP server support in the Claude Desktop apps, and an open source repository of servers. The announcement named Zed, Replit, Codeium and Sourcegraph as development tool companies working with MCP. Because it is a shared standard, one server can work with many clients.
The specification defines what a server offers. A tool has a name, a description and an input schema, and it can have an output schema. A result can carry structured content, which is a JSON object, next to the text. The specification names two standard transports: stdio for a local process, and Streamable HTTP for a server on the network.
For a game team, this means you can ask an agent "which build has the most crashes this week?" and it can query the data itself, instead of you exporting a CSV and pasting it into a chat.
Sources: Anthropic, Introducing the Model Context Protocol (25 November 2024); Model Context Protocol specification, version 2025-06-18 (Tools; Transports).
What can an agent do with the Manalens MCP server?
It can read reports, run SQL and change dashboards, but only with the scopes you give its key. The server registers only the tools that a key's scopes allow, and no scope includes another. A call to a tool without its scope returns an error that names the missing scope.
Every tool returns structured content with a fixed shape, so the agent does not have to guess field names. The server uses Streamable HTTP, the network transport of the specification.
| Scope | Tools | Good for |
|---|---|---|
| analytics:read | get_analytics, describe_schema | Key metrics, daily series, top events |
| dashboards:read | list_dashboards, get_dashboard, list_charts, get_chart | Reading your existing boards |
| attribution:read | get_attribution | Credit for a conversion by source or campaign |
| profiles:read | get_profile | One identified player and their traits |
| query:read | execute_query, preview_chart | SQL on raw events, such as fail rates by level |
| dashboards:write | create_dashboard, update_dashboard, delete_dashboard, create_chart, update_chart, delete_chart, duplicate_chart, move_chart, reorder_charts | Building charts and dashboards for you |
Sources: Manalens MCP server documentation.
How do I connect Claude Code or Cursor?
Create an API key in the project, then add the server to your client with the key as a bearer token. The key is project scoped and shown only once. Clients that support OAuth, such as Claude and ChatGPT, can connect without a key when OAuth is on.
Each client has its own way to add a server. Claude Code uses the command claude mcp add with the HTTP transport, and its documentation recommends HTTP for remote servers. It takes the key with the header option. Cursor reads a file named mcp.json, where a remote server has a url and a headers object. Our documentation has the exact text for Claude Code, Cursor and Claude Desktop.
- As an owner or admin with a verified MFA session, open Settings, then Integrations, then API keys.
- Name the key and choose the smallest set of scopes. The four read scopes are selected by default.
- Click Create API key and copy the key. It starts with mana_api_.
- Add the server to your client, as in the command below.
- Ask a first question, such as "what were my top events last week?"
Claude Code
claude mcp add --transport http manalens https://YOUR_COLLECTOR_ENDPOINT/mcp \
--header "Authorization: Bearer mana_api_..."Sources: Manalens MCP server documentation; Claude Code MCP documentation; Cursor MCP documentation.
Which game questions work well?
Questions with a clear event, a date range and one number or table work best. The five prompts below are real tool calls. Each one names the tool that the agent calls, the arguments and the shape of the result. The data in every result is made up for this guide.
| Prompt | Tool | Result fields |
|---|---|---|
| 1. Top events of last week | get_analytics (top_events) | rows with event, occurrences and visitors; row_count; truncated |
| 2. Players and sessions in a week | get_analytics (kpis) | one row with visitors, custom_events, revenue, sessions, bounce_rate, session_duration_sec |
| 3. Fail rate of a level by build | describe_schema, then execute_query | meta (column names and types), rows, truncated, date_from, date_to |
| 4. Campaign credit for purchases | get_attribution | rows with dimension, conversions and revenue |
| 5. A dashboard with a goal line | create_dashboard, preview_chart, create_chart | dashboard; chart with its spec; results with meta and data |
Sources: Manalens MCP server and charts documentation.
Prompt 1: which events did players send most last week?
The agent calls get_analytics with the report top_events and two dates. The result has one row for each event name, with occurrences and visitors. A visitor here is a persistent anonymous ID, so in a game it is a player.
Two rules protect the answer. The report lists the first 20 groups only, and a player can be in many rows, so the rows do not add up to a total. For a total, the agent calls the kpis report with the same dates.
Example: get_analytics, top_events (made-up data)
// Tool: get_analytics Scope: analytics:read
// Arguments
{ "report": "top_events", "date_from": "2026-11-09", "date_to": "2026-11-15" }
// Result (example data, shortened)
{
"report": "top_events",
"filters": { "date_from": "2026-11-09", "date_to": "2026-11-15" },
"rows": [
{ "event": "session_start", "occurrences": 8420, "visitors": 1310 },
{ "event": "level_start", "occurrences": 6904, "visitors": 1198 },
{ "event": "level_fail", "occurrences": 2877, "visitors": 902 }
],
"row_count": 14,
"truncated": false
}Sources: Manalens MCP server documentation.
Prompt 2: how many players and sessions did the game have in launch week?
The agent calls get_analytics with the report kpis. It returns one row, and that row is the total for the date range: visitors, pageviews, custom_events, revenue, sessions, bounce_rate as a percent and session_duration_sec.
Dates are UTC days. Without dates, the report covers the last 30 days, and a range can be at most 367 days. For a daily series, the agent uses the report event_timeseries, which adds a totals field for the full range.
Example: get_analytics, kpis (made-up data)
// Tool: get_analytics Scope: analytics:read
// Arguments
{ "report": "kpis", "date_from": "2026-11-09", "date_to": "2026-11-15" }
// Result (example data, shortened)
{
"report": "kpis",
"filters": { "date_from": "2026-11-09", "date_to": "2026-11-15" },
"rows": [
{ "visitors": 1342, "pageviews": 0, "custom_events": 31876, "revenue": 0,
"sessions": 5210, "bounce_rate": 3.1, "session_duration_sec": 1284 }
],
"row_count": 1,
"truncated": false
}Sources: Manalens MCP server documentation.
Prompt 3: which build has the highest fail rate on level 3?
No report answers this, so the agent writes SQL. It first calls describe_schema, which returns the raw_events columns, the SQL rules and your custom events of the last 30 days. Then it calls execute_query with one SELECT statement.
The result has meta, the list of column names and types, and up to 200 rows. The server adds the project filter, and a query runs for at most 8 seconds. In the example, build 571 fails more often on level 3 than build 570, so the last balance change is the first thing to check.
Example: execute_query (made-up data)
// Tool: execute_query Scope: query:read
// Arguments
{
"sql": "SELECT JSONExtractString(context, 'app', 'build') AS build, countIf(event = 'level_fail') AS fails, countIf(event = 'level_complete') AS completes, round(fails / (fails + completes), 3) AS fail_rate FROM raw_events WHERE type = 'track' AND JSONExtractInt(properties, 'level') = 3 AND received_at >= toDateTime({{date_from}}) AND received_at < toDateTime({{date_to}}) + INTERVAL 1 DAY GROUP BY build ORDER BY build",
"date_from": "2026-11-01",
"date_to": "2026-11-15"
}
// Result (example data)
{
"meta": [
{ "name": "build", "type": "String" },
{ "name": "fails", "type": "UInt64" },
{ "name": "completes", "type": "UInt64" },
{ "name": "fail_rate", "type": "Float64" }
],
"rows": [
{ "build": "570", "fails": 412, "completes": 618, "fail_rate": 0.4 },
{ "build": "571", "fails": 655, "completes": 402, "fail_rate": 0.62 }
],
"truncated": false,
"date_from": "2026-11-01",
"date_to": "2026-11-15"
}Sources: Manalens MCP charts and dashboards documentation.
Prompt 4: which campaigns get credit for purchases?
The agent calls get_attribution with the conversion event, an attribution model and a grouping. The models are first_touch, last_touch, last_non_direct, linear, position_based and time_decay. The result has one row for each source or campaign, with its conversions and revenue.
With the linear model, one purchase is shared by all touches of the journey, so a row can have a fraction of a conversion. The tool uses observed clicks and visits only. It has no impression or view-through data, and the agent should say so when it explains the result.
Example: get_attribution (made-up data)
// Tool: get_attribution Scope: attribution:read
// Arguments
{ "conversion_event": "purchase", "model": "linear", "group_by": "campaign",
"date_from": "2026-11-01", "date_to": "2026-11-15", "lookback_days": 30 }
// Result (example data, shortened)
{
"filters": { "conversion_event": "purchase", "model": "linear", "group_by": "campaign" },
"rows": [
{ "dimension": "next_fest_trailer", "conversions": 41.5, "revenue": 620.43 },
{ "dimension": "creator_keys_october", "conversions": 18.33333333, "revenue": 274.08 },
{ "dimension": "Direct", "conversions": 12.16666667, "revenue": 181.89 }
]
}Sources: Manalens MCP server and attribution documentation.
Prompt 5: can you make a Patch 1.4 dashboard with daily sessions and a goal line at 500?
This prompt needs a key with dashboards:write and query:read. The agent calls create_dashboard, then preview_chart with a chart spec, then create_chart with the same spec and the new dashboard ID. Sessions come from the sessions table, never from a count on raw_events.
preview_chart returns the spec unchanged with the result rows. In a client that supports MCP Apps, such as Claude, the chart shows in the conversation. If a spec is wrong, nothing is saved, and the error names the bad field. A dashboard has up to 24 charts.
Example: a dashboard and a chart with a goal line (made-up data)
// Tools: create_dashboard, preview_chart, create_chart
// Scopes: dashboards:write and query:read
// 1. create_dashboard arguments and result (example data)
{ "name": "Patch 1.4" }
{ "dashboard": { "id": "0b6f2c1e-5a47-4d0b-9c1e-7f3a2d9e4b10", "name": "Patch 1.4", "description": null, "created_at": "2026-11-19T09:12:44Z" } }
// 2. The chart spec that preview_chart and create_chart receive
{
"version": 1,
"query": { "kind": "sql", "sql": "SELECT day, count() AS sessions FROM sessions GROUP BY day ORDER BY day" },
"view": { "layer": [
{ "mark": "line", "encoding": { "x": { "field": "day" }, "y": { "field": "sessions" } } },
{ "mark": "rule", "encoding": { "y": { "datum": 500 } } }
] }
}
// 3. create_chart result (example data, spec left out)
{ "chart": { "id": "5d2e8a90-1c3b-4f6a-8e7d-19d2c4b7a6f1", "title": "Daily sessions against a goal", "description": null, "position": 0, "updated_at": "2026-11-19T09:13:02Z" } }Sources: Manalens MCP charts and dashboards documentation; Model Context Protocol documentation (MCP Apps).
How is Ask AI different from MCP?
Ask AI is a chat inside the Manalens dashboard. MCP lets your own AI tool use the same data. Ask AI picks an approved report or writes a chart, and you can save the chart to a dashboard. It does not create funnel, retention or user paths charts; you make those on a dashboard.
Ask AI never sends raw events, profiles or identities to the model. The model sees your question, earlier turns and short aggregate previews. Use Ask AI for quick questions, and MCP when you want an agent in your editor to work across your code and your data.
Sources: Manalens Ask AI documentation.
How do I keep an analytics agent safe and correct?
Give each key only the scopes it needs, and check the agent's numbers against a dashboard before you act. The MCP specification says a person should always be able to deny a tool call, so keep the confirmation prompts of your client on for tools that write. A key with query:read or dashboards:write acts as the person who created it, and the audit log marks its changes with via: mcp. You can revoke a key at once.
Watch three traps. Dates are UTC days. get_analytics returns at most 100 rows and says when a result is truncated. And with an event filter, session columns are absent, so the agent should not invent them. Ask the agent to show its SQL when a number matters.
Sources: Manalens MCP server documentation; Model Context Protocol specification, version 2025-06-18 (Tools).
What does a typical agent session look like?
The agent learns your data, runs a query, shows a chart and saves it if you agree. Every chart is one chart spec: the query and the view. The dashboard editor, Ask AI and the MCP tools write the same spec, and the API checks it the same way, so nothing is saved after a refusal.
- describe_schema returns the raw_events columns, the SQL rules, an example spec for each view and your custom events of the last 30 days.
- execute_query runs the agent's SQL and returns the result columns and up to 200 rows.
- preview_chart runs a spec and returns the rows. In clients that support MCP Apps, such as Claude, the chart shows in the conversation.
- create_chart saves the spec on a dashboard. Deletes need an explicit confirm flag.
Sources: Manalens MCP charts and dashboards documentation.
Which limits apply to agents?
Rate limits protect your project from a runaway agent. When a budget runs out, the server returns 429 with Retry-After: 60, and a well behaved client waits.
| Budget | Limit |
|---|---|
| Per key | 120 requests per minute |
| Per workspace | 600 requests per minute, shared by all keys |
| execute_query | 10 per minute per person, 30 per project |
| preview_chart | 60 per minute per person, 240 per project |
| SQL charts saved with create_chart or update_chart | 30 per minute per person |
Sources: Manalens MCP server documentation.
How do I connect my AI tool to my game data?
Manalens is the analytics and growth engine built for games. Create a scoped API key, add the MCP server to Claude, Cursor or another client, and ask questions about your builds, levels and players.
Sources: Manalens product documentation.
Frequently asked questions
Can an AI agent change my analytics data?
It can change dashboards and charts only if its key has the dashboards:write scope, and deletes need an explicit confirm flag. No MCP tool deletes or edits your events. Keep write scopes off for keys that only need to answer questions, and revoke keys you no longer use.
Does the AI model see my raw player data?
With Ask AI, no: the model gets your question, earlier turns and aggregate previews, never raw events or profiles. With MCP, your AI client sees the rows that its tools return, such as up to 200 rows of SQL results. Choose scopes and clients with that in mind.
Do I need to know SQL to use an analytics agent?
No. The agent writes the SQL from your question, and Ask AI does the same inside the dashboard. It still helps to read the query when a number matters. Ask the agent to show its SQL, or click How I calculated this in Ask AI, and check the event names and dates.
Which AI clients work with the MCP server?
Any client that supports the Model Context Protocol over Streamable HTTP. The documentation shows Claude Code, Cursor and Claude Desktop with an API key. Clients that support OAuth, such as Claude and ChatGPT, can connect without a key when OAuth is enabled for the project.
Sources and implementation
- Anthropic: Introducing the Model Context Protocol (25 November 2024) ↗
- Model Context Protocol specification, version 2025-06-18: Tools (read 19 November 2026) ↗
- Model Context Protocol specification, version 2025-06-18: Transports (read 19 November 2026) ↗
- Model Context Protocol documentation: MCP Apps (read 19 November 2026) ↗
- Claude Code documentation: Connect Claude Code to tools via MCP (Anthropic, read 19 November 2026) ↗
- Cursor documentation: Model Context Protocol (MCP) (read 19 November 2026) ↗