what is Mixpanel MCP Server?
Mixpanel MCP Server is a serverless API designed to handle Mixpanel MCP requests, acting as a proxy between the MCP client and Mixpanel.
how to use Mixpanel MCP Server?
To use the Mixpanel MCP Server, deploy it to Vercel, connect it to your Mixpanel account, and use the provided API endpoints to track events and manage user profiles.
key features of Mixpanel MCP Server?
- Serverless architecture for handling Mixpanel requests
- Easy integration with Claude Desktop via the mixpanel-mcp-wrapper
- Supports multiple API endpoints for tracking events and user profiles
use cases of Mixpanel MCP Server?
- Tracking custom events in Mixpanel.
- Managing user profiles and properties.
- Integrating Mixpanel analytics into applications seamlessly.
FAQ from Mixpanel MCP Server?
- How do I deploy the Mixpanel MCP Server?
You can deploy it to Vercel by forking the repository and following the deployment instructions.
- What API endpoints are available?
The server supports endpoints like
/api/test
for testing and/api/proxy
for handling MCP requests.
- Is there any configuration needed?
No configuration is needed as all parameters are passed in each request.
Mixpanel MCP Server
A Model Context Protocol (MCP) server for integrating Mixpanel analytics with Claude and other MCP clients.
Features
- Track custom events in Mixpanel
- Track page views
- Track user signups
- Update user profiles
- Simple, clean implementation following the MCP specification
Installation
Prerequisites
- Node.js 16.x or later
- npm or yarn
- A Mixpanel account and project token
Setup
-
Clone the repository:
git clone https://github.com/your-username/mixpanel-mcp-server.git cd mixpanel-mcp-server
-
Install dependencies:
npm install
-
Make the script executable:
chmod +x index.js
Usage
Running the Server
Run the server directly, providing your Mixpanel token:
./index.js --token YOUR_MIXPANEL_TOKEN
For verbose logging:
./index.js --token YOUR_MIXPANEL_TOKEN --debug
Installing to use with Claude Desktop
-
Make the server globally accessible (optional):
npm install -g .
-
Configure Claude Desktop to use the server:
Edit your Claude Desktop configuration file located at:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
{ "mcpServers": { "mixpanel-analytics": { "command": "mixpanel-mcp-server", "args": ["--token", "YOUR_MIXPANEL_TOKEN"] } } }
If you didn't install globally, specify the full path:
{ "mcpServers": { "mixpanel-analytics": { "command": "node", "args": ["/path/to/mixpanel-mcp-new/index.js", "--token", "YOUR_MIXPANEL_TOKEN"] } } }
- MacOS:
-
Restart Claude Desktop
Available Tools
Once connected, the following tools will be available to Claude:
- track_event: Track a custom event in Mixpanel
- track_pageview: Track a page view event
- track_signup: Track a user signup and create a profile
- set_user_profile: Update a user's profile properties
Testing
To test if the server is working correctly:
-
Run it in debug mode:
./index.js --token YOUR_MIXPANEL_TOKEN --debug
-
Use MCP Inspector to test the tools directly:
npx @modelcontextprotocol/inspector server ./index.js --token YOUR_MIXPANEL_TOKEN
-
Check your Mixpanel dashboard to confirm events are being recorded.
Troubleshooting
- Server exits immediately: Make sure you're providing a valid Mixpanel token.
- Claude doesn't list tools: Verify your claude_desktop_config.json is correctly configured.
- Events not showing in Mixpanel: There might be a delay before events appear in the Mixpanel UI.
License
MIT