Mixpanel MCP server

Integrates with Mixpanel's API to enable querying of events data, retention, and funnels for on-demand analytics and custom report generation.
Back to servers
Provider
Khoi Le
Release date
Mar 02, 2025
Language
TypeScript
Stats
12 stars

This MCP server interfaces with the Mixpanel API, allowing you to query Mixpanel events data, retention, and funnels directly from MCP clients like Cursor or Claude Desktop. It provides a convenient way to perform on-demand lookups such as checking weekly retention for specific user cohorts.

Installation

Before installation, you'll need to set up a Mixpanel Service Account. This involves collecting three important pieces of information:

  1. Service Account username
  2. Service Account password
  3. Your Mixpanel Project ID

Setting Up Mixpanel Service Account

Go to your Mixpanel Organization Settings and create a Mixpanel Service Account. Note your username, password, and find your project ID in Mixpanel Project Settings.

Installing via Smithery

The easiest way to install the Mixpanel MCP server for Claude Desktop is through Smithery:

npx -y @smithery/cli install @dragonkhoi/mixpanel-mcp --client claude

Installing for Cursor

To set up the Mixpanel MCP server in Cursor:

  1. Go to Settings → Cursor Settings → Features → MCP Servers → + Add
  2. Select Type: command
  3. Paste the following command, replacing the placeholders with your actual credentials:
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\"}"

Manual Installation

If you prefer to run the server locally:

  1. Clone the repository
  2. Build the project:
    npm run build
    
  3. Run the server from your MCP client with this command:
    node /ABSOLUTE/PATH/TO/mixpanel-mcp/build/index.js YOUR_SERVICE_ACCOUNT_USERNAME YOUR_SERVICE_ACCOUNT_PASSWORD YOUR_PROJECT_ID
    

Usage Examples

Once installed, you can interact with your Mixpanel data by asking natural language questions in your MCP client.

Querying Retention Data

You can ask questions about user retention such as:

  • "What's the weekly retention for users in the Feb 1 cohort?"
  • "Show me the retention numbers for new users in March"
  • "Compare retention between January and February cohorts"

Getting Event Overviews

You can request summaries of event data:

  • "Give me an overview of all events from last week"
  • "What are the most frequent events in my project?"
  • "Show me conversion events from the past month"

Analyzing Funnels

You can query funnel data such as:

  • "What's the conversion rate in our signup funnel?"
  • "Show me the drop-off points in our checkout process"
  • "Compare this month's funnel performance to last month"

The MCP server interprets these natural language queries and returns formatted data from your Mixpanel project.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later