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.
Before installation, you'll need to set up a Mixpanel Service Account. This involves collecting three important pieces of information:
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.
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
To set up the Mixpanel MCP server in Cursor:
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\"}"
If you prefer to run the server locally:
npm run build
node /ABSOLUTE/PATH/TO/mixpanel-mcp/build/index.js YOUR_SERVICE_ACCOUNT_USERNAME YOUR_SERVICE_ACCOUNT_PASSWORD YOUR_PROJECT_ID
Once installed, you can interact with your Mixpanel data by asking natural language questions in your MCP client.
You can ask questions about user retention such as:
You can request summaries of event data:
You can query funnel data such as:
The MCP server interprets these natural language queries and returns formatted data from your Mixpanel project.
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.
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"
]
}
}
}
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.
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.