Deploy MCP Server
Analytics Bearer Token

Mixpanel REST API

Product analytics API for tracking user behavior

Mixpanel provides product analytics that help teams understand user behavior and make data-driven decisions. The REST API allows developers to track events, update user profiles, query analytics data, and manage cohorts programmatically. Used by thousands of companies to build better products through behavioral analytics and experimentation.

Base URL https://api.mixpanel.com

API Endpoints

MethodEndpointDescription
POST/trackTrack a single event for a user or anonymous visitor
POST/importImport historical events with custom timestamps
POST/engageSet or update properties on a user profile
POST/groupsCreate or update group profiles for group analytics
GET/query/insightsQuery insights report data including trends and funnels
GET/query/eventsRetrieve raw event data with filters and date ranges
GET/query/funnelsGet funnel conversion data for specified event sequences
GET/query/retentionQuery retention cohort data for user segments
POST/cohortsCreate a new cohort based on user properties or behaviors
GET/cohorts/listList all cohorts in the project with metadata
GET/engage/propertiesRetrieve user profile properties for specific users
DELETE/events/deleteDelete events matching specified criteria
GET/query/segmentationGet segmentation report data with breakdowns
POST/lookup-tablesUpload or update lookup table data for enrichment
GET/events/properties/topGet top property values for a specific event

Code Examples

# Track an event
curl -X POST https://api.mixpanel.com/track \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -d '{
    "event": "Page Viewed",
    "properties": {
      "distinct_id": "user_12345",
      "page_name": "Dashboard",
      "time": 1704067200,
      "$insert_id": "evt_abc123"
    }
  }'

# Query insights data
curl -X GET 'https://api.mixpanel.com/query/insights?project_id=YOUR_PROJECT_ID&from_date=2024-01-01&to_date=2024-01-31' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'

Connect Mixpanel to AI

Deploy a Mixpanel MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Mixpanel through these tools:

track_user_event Track custom events for users with properties and metadata for behavioral analysis
update_user_profile Set or increment user profile properties including demographics and custom attributes
query_analytics_insights Retrieve analytics insights including trends, funnels, and retention data for specified date ranges
manage_cohorts Create, update, or retrieve user cohorts based on behavioral criteria and property filters
export_event_data Export raw event data with filters for analysis or integration with other systems

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy Mixpanel MCP Server →

Related APIs