mixpanel
The Mixpanel server allows you to interact with Mixpanel analytics data programmatically through MCP clients like Cursor or Claude Desktop.
You can:
Retrieve Event Data: Get today's top events or most common events over the last 31 days
Aggregate Events: Fetch unique, total, or average event counts over various time periods
Analyze Properties: Get aggregated data for specific event properties
Access Reports: Query saved Insights reports using bookmark IDs
Analyze Funnels: Retrieve data for specific funnels and list all saved funnels
Query Retention: Analyze user retention data with customizable parameters
Run JQL Scripts: Execute custom JSON Query Language for advanced analytics
Segment Data: Sum numeric expressions for events over defined time periods
List Cohorts: Retrieve all cohorts in a Mixpanel project
Allows querying Mixpanel analytics data including events, retention, and funnels. Provides access to Mixpanel data through an MCP server for on-demand analytics lookups.
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 show weekly retention for users who signed up last month"
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.
Mixpanel MCP
Simple MCP server that interfaces with the Mixpanel API, allowing you to talk to your Mixpanel events data from any MCP client like Cursor or Claude Desktop. Query events data, retention, and funnels. Great for on-demand look ups like: "What's the weekly retention for users in the Feb 1 cohort?"
I am adding more coverage of the Mixpanel API over time, let me know which tools you need or just open a PR.
Installation
Make sure to go to your Mixpanel Organization Settings to set up a Mixpanel Service Account, get the username, password, and your project ID (in Mixpanel Project Settings).
Installing via Smithery
To install mixpanel-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @dragonkhoi/mixpanel-mcp --client claudeTo install mixpanel-mcp for Cursor, go to Settings -> Cursor Settings -> Features -> MCP Servers -> + Add
Select Type: command and paste the below, using the arguments <USERNAME> <PW> <PROJECT_ID> from Mixpanel
npx -y @smithery/cli@latest run @dragonkhoi/mixpanel-mcp --config "{\"username\":\"YOUR_SERVICE_ACCT_USERNAME\",\"password\":\"YOUR_SERVICE_ACCT_PASSWORD\",\"projectId\":\"YOUR_MIXPANEL_PROJECT_ID\"}"Clone and run locally
Clone this repo
Run npm run build
Paste this command into Cursor (or whatever MCP Client)
node /ABSOLUTE/PATH/TO/mixpanel-mcp/build/index.js YOUR_SERVICE_ACCOUNT_USERNAME YOUR_SERVICE_ACCOUNT_PASSWORD YOUR_PROJECT_ID
Related MCP server: Mixpanel MCP Connector
Examples
Ask about retention numbers
Ask for an overview of events
Available Tools
19 toolsaggregated_event_property_valuesB
Get unique, general, or average data for a single event and property over days, weeks, or months. Useful for analyzing how specific properties affect event performance, segmenting users, and identifying valuable user attributes.
Inputs: event (required), name (required), unit (required), from_date, +6 more.
aggregate_event_countsB
Get unique, general, or average data for a set of events over N days, weeks, or months. Useful for trend analysis, comparing event performance over time, and creating time-series visualizations.
Inputs: event (required), unit (required), from_date, interval, +3 more.
custom_jqlB
Run a custom JQL (JSON Query Language) script against your Mixpanel data. Useful for complex custom analyses, advanced data transformations, and queries that can't be handled by standard report types.
Inputs: script (required), params, project_id, workspace_id.
get_today_top_eventsB
Get today's top events from Mixpanel. Useful for quickly identifying the most active events happening today, spotting trends, and monitoring real-time user activity.
Inputs: limit, project_id, type.
get_top_eventsB
Get a list of the most common events over the last 31 days. Useful for identifying key user actions, prioritizing feature development, and understanding overall platform usage patterns.
Inputs: limit, project_id, type.
list_saved_cohortsB
Get all cohorts in a given project. Useful for discovering user segments, planning targeted analyses, and retrieving cohort IDs for filtering in other reports.
Inputs: project_id, workspace_id.
list_saved_funnelsA
Get the names and IDs of your saved funnels. Useful for discovering available funnels for analysis and retrieving funnel IDs needed for the query_funnel_report tool.
Inputs: project_id, workspace_id.
profile_event_activityB
Get data for a profile's event activity. Useful for understanding individual user journeys, troubleshooting user-specific issues, and analyzing behavior patterns of specific users.
Inputs: distinct_ids (required), from_date (required), to_date (required), project_id, +1 more.
query_frequency_reportC
Get data for frequency of actions over time. Useful for analyzing how often users perform specific actions, identifying patterns of behavior, and tracking user engagement over time.
Inputs: addiction_unit (required), from_date (required), to_date (required), unit (required), +6 more.
query_funnel_reportA
Get data for a funnel based on a funnel_id. Useful for analyzing user conversion paths, identifying drop-off points in user journeys, and optimizing multi-step processes. Funnel IDs should be retrieved using the list_saved_funnels tool.
Inputs: from_date (required), funnel_id (required), to_date (required), interval, +5 more.
query_insights_reportB
Get data from your Insights reports. Useful for accessing saved analyses, sharing standardized metrics across teams, and retrieving complex pre-configured visualizations.
Inputs: bookmark_id (required), project_id, workspace_id.
query_profilesB
Query Mixpanel user profiles with filtering options. Useful for retrieving detailed user profiles, filtering by specific properties, and analyzing user behavior across different dimensions.
Inputs: as_of_timestamp, behaviors, data_group_id, distinct_id, +9 more.
query_retention_reportB
Get data from your Retention reports. Useful for analyzing user engagement over time, measuring product stickiness, and understanding how well your product retains users after specific actions. Only use params interval or unit, not both.
Inputs: from_date (required), to_date (required), born_event, born_where, +10 more.
query_segmentation_averageB
Averages an expression for events per unit time. Useful for calculating average values like purchase amounts, session durations, or any numeric metric, and tracking how these averages change over time.
Inputs: event (required), from_date (required), on (required), to_date (required), +4 more.
query_segmentation_bucketB
Get data for an event, segmented and filtered by properties, with values placed into numeric buckets. Useful for analyzing distributions of numeric values, creating histograms, and understanding the range of quantitative metrics.
Inputs: event (required), from_date (required), on (required), to_date (required), +5 more.
query_segmentation_reportB
Get data for an event, segmented and filtered by properties. Useful for breaking down event data by user attributes, comparing performance across segments, and identifying which user groups perform specific actions.
Inputs: event (required), from_date (required), to_date (required), where (required), +8 more.
query_segmentation_sumB
Sum a numeric expression for events over time. Useful for calculating revenue metrics, aggregating quantitative values, and tracking cumulative totals across different time periods.
Inputs: event (required), from_date (required), on (required), to_date (required), +4 more.
top_event_propertiesB
Get the top property names for an event. Useful for discovering which properties are most commonly associated with an event, prioritizing which dimensions to analyze, and understanding event structure.
Inputs: event (required), limit, project_id, workspace_id.
top_event_property_valuesB
Get the top values for a property. Useful for understanding the distribution of values for a specific property, identifying the most common categories or segments, and planning further targeted analyses.
Inputs: event (required), name (required), limit, project_id, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have distinct purposes with clear boundaries, such as query_funnel_report for funnel analysis versus query_retention_report for retention metrics. However, there is some overlap between aggregated_event_property_values and aggregate_event_counts, as both handle aggregated event data but differ in scope (single vs. multiple events), which could cause minor confusion for agents.
Tool names follow a highly consistent verb_noun pattern throughout, such as list_saved_cohorts, query_funnel_report, and get_top_events. All tools use snake_case uniformly, with clear and predictable naming conventions that enhance readability and predictability for agents.
With 19 tools, the count is borderline high for an analytics server, potentially overwhelming for agents to navigate efficiently. While the tools cover a broad range of Mixpanel functionalities, the number approaches the upper limit of what is manageable without clear categorization or grouping.
The tool set provides comprehensive coverage of Mixpanel's core analytics capabilities, including event analysis, segmentation, funnels, retention, and user profiling. There are no obvious gaps; tools like custom_jql even allow for advanced custom queries, ensuring agents can handle a wide variety of data analysis tasks without dead ends.
Maintenance
Related MCP Connectors
Query Mixpanel events, funnels, retention, segmentation and insights (JQL).
Mixpanel MCP — wraps Mixpanel Data Export API (mixpanel.com/api)
Ask your web and product analytics: traffic, funnels, goals, revenue and sessions.
Search, access, and get insights on your Amplitude data
Related MCP Servers
- 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
- FlicenseNot gradedqualityNot gradedmaintenanceEnables ChatGPT to query and analyze Mixpanel analytics data in real-time. Provides live access to event segmentation and detailed analytics data from your Mixpanel project through natural language.-
- AlicenseBqualityDmaintenanceAn MCP server that provides access to the Mixpanel REST API, enabling AI agents to query events, funnels, retention data, and user profiles. It allows users to perform complex analytics tasks and export raw event data through natural language prompts.1619 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to track events, page views, user signups, and update user profiles in Mixpanel.50 npm1MIT