This page is about giving an agent access to your analytics data. To give an
assistant these documentation pages instead — so it can help you write an
integration — see Use docs with AI.
What can an agent do through MCP?
The server exposes 47 tools, grouped by what you’d ask for:
Every tool runs with your key’s access: the agent sees exactly the sites you can see, and writes are refused unless your organization role allows them.
Which AI clients can connect today?
The requirement is simple: the client must speak Streamable HTTP and let you set a request header. Clients that only support OAuth cannot connect yet.How do I connect my agent?
1
Create an API key
In tinyanalytics, open Settings → Account and create a key from the API keys card. Copy it immediately — it’s shown only once.A key inherits its owner’s access, so the agent will reach every site you can reach.
2
Add the server to your client
Use the configuration for your client below, replacing Cursor reads
YOUR_API_KEY with the key you just created.~/.cursor/mcp.json (or .cursor/mcp.json in a project), VS Code reads .vscode/mcp.json, and Codex CLI reads ~/.codex/config.toml.3
Keep the key out of your repository
If the configuration file is committed, read the key from your environment instead of pasting it. In Claude Code, a project
.mcp.json supports ${env:VAR}:.mcp.json
4
Ask your agent to list your sites
Start a new session so the client picks up the server, then ask:
The agent returns your organization and its sites, each with a numeric
site ID. That ID is what every other tool uses, so a successful
list_sites call confirms both the connection and the key.What should I ask first?
Once connected, ask in plain language — the agent picks the tool:- “What were my top pages last week?”
- “How much traffic came from AI assistants this month?”
- “Which pages do people land on and immediately leave?”
- “Create a goal for anyone who reaches /pricing.”
- “Build me a dashboard of signups per day.”
Do I need to give dates?
Yes, for anything over a date range. Every date-ranged report requires a start and end date inYYYY-MM-DD, read in the time zone you pass (UTC by default). Agents supply these automatically from your question — “last week” becomes concrete dates — but there is no relative range like 7d, and there is no “all time” shortcut. For all of your history, ask for a range starting before the site existed.
Live visitors, saved funnels, saved dashboards, and annotations don’t take dates.
How many requests can an agent make?
MCP calls are limited to 120 requests per minute per API key. Beyond that the server returns429 Too Many Requests with a Retry-After header, and the agent should wait for the window to reset.
That budget suits normal agent work: building a dashboard, where each card is previewed before saving, is typically 30–60 calls over a couple of minutes. This limit is separate from the server-side ingestion limit on POST /api/track.
Is it safe to connect an agent?
Connecting an agent gives it your key’s access. Understand these four points before you do.- Your key is your identity. An agent connected with your key can do anything you can do through the API, for every site your account reaches. There are no read-only keys yet.
- Deletion is not available. The tools that permanently delete a site, goal, funnel, dashboard, annotation, or a person’s data are not offered on tinyanalytics cloud, and neither is changing a site’s tracking configuration. An agent cannot destroy your data or silently switch off collection.
- Analytics text is untrusted input. Page titles, referrers, and event names come from anonymous visitors to your site, which makes them a channel for prompt injection. tinyanalytics strips control and bidirectional characters from every value it returns and tells the model explicitly that returned text is data, never instructions. Keep that assumption in your own prompts too.
- Revoke a key any time. Deleting the key in your account settings cuts off the agent immediately.
Troubleshooting
Frequently asked questions
What is the tinyanalytics MCP server?
What is the tinyanalytics MCP server?
It’s an endpoint at
https://dash.tinyanalytics.io/api/mcp that exposes your analytics to AI agents as 47 callable tools over the Model Context Protocol. You connect a client such as Claude Code, Cursor, VS Code, or Codex CLI with your API key, then ask questions in plain language instead of writing HTTP requests.Do I need a special key or a paid plan for MCP?
Do I need a special key or a paid plan for MCP?
No. MCP uses the same API key as the rest of the API, created under Settings → Account, and it reaches exactly the sites that key’s owner can reach.
Can I connect claude.ai or ChatGPT?
Can I connect claude.ai or ChatGPT?
Not yet. Both require OAuth for custom connectors, and the tinyanalytics MCP server currently authenticates with an API key sent as a request header. Support for OAuth is planned. Today the endpoint works with developer clients that let you set a header: Claude Code, Cursor, VS Code, and Codex CLI.
Can an agent delete my analytics data?
Can an agent delete my analytics data?
No. On tinyanalytics cloud the delete tools aren’t offered at all, and neither is changing a site’s tracking configuration — so the actions that can’t be undone are unavailable to an agent. An agent can still create and update goals, funnels, dashboards, and annotations, and those changes are visible to your whole team.
How is this different from Ask AI inside tinyanalytics?
How is this different from Ask AI inside tinyanalytics?
Ask AI lives in the tinyanalytics dashboard and answers questions there. The MCP server brings the same data into the AI tool you already work in, so an agent can combine your analytics with your codebase — for example, checking whether a page you just changed is losing visitors.
Do I still need the HTTP API?
Do I still need the HTTP API?
Only if you’re writing code. MCP is for AI agents working on your behalf; the HTTP API is for applications and scripts you build. Both use the same key and return the same data.
Related
API keys
Create the key your agent will use.
API reference
The HTTP API behind every MCP tool.
Ask AI
Ask questions inside the tinyanalytics dashboard.
Use docs with AI
Give an assistant these documentation pages.
Rate limits & CORS
The other limits that apply to API traffic.
SQL query API
The read-only SQL an agent runs for you.