Back to Browse

Mitr MCP Server

Developer ToolsModerate7.6MCP RegistryLocalRemote
Free

Server data from the Official MCP Registry

Ask about your Mitr cookie-free analytics: apps, reports, funnels, alerts and usage.

About

Ask about your Mitr cookie-free analytics: apps, reports, funnels, alerts and usage.

Remote endpoints: streamable-http: https://mcp.mitranalytics.dev/mcp

Security Report

7.6
Moderate7.6Low Risk

The Mitr MCP server is a read-focused analytics client that takes an API key from the environment, enforces HTTPS for non-local endpoints, keeps the key out of URLs and logs, strips secret keys from add_app responses, and sanitizes visitor-written text. Its main limitations are that the reports, funnels, alerts, and billing tool modules were not included in the review, and that the optional base-URL override and the partial key suffix in hosted logs warrant minor attention. Permissions match the stated purpose. Supply chain analysis found 1 known vulnerability in dependencies (0 critical, 1 high severity). Package verification found 1 issue.

12 files analyzed · 7 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

What You'll Need

Set these up before or after installing:

Workspace API key from Mitr dashboard → Settings → API keys (mitr_live_...)Required

Environment variable: MITR_API_KEY

Override the API URL. Leave unset unless told otherwise.Optional

Environment variable: MITR_API_BASE_URL

How to Install & Connect

Available as Local & Remote

This plugin can run on your machine or connect to a hosted endpoint. during install.

Documentation

View on GitHub

From the project's GitHub README.

@mitr-analytics/mcp

Ask Claude, Gemini or any other MCP client about your Mitr analytics, in plain English. It reads your own data (apps, reports, funnels, alerts, plan usage) and hands it to the assistant to analyse.

Mitr is cookie-free analytics, so there is no consent banner to wire up and nothing here changes that: this server only reads what is already in your dashboard.

What you can ask

  • "Which of my apps had the biggest drop in visitors this week, and where did it come from?"
  • "Show my signup funnel for the last 30 days. Where do people leave?"
  • "Is anything odd in the last events for 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."

Set up (about two minutes)

You need a Mitr account. Nothing to install if you use the hosted endpoint.

1. Create an API key. In the dashboard open Settings → API keys & AI assistants → Create key, give it a name (for example "Claude Code") and copy it. It is shown once.

Keys are read-only unless you tick "Can register apps" when creating them (needed only for add_app), and they expire after 365 days by default (30, 90, 365 days or never). A key stops working if you leave or are removed from the workspace it was created in.

2. Connect your assistant.

Hosted (no install)

Point any client that supports remote MCP servers at https://mcp.mitranalytics.dev/mcp and send the key in the Authorization header. Never put the key in the URL; the endpoint refuses it.

Claude Code:

claude mcp add --transport http mitr https://mcp.mitranalytics.dev/mcp --header "Authorization: Bearer mitr_live_..."

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "mitr": {
      "url": "https://mcp.mitranalytics.dev/mcp",
      "headers": { "Authorization": "Bearer mitr_live_..." }
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "mitr": {
      "type": "http",
      "url": "https://mcp.mitranalytics.dev/mcp",
      "headers": { "Authorization": "Bearer mitr_live_..." }
    }
  }
}

Gemini CLI (~/.gemini/settings.json):

{
  "mcpServers": {
    "mitr": {
      "httpUrl": "https://mcp.mitranalytics.dev/mcp",
      "headers": { "Authorization": "Bearer mitr_live_..." }
    }
  }
}

Local (npx)

For clients that run a command, such as Claude Desktop. You need Node.js 18 or newer. Open claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) and add:

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

The same works in Claude Code (claude mcp add mitr --env MITR_API_KEY=mitr_live_... -- npx -y @mitr-analytics/mcp) and the Gemini CLI if you prefer running it locally.

3. Ask a question (restart the assistant first if it's a local setup). The dashboard shows when the key was last used.

Tools

ToolWhat it does
list_appsEvery app in your workspace, with the siteId the other tools need.
get_app_reportA 7-day report for one app: visitors, pageviews, traffic, sources, countries, devices, web vitals, conversions.
get_recent_eventsThe latest raw events for one app, to check what is really being tracked.
list_funnelsYour saved conversion funnels.
get_funnel_resultsStep-by-step conversion and drop-off for one funnel over a date range.
get_alert_ruleYour traffic spike/drop alert settings, if you have set one.
get_billing_usageYour plan, subscription status and event usage.
add_appRegister a new app. The only tool that changes anything, and it needs a key with "Can register apps". The app's secret key is not returned: copy it from the dashboard.

There is deliberately no tool to delete anything, edit alerts or webhooks, or manage your team.

Security and privacy

  • A key sees what you see. It has the same read access to your workspace as you do in the dashboard. Treat it like a password.
  • Revoke it any time under Settings → API keys. It stops working immediately.
  • It sits in your assistant's config file in plain text. Use a separate key per tool, so you can revoke one without breaking the others.
  • Your AI provider sees the data you ask about. Reports and recent events (page paths, UTM tags, device and location summaries, any custom event properties you send) are returned to the assistant, so they are covered by that provider's terms. Mitr itself identifies visitors only by hashed identifiers; see how we count visitors without cookies.
  • Visitor data is marked as untrusted. Page paths, referrers, UTM tags and event properties are written by your visitors, so anyone can put text in them, including text aimed at an AI. Reports and recent events are cleaned of hidden characters and returned inside an untrusted_data envelope telling the assistant to treat them as data, never instructions.
  • No secrets in the conversation. add_app doesn't return the new app's SDK secret key; copy it from the dashboard.
  • The key is only ever sent over HTTPS (plain http:// is accepted only for localhost).

Plans

During early access the MCP server works on every Mitr plan, including Free. After early access ends it is part of the paid plans; Free workspaces then get a message pointing to pricing, and upgrading restores access with the same key.

Troubleshooting

Hosted: open https://mcp.mitranalytics.dev/ in a browser; it should show the server version. Local: run npx -y @mitr-analytics/mcp --version in a terminal. If either works, the problem is in the client config.

You seeWhat to do
MITR_API_KEY is not setThe env block is missing or in the wrong place in the client config.
"Your Mitr API key was rejected"The key expired, was revoked or was copied wrongly, or you're no longer in its workspace. Create a new one in Settings → API keys.
"missing the 'apps:write' permission"The key is read-only. Create one with "Can register apps" ticked to use add_app.
"early-access period has ended for the Free plan"Upgrade the workspace; the same key starts working again.
401 from the hosted endpointThe Authorization: Bearer mitr_live_… header is missing or malformed in the client config.
"Mitr is rate-limiting this key"Too many requests in a short time. Wait a minute.
npx: command not foundInstall Node.js 18+, then restart the assistant so it picks up the new PATH.
"Could not reach Mitr"Check your connection or proxy. Only set MITR_API_BASE_URL if you were told to.

Configuration

VariableRequiredDefault
MITR_API_KEYyesnone
MITR_API_BASE_URLnohttps://api.mitranalytics.dev

Development

npm install
npm test                                        # builds, then unit tests + an end-to-end stdio test against a stub API
npx @modelcontextprotocol/inspector node dist/index.js   # try the tools by hand (set MITR_API_KEY first)

Questions or problems: support@mitranalytics.dev

License

MIT

Reviews

No reviews yet

Be the first to review this server!