AI agents reading your analytics: MCP explained
MCP, the Model Context Protocol, is a standard way for an AI agent to call tools in another system. For analytics, it means an assistant such as Claude Code or Cursor can query your traffic and revenue directly, using a read-only key, and answer in plain language instead of you opening a dashboard.
| Post | Visitors | Revenue |
|---|---|---|
| Setup guide | 1,800 | $245 |
| Pricing compared | 640 | $147 |
| Launch recap | 3,200 | $49 |
Fig.Your AI assistant reading your analytics through MCP, read-only. Sample data, not a real site.
What problem does it solve?
A dashboard answers the questions its designer anticipated. You click, filter and compare, and if the question does not fit a chart, you export and work it out yourself. An agent connected to the same data lets you ask in your own words: "Which post made me the most money this month?" or "What changed compared with last week?"
The agent does not guess from memory. It calls tools, the tools return numbers from your data, and the agent explains them. If the tool results are wrong or empty, the answer will be too, so the quality sits in the tools and the data, not in the chat.
How does it work with Ownlytics?
Every Ownlytics install has a built-in MCP server, which our docs put at https://YOUR-OWNLYTICS-URL/mcp. You create a read-only API key in the dashboard under Settings, then API keys and AI agents. The client connects over Streamable HTTP with an Authorization: Bearer dbk_... header. The server runs inside your install: on your Cloudflare account when self-hosted, or on Supabase with Hosted. Details are in the MCP docs.
The server exposes 14 read-only tools. In short:
- Overview and breakdowns: visitors, revenue, sales and conversion, and any dimension ranked by visitors or revenue.
- Comparisons: what changed between two periods, with the biggest gainers and losers.
- Sales and visitors: sales with the source each is credited to, and one visitor's whole journey.
- Live and behavior: realtime visitors, goals, funnels, lifetime value by first source, peak hours, engagement and purchase paths.
Our analytics MCP server page lists them all.
What can the agent see, and what can it not do?
It is useful to be precise here, because "AI with access to my data" worries people for good reasons.
- Read-only. Tools only read. An agent cannot change settings, delete data or edit goals through this server.
- Keys are revocable. Keys are stored only as a hash and you can revoke them at any time.
- Customer names and emails are hidden unless you create a key that includes them.
- Your data stays in your install. The agent talks to your dashboard directly rather than to a copy somewhere else.
What you still need to think about is the AI client itself. When an assistant reads your numbers, those numbers become part of the conversation with whichever model provider that client uses. Read that client's data policy. Keep the key out of shared repos and screenshots.
A read-only key limits what an agent can do to your data. It does not limit where the answers it reads are sent, which is up to the client you choose.
Example (made-up numbers for illustration)
Here is the shape of an exchange. These numbers are invented.
You: "Which referrer made the most money in the last 30 days?"
Agent: calls a breakdown tool ranked by revenue and replies, for instance: "Referrer A earned $420 from 6 sales on 1,800 visitors. Referrer B earned $310 from 2 sales on 400 visitors. B has the higher revenue per visitor."
The useful part is the last sentence. The tool ranks by visitors or revenue, so revenue per visitor is the agent's own arithmetic from those two columns, which is why you should spot-check it. It still saves several clicks in a chart. Our post on revenue per visitor explains why that metric matters.
| Source | Visitors | Revenue |
|---|---|---|
| chatgpt.com | 1,411 | $196 |
| perplexity.ai | 620 | $98 |
| claude.ai | 388 | $49 |
Fig.AI assistants as their own channel in the source table. Sample data, not a real site.
When MCP is not worth the trouble
- You do not use an AI coding or chat client. The dashboard does the same job, and the same numbers are available in the terminal with
npx ownlytics@latestcommands. - You have very little data. An agent cannot find a pattern in six visits.
- You need an audited number. Treat an agent's summary like a quick read, and check anything you will act on or publish against the dashboard.
- Your data policy forbids sending numbers to third-party models. Then skip it.
It also does not replace thinking. It answers the question you asked, not the one you should have asked.
How do you start?
- Open the dashboard and create a read-only key.
- Add the server to your client. Claude Code takes one command; the MCP docs have blocks for Cursor, VS Code, Codex and Windsurf.
- Ask one narrow question first, such as "list my last five sales and where each buyer came from."
- Compare the answer with the dashboard once, so you know how the agent reads your data.
At a glance
| Item | Detail |
|---|---|
| Protocol | MCP over Streamable HTTP |
| Endpoint | https://YOUR-OWNLYTICS-URL/mcp |
| Auth | Read-only API key, sent as a Bearer header |
| Tools | 14, all read-only |
| Clients | Claude Code, Cursor, Codex, Windsurf, VS Code and others |
| Customer emails | Hidden unless your key includes them |
| Works on | Self-hosted and Hosted |
Want to see what the agent would be reading? Open the live demo.
FAQ
What is MCP in simple terms?
It is a common way for AI assistants to use outside tools. The assistant asks a tool for data, the tool answers, and the assistant explains it to you.
Can an AI agent change my analytics settings?
Not through our MCP server. Its tools are read-only, and the API key is read-only too.
Does the agent see my customers' emails?
Not by default. Names and emails stay hidden unless you create a key that includes them.
Which AI clients work?
Any client that speaks MCP over Streamable HTTP with a header. Our docs list Claude Code, Cursor, Codex, Windsurf and VS Code.