Connect
Mixpanel to
Claude Code
- Does our tracking plan match the code?
https://mcp.lemonado.io/mcpUse 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.
https://mcp.lemonado.io/mcpWhy 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
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
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.
texthttps://mcp.lemonado.io/mcp - 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
Sign in
Start Claude Code with claude and run /mcp. Choose Lemonado and finish the sign-in in your browser.
bashclaude /mcp - 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.
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
Check that our signup code sets UTM properties on the Mixpanel user, and how many users from last week have none.
The signup page sets them, but the Google sign-up flow in auth/google.ts skips it. 38% of last week's users have no UTM source.
Source: Mixpanel + your code
Write a prompt file that pulls last week's Mixpanel signups and activation by UTM source and saves reports/activation.md.
Saved prompts/activation.md. Run it with claude -p on Monday mornings and it writes the activation report from that week's data.
Source: Mixpanel + your code
Find Mixpanel events where the same user sends the same event twice within one second, and check the code that sends them.
"Report Viewed" doubles for 31% of users. It's tracked in both ReportPage.tsx and the router listener; removed the router call.
Source: Mixpanel + your code
Which events in the first 7 days best predict that a user is still active after 60 days?
Sharing a report in week one is the strongest signal: 64% of users who do it are still active at day 60, against 19% who don't.
Source: Mixpanel
Google Ads, Meta and LinkedIn spend last month next to Mixpanel users from each who were still active after 30 days.
Meta brings the cheapest signups at $14 but $96 per user active at day 30. Google Ads costs $31 per signup and $74 per active user.
Source: Mixpanel
Connect Mixpanel to another AI app.
Claude
Connect Mixpanel to Claude
ChatGPT
Connect Mixpanel to ChatGPT
Cursor
Connect Mixpanel to Cursor
VS Code (GitHub Copilot)
Connect Mixpanel to VS Code (GitHub Copilot)
Codex
Connect Mixpanel to Codex
Perplexity
Connect Mixpanel to Perplexity
Google Antigravity
Connect Mixpanel to Google Antigravity
Windsurf (Devin Desktop)
Connect Mixpanel to Windsurf (Devin Desktop)
Zed
Connect Mixpanel to Zed
n8n
Connect Mixpanel to n8n
Other integrations for Claude Code
All Claude Code integrations- PostHog in Claude CodePut PostHog product data next to your ad spend in Claude, ChatGPT or Cursor.
- Google Analytics in Claude CodeAsk Claude, ChatGPT or Cursor about GA4 traffic, conversions and funnels, next to your ad spend.
- Stripe in Claude CodePut Stripe revenue next to your ad spend in Claude, ChatGPT or Cursor.
- Google Ads in Claude CodeAsk Claude, ChatGPT or Cursor about your Google Ads campaigns, search terms and spend.
- Amplitude in Claude CodeAsk Claude, ChatGPT or Cursor which campaigns bring Amplitude users who stick around.
- Snowflake in Claude CodeAsk Claude, ChatGPT or Cursor about the numbers in your Snowflake warehouse, with live ad spend next to them.
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.
# 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
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.
Still have a question?
Shoot us an email at hello@lemonado.io.
Try for freeStop fighting with data. Start feeding your AI.
Connect your data to AI and free your team from reporting and busywork.
Try Lemonado free