Mixpanel MCP Server
for AI Agents
Connect your AI agent to StackOne's Mixpanel MCP server and give it 45 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
45 Agent Actions
Create, read, update, and delete across Mixpanel — and extend your agent's capabilities with custom actions.
Authentication
Agent Tool Authentication
Per-user OAuth in one call. Your Mixpanel MCP server gets session-scoped tokens with zero credentials stored on your infra.
Agent Auth →Security
Agent Protection
Every Mixpanel tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.
Prompt Injection Defense →Performance
Max Agent Context. Min Cost.
Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Mixpanel call.
Tools Discovery →What is the Mixpanel MCP Server?
A Mixpanel MCP server lets AI agents read and write Mixpanel data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's Mixpanel MCP server ships with 45 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.
All Mixpanel MCP Tools
Every action from Mixpanel's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.
Annotations
- Create Annotation
Create a new annotation via POST /api/app/projects/{projectId}/annotations to mark a significant event on Mixpanel charts. Accepts a date in YYYY-MM-DD HH:MM:SS format, a descriptive label, and optional tag IDs for categorization.
- List Annotations
Retrieve all annotations within a date range for the Mixpanel project via GET /api/app/projects/{projectId}/annotations. Annotations are visual markers on Mixpanel charts that denote significant events such as product releases, marketing campaigns, or infrastructure changes.
- Get Annotation
Retrieve a single annotation by its numeric ID via GET /api/app/projects/{projectId}/annotations/{annotationId}. Returns the annotation's date, description, and associated tags.
- Delete Annotation
Permanently delete an annotation from the project via DELETE /api/app/projects/{projectId}/annotations/{annotationId}. This action is irreversible and removes the visual marker from all Mixpanel charts.
Annotation Tags
- Create Annotation Tag
Create a new reusable annotation tag via POST /api/app/projects/{projectId}/annotations/tags. Tags can then be attached to annotations via create_annotation or patch_annotation to categorize chart markers.
- List Annotation Tags
Retrieve all annotation tags defined in the project via GET /api/app/projects/{projectId}/annotations/tags. Tags are reusable labels that can be attached to annotations for categorization and filtering.
Events
- Import Events
Bulk-import historical or server-side events into Mixpanel via POST /import, supporting up to 2000 events per batch (10MB max). Each event requires a past timestamp, distinct_id, and $insert_id for deduplication; future timestamps are rejected with a 400 error. Use strict=1 to receive per-event validation errors.
- Export Events
Export raw event data from Mixpanel via GET /api/2.0/export for a specified date range, returned as newline-delimited JSON (JSONL). Rate limited to 60 queries per hour with max 5 concurrent queries. Supports filtering by event name and property expressions, with a maximum of 100,000 events per request.
Groups
- Batch Update Groups
Send a batch of mixed group profile update operations in a single POST /groups request, combining any of $set, $set_once, $add, $union, $remove, $unset, and $delete across multiple groups. Each object in the array can target a different group and use a different operation.
- Delete Group
Permanently delete a group profile and all stored properties from Mixpanel via POST /groups with the $delete operation. This action is irreversible and removes all data associated with the specified group_key and group_id combination.
User Profiles
- Query User Profiles
Query user profiles from the Mixpanel Engage API using filters, cohort membership, behavioral selectors, or specific distinct_ids. Returns paginated profile data with support for property projection via output_properties to reduce response size.
- Delete User Profile
Permanently delete user profiles and all stored properties from Mixpanel via POST /engage with the $delete operation. This action is irreversible. Use $ignore_alias=true when the distinct_id is an alias to avoid accidentally deleting the canonical profile.
Schemas
- List Schemas
Retrieve all data dictionary schemas (event and profile definitions) in the Mixpanel project via GET /api/app/projects/{projectId}/schemas. Returns schema entries with entity types, names, descriptions, and property definitions.
- Delete Schema
Delete the schema definition for a specific entity by type and name via DELETE /api/app/projects/{projectId}/schemas/{entityType}/{name}. Removes the property definitions and metadata for the specified event or profile from the data dictionary.
Schemas For Entitys
- List Schemas For Entity
Retrieve schemas filtered by entity type ("event" or "profile") via GET /api/app/projects/{projectId}/schemas/{entityType}. Optionally filter further by entity_name to find a specific event or profile schema definition.
- Delete Schemas For Entity
Delete schemas by entity type via DELETE /api/app/projects/{projectId}/schemas/{entityType}. Optionally narrow deletion to a specific entity by providing entity_name; otherwise all schemas of the given type (event or profile) are removed.
Other (29)
- Create Identity
Link an anonymous user ID to a known user ID via the $identify event on POST /track for identity resolution. This operation is irreversible and merges all historical events from the anonymous ID onto the identified user. Works with all Mixpanel ID management systems.
- Create Alias
Create an alias linking one distinct_id to another via the $create_alias event on POST /track. Only compatible with Original ID Merge and Legacy ID Management systems. Each alias maps to exactly one distinct_id and cannot be reassigned once created.
- Append To List Property
Append values to list properties on user profiles via POST /engage with the $append operation, allowing duplicates unlike $union. Creates the list property if it does not exist. Useful for ordered logs like "Pages Visited" or "Items Added to Cart".
- List Cohorts
Retrieve all saved cohorts in the Mixpanel project via POST /api/query/cohorts/list. Returns cohort metadata including IDs, names, and creation dates, which can then be used with query_cohort_members to retrieve the users belonging to each cohort.
- Query Cohort Members
Retrieve user profiles belonging to a specific cohort via the Engage API (POST /api/query/engage) using filter_by_cohort. Supports pagination with session_id and page parameters, property projection with output_properties, and additional filtering with where expressions.
- List Lookup Tables
Retrieve all lookup tables in the Mixpanel project via GET /lookup-tables. Lookup tables map property values to additional dimensions (e.g. mapping product IDs to product names, categories, and prices) for richer analysis in reports and queries.
- Query Insights
Query a saved Insights report by bookmark ID via GET /api/query/insights, returning the computed time-series data for the report's configured events and filters. Rate limited to 60 queries per hour with max 5 concurrent queries. The bookmark_id is found in the Mixpanel URL as "report-BOOKMARK_ID".
- Query Funnels
Query a saved Funnel report by funnel ID via GET /api/query/funnels, returning step-by-step conversion data for the specified date range. Supports segmentation via the "on" parameter and filtering via "where" expressions. Rate limited to 60 queries per hour with max 5 concurrent queries.
- Query Retention
Query retention data via GET /api/query/retention, returning cohort-based retention metrics for a date range. Supports both "birth" (first-time) and "compounded" retention types, with configurable intervals and segmentation. Rate limited to 60 queries per hour with max 5 concurrent queries.
- Query JQL
Execute custom JQL (JavaScript Query Language) scripts against Mixpanel data via POST /api/query/jql. JQL is in maintenance mode and may be deprecated in the future. Rate limited to 60 queries per hour with max 5 concurrent queries, a 2-minute execution timeout, and a 5GB data processing limit per query.
- List Schema By Entity And Name
Retrieve the schema definition for a specific entity by type and name via GET /api/app/projects/{projectId}/schemas/{entityType}/{name}. Returns the full property definitions, descriptions, and metadata for the specified event or profile schema.
- Set Group Properties
Set properties on group profiles (e.g. accounts, companies, workspaces) via POST /groups with the $set operation. Creates the group profile if it does not exist, and overwrites existing property values. Requires Group Analytics to be enabled in the Mixpanel project.
- Set Group Properties Once
Set properties on group profiles via POST /groups with the $set_once operation, only writing values for properties that do not already exist. Ideal for immutable group attributes like "Created Date" or "Original Plan" that should never be overwritten.
- Set User Profile Properties
Set properties on user profiles via POST /engage with the $set operation, creating profiles if they do not exist and overwriting existing property values. The API returns HTTP 200 even when individual records fail validation, so enable strict=1 and verbose=1 to detect per-record errors in the response body.
- Set User Profile Properties Once
Set properties on user profiles via POST /engage with the $set_once operation, only writing values for properties that do not already exist on the profile. Ideal for immutable attributes like "First Login Date" or "Original Source" that should never be overwritten.
- Update Multiple Profiles
Send a batch of mixed profile update operations in a single POST /engage request, combining any of $set, $set_once, $add, $union, $append, $remove, $unset, and $delete across multiple users. Each object in the array can use a different operation, enabling efficient bulk profile management in one API call.
- Remove From Group List Property
Remove specific values from list properties on group profiles via POST /groups with the $remove operation. Silently skips values not present in the list.
- Remove From List Property
Remove specific values from list properties on user profiles via POST /engage with the $remove operation. Silently skips values that do not exist in the list. Use this to maintain list properties by removing outdated or revoked items.
- Delete Profile Properties
Permanently remove specified properties and their values from user profiles via POST /engage with the $unset operation. Unlike $remove (which targets list values), $unset deletes entire property keys from the profile.
- Delete All Schemas
Permanently delete all data dictionary schemas in the project via DELETE /api/app/projects/{projectId}/schemas. This clears the entire data dictionary and is irreversible; use with caution in production environments.
- Patch Annotation
Partially update an existing annotation via PATCH /api/app/projects/{projectId}/annotations/{annotationId}. Supports modifying the description text and tag associations without replacing the entire annotation.
- Union To Group List Property
Merge unique values into list properties on group profiles via POST /groups with the $union operation, ensuring no duplicate entries. Creates the list property if it does not exist.
- Unset Group Properties
Permanently remove specified property keys and their values from group profiles via POST /groups with the $unset operation. Unlike $remove (which targets values within lists), $unset deletes entire properties from the group profile.
- Merge Identities
Merge two distinct_ids into a single identity cluster via the $merge event on POST /import. This operation is irreversible and only works with projects using the Original ID Merge system. Requires exactly 2 distinct_ids in the array.
- Replace Lookup Table
Replace all data in an existing lookup table via PUT /lookup-tables/{lookupTableId} with new CSV-formatted content. The first row must be column headers and the first column serves as the join key. This fully overwrites the existing table data.
- Increment User Profile Properties
Atomically increment or decrement numeric properties on user profiles via POST /engage with the $add operation. Use positive values to increment and negative values to decrement; ideal for counters like login count, purchase total, or points balance.
- Union To List Property
Merge unique values into list properties on user profiles via POST /engage with the $union operation, ensuring no duplicates. Creates the profile and list property if they do not exist. Useful for maintaining sets like "Favorite Categories" or "Completed Features".
- Create/Replace Multiple Schemas
Bulk upload or replace data dictionary schemas via POST /api/app/projects/{projectId}/schemas. Existing schemas for specified entities are overwritten. Use the truncate option to clear the entire data dictionary before uploading.
- Create/Replace One Schema
Upload or replace the schema for a single entity via POST /api/app/projects/{projectId}/schemas/{entityType}/{name}. Overwrites the existing schema definition including description, properties, and metadata for the specified event or profile.
Set Up Your Mixpanel MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to Mixpanel in under 10 lines of code.
Agent Frameworks
{
"mcpServers": {
"stackone": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://api.stackone.com/mcp?x-account-id=<account_id>",
"--header",
"Authorization: Basic <YOUR_BASE64_TOKEN>"
]
}
}
}Check More Data & Analytics MCP Servers
189+ actions
122+ actions
104+ actions
102+ actions
101+ actions
80+ actions
73+ actions
Mixpanel Resources
How I Vibe-Coded a Customer Success Hub Using StackOne's AI Native Integration Platform
How a non-developer vibe-coded a customer success dashboard pulling HubSpot, Pylon, PostHog, Databricks, and Fireflies through StackOne's MCP gateway.
7 min read
How to Build an AI Marketing Analytics Agent with Claude + an MCP Gateway
Connect Claude to GA4 and HubSpot through StackOne's MCP gateway. Surface bot traffic, funnel gaps, and signup attribution your dashboard doesn't show.
8 min read
MCP Code Mode: Keeping Tool Responses Out of Agent Context
Anthropic's code_execution processes data already in context. Custom MCP code mode keeps raw tool responses in a sandbox. 14K tokens vs 500.
11 min
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, their shared security risks including indirect prompt injection, and when to use one, both, or a hybrid architecture.
12 min
MCP vs API: What 200+ Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building 200+ connectors that serve both, here's when each approach wins.
14 min read
Mixpanel MCP Server FAQ
Does StackOne have a Mixpanel MCP server?
Mixpanel MCP server vs direct API integration — what's the difference?
How does Mixpanel authentication work for AI agents?
origin_owner_id.Are Mixpanel MCP tools vulnerable to prompt injection?
What is the context bloat of a Mixpanel agent and how do I avoid it?
Can I limit which actions my Mixpanel agent can access?
Can I create custom agent actions for my Mixpanel MCP server?
When should I NOT use a Mixpanel MCP server?
What AI frameworks and AI clients does the StackOne Mixpanel MCP server support?
Put your AI agents to work
All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.