Skip to content
← Blog

October 20, 2026

Connect Claude to your analytics: the Mitr MCP server

You can already ask an AI assistant to explain a spreadsheet. The more useful trick is asking it about your live numbers, without exporting anything: “Why did signups drop on Tuesday?” The assistant needs a way to reach your data. That’s what an MCP server is for, and Mitr now has one.

The Mitr MCP server connects Claude, Gemini, Cursor and other MCP-compatible assistants to your Mitr workspace with a single API key. It’s hosted, so there’s nothing to install. The assistant fetches your reports and funnels itself, then does the analysis in the conversation.

What you can ask

  • “Which app had the biggest drop in visitors this week, and where did the traffic come from?”
  • “Show my signup funnel for the last 30 days. Where do people leave?”
  • “Look at the latest events on my marketing site. Are the UTM tags coming through?”
  • “How much of my monthly event quota have I used?”
  • “Register a new web app called Docs for docs.example.com.”

The assistant chooses which tools to call, reads the structured data they return, and writes the answer. There’s no canned report: it analyses whatever you ask about.

Set it up in two minutes

  1. Create a key. In the dashboard open Settings → API keys & AI assistants → Create key, name it (say, “Claude Code”) and copy it. It’s shown once, and it’s read-only unless you tick “Can register apps”.
  2. Connect your assistant. In Claude Code it’s one command:
claude mcp add --transport http mitr https://mcp.mitranalytics.dev/mcp --header "Authorization: Bearer mitr_live_..."

Cursor, VS Code and the Gemini CLI take the same URL and header in their config; the setup docs have each snippet.

  1. Ask a question.

Claude Desktop runs the server locally instead (you need Node.js 18 or newer). In claude_desktop_config.json:

{
  "mcpServers": {
    "mitr": {
      "command": "npx",
      "args": ["-y", "@mitr-analytics/mcp"],
      "env": { "MITR_API_KEY": "mitr_live_..." }
    }
  }
}

Then restart Claude. The setup docs cover troubleshooting if something doesn’t connect. One-click “Connect” from claude.ai and ChatGPT, signing in to Mitr instead of pasting a key, is next.

What the assistant can reach

ToolWhat it returns
list_appsEvery app in your workspace and its ID
get_app_reportA 7-day report: visitors, pageviews, traffic, sources, countries, devices, web vitals, conversions
get_recent_eventsThe latest raw events for an app
list_funnels, get_funnel_resultsYour funnels, and their step-by-step conversion and drop-off
get_alert_ruleYour spike and drop alert settings
get_billing_usageYour plan and event usage
add_appRegisters a new app (the only write; needs a key allowed to register apps)

What it deliberately can’t do

An AI assistant with a write-everything key is a bad idea, so the scope is narrow. Keys are read-only by default. Seven tools only read. The one write, add_app, creates a new app, and only with a key you explicitly allowed to. There is no tool to delete data, edit alerts or webhooks, or manage your team. If you want any of those, you do them in the dashboard.

Keeping it safe

  • A key sees what you see, no more, and is read-only by default. Treat it like a password.
  • Revoke it whenever you like. It stops working immediately, keys expire after a year by default, and the dashboard shows when each key was last used.
  • Use one key per tool, so you can revoke one without breaking the others.
  • Visitor data is labelled as untrusted. Page paths, UTM tags and event properties are written by your visitors, so anyone can put text there, including text aimed at an AI. The assistant receives them cleaned of hidden characters and marked as data, not instructions.
  • Your AI provider sees what you ask about. The reports and events returned to the assistant fall under that provider’s terms. Mitr itself counts visitors without cookies and identifies them only by hashed identifiers.
  • No secrets in the conversation. add_app doesn’t return the new app’s SDK secret; you copy it from the dashboard.

Pair it with alerts and reports

The assistant answers questions you think to ask. For the things you’d rather be told about, traffic alerts and the weekly email report come to you. Together: an alert says something changed, and you ask Claude why.

It’s free on every plan during early access, until 20 January 2027. Start free, create a key, and ask your first question. The server is open source on GitHub and on npm.

Frequently asked questions

What is an MCP server for analytics?

MCP, the Model Context Protocol, is a standard way for AI assistants to call tools. An analytics MCP server exposes your reports and funnels as tools, so an assistant such as Claude can fetch the numbers itself and answer questions about them.

How do I connect Claude to Mitr?

Create an API key under Settings, then API keys in the Mitr dashboard. In Claude Code, run claude mcp add --transport http mitr https://mcp.mitranalytics.dev/mcp with your key in an Authorization header. In Claude Desktop, add a mitr entry to claude_desktop_config.json that runs npx -y @mitr-analytics/mcp with your key in MITR_API_KEY, and restart Claude.

Can the assistant change or delete my analytics data?

No. Seven of the eight tools are read-only. The eighth, add_app, registers a new app. There is no tool to delete data, edit alerts or webhooks, or manage your team.

What can the API key see?

Exactly what you can see in the dashboard, and it is read-only unless you allow it to register apps. Keys expire after a year by default. Revoke one under Settings, then API keys, and it stops working immediately.

Is the Mitr MCP server free?

During early access, until 20 January 2027, it works on every Mitr plan including Free. After that it is part of the paid plans, and your existing keys keep working once you upgrade.

Does my analytics data go to the AI company?

The reports and events you ask about are returned to your assistant, so they are covered by that provider's terms. Mitr itself identifies visitors only by hashed identifiers and sets no cookies.

Have questions about integration or security? Drop us a line directly.