How to Connect Mixpanel to Claude (MCP Setup Guide)

Why I stopped clicking through Mixpanel dashboards

A few weeks ago a SaaS founder messaged me on a Friday evening: “Signups dropped last week. Is it the tracking or is it real?”

The old routine was familiar. Open Mixpanel, find the right project, build an Insights report, add a breakdown by UTM source, compare to the previous week, then cross-check the event in Lexicon to see if a property had silently changed. Twenty minutes, minimum, before I could even give a first answer.

This time I opened Claude, which was already connected to the client’s Mixpanel project, and typed: “Compare Sign Up events last week vs the week before, broken down by utm_source, and check for any data quality issues on Sign Up.” Two minutes later I had the answer: paid social traffic had dipped, and there were no open data quality issues on the event. The tracking was fine. The campaign wasn’t.

That is what the Mixpanel MCP connection gives you. In this guide I’ll walk you through connecting Mixpanel to Claude, the setup options I actually use, and the mistakes I’ve watched teams make along the way.

What the Mixpanel MCP server actually does

Mixpanel hosts a Model Context Protocol (MCP) server. Once Claude is connected to it, Claude can read your Mixpanel data and act on it using plain language, with no dashboard navigation.

In practice, Claude can:

  • Discover your projects, events, properties and property values
  • Query insights, funnels, flows and retention, and render interactive charts in the chat
  • Build dashboards, cohorts, custom properties, lookup tables and saved metrics
  • Clean up Lexicon: add descriptions, tag events, hide stale events, flag PII, merge duplicate event names
  • Triage data quality issues and dismiss the ones you’ve already handled
  • Investigate users by pairing session replays with their event history
  • Manage experiments and feature flags (currently in open Beta)

The important part: it reads and writes. That’s what makes it powerful, and it’s also why the setup and permission choices below matter.

Before you start: three things to check

Most failed setups I’ve debugged weren’t Claude problems. They were one of these three.

1. Is MCP enabled for your organization? New free and Growth accounts created after August 1, 2026 have MCP on by default. Every other account needs an org admin to switch it on in Settings → Org → Overview. Changes can take up to 15 minutes to apply, so don’t panic if it doesn’t work instantly.

2. Which region is your data in? This decides which URL you connect to:

RegionMCP server URL
UShttps://mcp.mixpanel.com/mcp
EUhttps://mcp-eu.mixpanel.com/mcp
Indiahttps://mcp-in.mixpanel.com/mcp

3. What can your Mixpanel user see? Claude signs in with your own Mixpanel credentials, so your existing roles and project permissions apply. If you can’t see a project in the Mixpanel UI, Claude can’t see it either.

One client in Germany spent a morning convinced the connector was broken. Their data lived in EU residency, and they’d connected to the US endpoint. Check the region first.

Option 1: Connect Mixpanel to Claude with OAuth (recommended)

This is the setup I give 90% of clients. You sign in through the browser with your Mixpanel account, and that’s it.

If your data is in the US region:

  1. Open the Mixpanel connector in the Claude directory.
  2. Click Connect.
  3. Complete the Mixpanel OAuth login in the browser window that opens.
  4. Approve the requested access.
  5. Start a new chat and ask: “What Mixpanel projects do I have access to?” If you get a list back, you’re connected.

If your data is in the EU or India region:

The directory connector points at the US server, so you’ll add a custom connector instead.

  1. In Claude, go to Settings → Connectors → Add Custom Connector.
  2. Give it a name, for example “Mixpanel EU”.
  3. Paste your regional URL: https://mcp-eu.mixpanel.com/mcp or https://mcp-in.mixpanel.com/mcp.
  4. Save, then complete the Mixpanel OAuth flow.
  5. Run the same test prompt in a new chat.

Tip from experience: name the connector with the region in it. When you manage several clients across regions, “Mixpanel EU” saves you from guessing which one you’re querying.

Option 2: Claude Desktop with a service account

Use this when you don’t want a personal login tied to the connection, for example a shared analyst machine or an automated reporting agent. Service account auth for MCP is still in Beta, so expect the interface to change.

Step 1: Create the service account. In Mixpanel, go to Organization settings or Project settings and create one. You need Owner or Admin permissions. Copy the secret immediately; you won’t see it again.

Step 2: Give it project access. The service account only sees projects you add it to. Add only the ones it needs.

Step 3: Build the authorization header. Base64-encode username:secret:

echo -n "<username>:<secret>" | base64

The header value becomes Bearer Basic <base64-encoded-credentials>. Note the unusual “Bearer Basic” prefix; I’ve seen people drop one of those words and get stuck on auth errors.

Step 4: Add it to Claude Desktop. Open Settings → Developer → Edit Config and add:

{
  "mcpServers": {
    "mixpanel": {
      "url": "https://mcp.mixpanel.com/mcp",
      "headers": {
        "Authorization": "Bearer Basic <base64-encoded-credentials>"
      }
    }
  }
}

Swap in the EU or India URL if needed.

Step 5: Restart Claude Desktop. It doesn’t pick up config changes until you do.

Treat that base64 string like a password. It is not encryption; anyone can decode it in one command.

Option 3: Claude Code (and the Mixpanel plugin)

If you implement tracking in code, this is where the connection earns its keep. You can write the mixpanel.track() call and verify the event landed, all in the same terminal session.

Add the server with OAuth:

claude mcp add --transport http mixpanel https://mcp.mixpanel.com/mcp

Then run /mcp inside Claude Code and finish the OAuth login in your browser.

Or with a service account, keeping the secret in an environment variable via .mcp.json:

{
  "mcpServers": {
    "mixpanel": {
      "type": "http",
      "url": "https://mcp.mixpanel.com/mcp",
      "headers": {
        "Authorization": "Bearer Basic ${MIXPANEL_SA_TOKEN}"
      }
    }
  }
}

Set MIXPANEL_SA_TOKEN before starting Claude Code, and keep .mcp.json out of any public repo.

Add the Mixpanel plugin. It layers guided workflows on top of the connection:

claude plugin marketplace add mixpanel/ai-plugins
claude plugin install mixpanel

Then run /mixpanel:install once per project. The skills I reach for most are tracking-implementation for audits, deep-research when a metric moves and nobody knows why, and manage-lexicon when a project has hundreds of undocumented events. The plugin is open source at github.com/mixpanel/ai-plugins.

The first prompts I run on every new connection

Don’t start with your hardest question. Start by letting Claude learn the project, the same way you’d onboard a new analyst.

  1. “What projects do I have access to?” Confirms the connection and the right region.
  2. “What are the most fired events this week?” Shows you what’s actually being tracked, not what the tracking plan says.
  3. “Which properties on checkout_completed are marked as PII?” A quick privacy sanity check.
  4. “Show me all open data quality issues for the Sign Up event.” Tells you whether to trust the numbers before you analyze them.
  5. “What’s our signup-to-purchase conversion rate this month vs last month?” Now you’re doing real analysis.

Once that works, the Lexicon prompts save the most hours: “Add descriptions to any events that don’t have one” or “Hide any events that haven’t fired in the last 90 days.” On a messy project, that’s a full afternoon of clicking done in a few minutes. Review the changes before accepting them, though, which brings me to the mistakes.

Mistakes to avoid (and how to fix them)

Letting Claude write to production Lexicon without review. Bulk edits can touch up to 50 events or properties at once. Ask Claude to list the planned changes first, approve them, then let it apply them.

Expecting cohort breakdowns. Run-Query can’t filter or break down by cohort, and profile-history (SCD) properties aren’t supported. For those analyses, use the Mixpanel UI.

Forgetting the rate limit. It’s 600 MCP requests per hour per user. A long, exploratory session on a big project can get close, so batch your questions.

Using one personal login for a whole team. Every change is logged against the connected account. If five people share your OAuth session, the audit trail says you did everything.

When something breaks, it’s usually one of these:

Error or symptomFix
“MCP access is not enabled for this project”Ask an org admin to enable MCP in Settings → Org → Overview, then wait up to 15 minutes
“Missing scope” errorDelete the cached .mcp-auth folder and re-authorize
Authorization failsConfirm your account can access at least one project and MCP is enabled org-wide
Claude Desktop ignores config changesFully restart the app
No projects or empty resultsCheck you’re on the right regional URL

Security: what to settle before you connect a client’s data

When you connect, your Mixpanel query results are sent to Claude to answer your questions. For most product analytics that’s fine. For projects holding personal data, check your GDPR or CCPA obligations, and the client’s own policies, before you connect.

My rule of thumb for client work:

  • Connect with an account scoped to only the projects you need
  • Use a service account for anything automated or shared
  • Keep credentials in environment variables or a secret manager, never in a committed file
  • Tell the client you’re using it, and explain that every change is recorded in their Mixpanel audit log with an MCP origin

Final thoughts

The connection takes five minutes. The real value shows up in the weeks after, when “is it the tracking or is it real?” stops being a twenty-minute investigation and becomes a two-minute conversation.

Start with read-only questions, get comfortable with how Claude interprets your events, then let it help with Lexicon cleanup and dashboards. If you’re working with server-side tracking, connecting Mixpanel to Claude is also one of the fastest ways to confirm your events arrive with the properties you expect.

Need help setting up Mixpanel tracking or auditing a messy project?

Sources