home / mcp / mixpanel mcp server
MCP server for Mixpanel Analytics integration with AI assistants. Enables Claude and other MCP clients to track events, pageviews, and user profiles through conversational interfaces.
Configuration
View docs{
"mcpServers": {
"moonbirdai-mixpanel-mcp-server": {
"command": "npx",
"args": [
"-y",
"mixpanel-mcp-server",
"--token",
"YOUR_MIXPANEL_TOKEN"
]
}
}
}You run a Mixpanel MCP Server to connect Mixpanel analytics with AI workflows. It lets AI assistants track events, page views, signups, and update user profiles in Mixpanel, enabling richer insights and automated analytics within your conversations and automated tasks.
Use the Mixpanel MCP Server with an MCP client to enable seamless analytics in AI conversations. You can track custom events, page views with referrer information, signups, and user profile updates from your assistant. The server is designed to work with standard MCP clients via a simple stdio transport, so you can connect from Claude Desktop or other MCP-enabled tools and start issuing analytics commands as part of your prompts.
Prerequisites you need before starting:
- Node.js 16 or higher
- A Mixpanel project token
# Install globally (recommended)
npm install -g mixpanel-mcp-server
# Or run directly with npx
npx mixpanel-mcp-server --token YOUR_MIXPANEL_TOKENConfigure Claude Desktop to connect to the Mixpanel MCP Server by adding an MCP server entry to its config. This enables Claude to dispatch Mixpanel analytics commands during conversations.
{
"mcpServers": {
"mixpanel-analytics": {
"command": "npx",
"args": [
"-y",
"mixpanel-mcp-server",
"--token",
"YOUR_MIXPANEL_TOKEN"
]
}
}
}The server uses the standard MCP transport and can be connected from Claude Desktop or other MCP clients. You can start using these capabilities in your prompts: track a custom event, track a page view, create a user profile on signup, or update an existing user profile.
Tools exposed by the Mixpanel MCP Server include the following actions you can perform from your MCP client:
Practical scenarios include tracking a button click, creating a user profile for a new signup, and updating user profile properties from within AI-assisted workflows.
Common issues include server startup problems, Claude Desktop not showing Mixpanel tools, and events not appearing in Mixpanel. Check that you provided a valid Mixpanel token, ensure Node.js is the correct version, verify the client configuration, and allow a few minutes for events to appear in Mixpanel if needed.
Store your Mixpanel token securely and limit access to the configuration file. Consider using environment variables for sensitive values in production and be aware that events are sent directly to Mixpanel’s API.
Contributions are welcome. You can submit improvements, fix issues, or add new analytics capabilities that integrate with Mixpanel.
This project is licensed under the MIT License.
Tracks a custom event in Mixpanel with a name, optional distinct_id, and optional properties to attach to the event.
Tracks a page view in Mixpanel, including the page name, optional distinct_id, and an optional referrer.
Tracks a signup event and creates a user profile with provided user information and plan details.
Updates a user's Mixpanel profile with specified properties such as name, email, plan, and company.