Skip to content

Connect Mixpanel to Claude Code

  • Does our tracking plan match the code?

Use Claude Code to check your tracking code against the events Mixpanel actually receives, and fix what's missing. Lemonado connects them in about 1 minute, no API keys needed.

MCPhttps://mcp.lemonado.io/mcp

Why connect Mixpanel to Claude Code?

Most Mixpanel problems are tracking problems: an event renamed in code, a property never sent, a call that fires twice. Claude Code sees the tracking calls in your repo, and with Lemonado it sees what Mixpanel received, so it can find and fix the mismatch.

  • All your Mixpanel data

    Every event you track, with its properties, ready to ask about.

  • Always today's numbers

    Retention by signup week, synced from Mixpanel automatically, so answers use today's numbers.

  • Connect all your tools

    Questions like "Which channel brings active users?" use Mixpanel and PostHog, GA4 at once.

How to connect Mixpanel to Claude Code

Before you start

  • A Mixpanel account you can sign in to
  • Claude Code installed
  • A Lemonado account (the free trial works)
  1. 1

    Connect Mixpanel in Lemonado

    In Lemonado, open Connectors, find Mixpanel and sign in. Sign in to Mixpanel and pick the project. If your data lives in the EU or India region, pick that project, not a US one.

  2. 2

    Turn on external access

    In the company's settings, open External tools, turn the connection on, choose which sources it can reach and copy the server URL.

    text
    https://mcp.lemonado.io/mcp
  3. 3

    Add the server

    With Claude Code installed, run one of these in your terminal. Most people want the first: it adds Lemonado to every project.

    bash
    # every project (recommended)
    claude mcp add --scope user --transport http lemonado https://mcp.lemonado.io/mcp
    
    # this project only
    claude mcp add --transport http lemonado https://mcp.lemonado.io/mcp
  4. 4

    Sign in

    Start Claude Code with claude and run /mcp. Choose Lemonado and finish the sign-in in your browser.

    bash
    claude
    /mcp
  5. 5

    Ask Claude Code about Mixpanel

    Ask a question about the accounts your connection can reach. Claude Code can also write the numbers into a file or a script for you. Try "Compare the track() calls in our code with the events Mixpanel received in the last 7 days. Which events are in code but never arrive, or arrive but aren't in code?" Or ask: "Are UTMs set on users?" or "Can this run every Monday?"

Good to know

  • The command uses Claude Code's default local scope. Use --scope user to share the server across projects.

What can Claude Code do with Mixpanel?

Claude Code queries your Mixpanel data while it works in your repo: it saves data as files, checks tracking against code and runs headless with claude -p.

Claude Code logoClaude Code

Compare the track() calls in our code with the events Mixpanel received in the last 7 days. Which events are in code but never arrive, or arrive but aren't in code?

3 events never arrive: "Invite Sent" is tracked as "invite_sent" in hooks/useInvite.ts. 2 old events still arrive from the mobile app, which isn't in this repo.

Source: Mixpanel + your code

Reading this as an AI agent?

Everything an agent needs to set this up, in plain text. Paste this page's link into Claude Code and ask it to connect you, or copy the block.

For agents · markdown
# Connect Mixpanel to Claude Code (Lemonado MCP)

- Server URL: https://mcp.lemonado.io/mcp
- Transport: Streamable HTTP
- Auth: OAuth; the user signs in to Lemonado in the browser. No API keys.
- In Lemonado: connect the Mixpanel project. Sign in to Mixpanel and pick the project. If your data lives in the EU or India region, pick that project, not a US one.
- In Claude Code: Terminal: claude mcp add

```bash
# every project (recommended)
claude mcp add --scope user --transport http lemonado https://mcp.lemonado.io/mcp

# this project only
claude mcp add --transport http lemonado https://mcp.lemonado.io/mcp
```

If you are Claude Code, run the setup yourself:

Add the Lemonado MCP server for all my projects by running: claude mcp add --scope user --transport http lemonado https://mcp.lemonado.io/mcp
Then tell me to run /mcp and sign in to Lemonado. Once I've signed in, list the Mixpanel accounts Lemonado can reach.

First question to try: "Compare the track() calls in our code with the events Mixpanel received in the last 7 days. Which events are in code but never arrive, or arrive but aren't in code?"

More: https://lemonado.io/integrations/mixpanel · https://lemonado.io/llms.txt
FAQ

Frequently Asked Questions

Yes, if both are connected in Lemonado. Claude Code can then match Mixpanel users with accounts or plans in your database in one query, for example to see which events come before an upgrade.

Yes. Mixpanel's official MCP server is hosted, so Claude Code can use it too. It covers Mixpanel only. Lemonado covers Mixpanel plus your ad platforms, GA4 and the rest of your stack in one connection, so Claude Code can answer questions across them.

Run claude mcp list to see whether lemonado is connected. If it needs authentication, run /mcp inside Claude Code and sign in again. In Lemonado, check that Mixpanel is connected and External tools is on for the company. If events look short, check you picked the right project and data region, and that your signup code sends UTM properties to Mixpanel.

Yes, if both are connected in Lemonado. One connection reaches every source you allow, so you can ask things like "Google Ads, Meta and LinkedIn spend last month next to Mixpanel users from each who were still active after 30 days."

MCP is included in Lemonado's paid plans and in the free trial, so you can try it before you pay.

See plans and pricing

Still have a question?

Shoot us an email at hello@lemonado.io.

Try for free

Stop fighting with data. Start feeding your AI.

Connect your data to AI and free your team from reporting and busywork.

Try Lemonado free