Mixpanel MCP Server
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 "Deploy 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 Server Show 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-mixpanelRelated MCP server: Mixpanel MCP
Environment 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
Available Tools
16 toolsevent_propertiesC
Get the top properties for a specific event. Returns property names ranked by prevalence.
Inputs: event (required), limit.
export_eventsA
Export raw event data as NDJSON. Returns individual events with all properties. Capped at 5000 events.
Inputs: from_date (required), to_date (required), event, where, +1 more.
frequency_reportC
Get a frequency report (addiction report). Shows how often users perform an event within a time window.
Inputs: event (required), from_date (required), to_date (required), addiction_unit, +3 more.
list_annotationsC
List all annotations in the project. Annotations are notes attached to specific dates.
Inputs: from_date (required), to_date (required).
list_cohortsB
List all cohorts in the project. Returns cohort IDs, names, and metadata.
Inputs: no named parameters.
list_funnelsB
List all saved funnels in the project. Returns funnel IDs and names.
Inputs: no named parameters.
query_eventsC
Query event data with segmentation. Returns time-series event counts, optionally segmented by a property.
Inputs: event (required), from_date (required), to_date (required), on, +3 more.
query_funnelsB
Query a saved funnel by ID. Returns conversion rates and drop-off at each step.
Inputs: funnel_id (required), from_date (required), to_date (required), unit, +3 more.
query_insightsC
Run an Insights report. Flexible analytics query supporting multiple event types.
Inputs: bookmark_id (required).
query_profilesC
Query user profiles using the Engage API. Filter and retrieve user profile data.
Inputs: where, output_properties, page, session_id, +1 more.
query_retentionC
Query retention data. Shows how many users come back after an initial event.
Inputs: from_date (required), to_date (required), born_event (required), event, +6 more.
run_jqlC
Run a JQL (JavaScript Query Language) script against Mixpanel data. Allows complex custom queries.
Inputs: script (required), params.
segmentation_averageB
Get the average of a numeric event property over time. Useful for tracking averages like order value.
Inputs: event (required), from_date (required), to_date (required), on (required), +2 more.
segmentation_sumC
Get the sum of a numeric event property over time. Useful for tracking totals like revenue.
Inputs: event (required), from_date (required), to_date (required), on (required), +2 more.
top_eventsB
Get the most common events over the last day. Returns event names ranked by volume.
Inputs: type, limit.
user_activityC
Get a user's activity stream. Returns recent events for a specific user.
Inputs: distinct_id (required), from_date (required), to_date (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool has a clearly distinct purpose targeting specific Mixpanel functionalities like events, funnels, cohorts, or user data, with no significant overlap. For example, 'query_events' focuses on time-series counts, while 'export_events' handles raw data export, making misselection unlikely.
Most tools follow a consistent verb_noun pattern (e.g., 'list_annotations', 'query_funnels', 'run_jql'), with minor deviations like 'event_properties' and 'user_activity' using noun_verb or noun_noun structures. Overall, the naming is readable and predictable.
With 16 tools, the set is slightly on the heavier side but reasonable for Mixpanel's broad analytics scope, covering events, profiles, reports, and queries. Each tool appears to earn its place by addressing a specific aspect of the platform.
The tool surface provides comprehensive coverage of Mixpanel's core analytics domain, including CRUD-like operations (e.g., querying, listing, exporting) for events, funnels, cohorts, and user data, with no obvious gaps that would hinder agent workflows.
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Clamp Analytics MCP server: traffic, revenue, funnels, cohorts, errors, and search, for AI agents.
Analytics your AI agent can actually use. Track, experiment, and optimize via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact with Mixpanel analytics, allowing them to track events, page views, user signups, and update user profiles directly through natural language requests.50 npm5MIT
- AlicenseBqualityDmaintenanceA server that interfaces with the Mixpanel API, allowing users to query events data, retention, and funnels through natural language from any MCP client like Cursor or Claude Desktop.1336 npmMIT
- FlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to interact with the CleverTap REST API to manage user profiles, events, campaigns, and reports. It supports multi-project configurations and provides tools for data analysis and campaign management through natural language.123 npm6-
- AlicenseNot gradedqualityBmaintenanceMCP server that provides product and web analytics capabilities, allowing AI coding assistants to query funnels, retention, trends, feature flags, A/B tests, and more in natural language.4MIT