Provides tools for interacting with the Mixpanel REST API, enabling AI agents to query event data, funnels, retention reports, and user profiles, run JQL scripts, and export raw event data directly from Mixpanel.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mixpanel MCP ServerShow me the conversion rate for our onboarding funnel"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@t-campbell18/mcp-mixpanel
An MCP (Model Context Protocol) server that wraps the Mixpanel REST API. Query events, funnels, retention, user profiles, and more — directly from any MCP-compatible AI agent.
Quick Start
npm install -g @t-campbell18/mcp-mixpanelSet the required environment variables and run:
export MIXPANEL_PROJECT_ID="your-project-id"
export MIXPANEL_SERVICE_ACCOUNT_USERNAME="your-username"
export MIXPANEL_SERVICE_ACCOUNT_PASSWORD="your-password"
mcp-mixpanelEnvironment Variables
Variable | Required | Description |
| Yes | Your Mixpanel project ID |
| One auth method | Service account username |
| One auth method | Service account password |
| One auth method | Project API secret (legacy) |
| No |
|
Authentication
At least one authentication method is required:
Service Account (recommended): Set both
MIXPANEL_SERVICE_ACCOUNT_USERNAMEandMIXPANEL_SERVICE_ACCOUNT_PASSWORD. Service accounts support all query and export endpoints.API Secret (legacy): Set
MIXPANEL_API_SECRET. Falls back to this if no service account is configured.
Tools
Query API
Tool | Description | Example Prompt |
| Query event data with segmentation | "How many signups happened last week?" |
| Get the most common events | "What are the top events today?" |
| Get top properties for an event | "What properties does the Purchase event have?" |
| Query a saved funnel | "Show me conversion for funnel 12345" |
| List all saved funnels | "What funnels do we have?" |
| Query retention data | "What's our 7-day retention for signups?" |
| Get frequency/addiction report | "How often do users perform the Search event?" |
| Query user profiles | "Find users who were last seen after Jan 1" |
| Get a user's event stream | "Show me recent activity for user abc123" |
| Run a saved Insights report | "Run insights report 67890" |
| Run a JQL script | "Run this JQL to find power users" |
| Sum a numeric property over time | "What's total revenue this month?" |
| Average a numeric property over time | "What's the average order value this week?" |
| List all cohorts | "What cohorts do we have?" |
Export API
Tool | Description | Example Prompt |
| Export raw event data (NDJSON, max 5000) | "Export all Purchase events from last week" |
Annotations
Tool | Description | Example Prompt |
| List annotations in a date range | "Show annotations from this month" |
Setup
Claude Code
claude mcp add mixpanel -- npx -y @t-campbell18/mcp-mixpanelSet environment variables in your shell before running Claude Code.
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"mixpanel": {
"command": "npx",
"args": ["-y", "@t-campbell18/mcp-mixpanel"],
"env": {
"MIXPANEL_PROJECT_ID": "your-project-id",
"MIXPANEL_SERVICE_ACCOUNT_USERNAME": "your-username",
"MIXPANEL_SERVICE_ACCOUNT_PASSWORD": "your-password"
}
}
}
}Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"mixpanel": {
"command": "npx",
"args": ["-y", "@t-campbell18/mcp-mixpanel"],
"env": {
"MIXPANEL_PROJECT_ID": "your-project-id",
"MIXPANEL_SERVICE_ACCOUNT_USERNAME": "your-username",
"MIXPANEL_SERVICE_ACCOUNT_PASSWORD": "your-password"
}
}
}
}VS Code
Add to your VS Code MCP settings (.vscode/mcp.json):
{
"servers": {
"mixpanel": {
"command": "npx",
"args": ["-y", "@t-campbell18/mcp-mixpanel"],
"env": {
"MIXPANEL_PROJECT_ID": "your-project-id",
"MIXPANEL_SERVICE_ACCOUNT_USERNAME": "your-username",
"MIXPANEL_SERVICE_ACCOUNT_PASSWORD": "your-password"
}
}
}
}OpenClaw
mcp_servers:
- name: mixpanel
command: npx
args: ["-y", "@t-campbell18/mcp-mixpanel"]
env:
MIXPANEL_PROJECT_ID: "your-project-id"
MIXPANEL_SERVICE_ACCOUNT_USERNAME: "your-username"
MIXPANEL_SERVICE_ACCOUNT_PASSWORD: "your-password"EU Region
If your Mixpanel project is in the EU data residency, set:
export MIXPANEL_REGION=EUThis routes all API calls to Mixpanel's EU endpoints automatically.
License
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.