Skip to main content

Announcing StackOne Defender: leading open-source prompt injection guard for your agent Read More

Mixpanel MCP Server
for AI Agents

Production-ready Mixpanel MCP server with 45 extensible actions — plus built-in authentication, security, and optimized execution.

Mixpanel logo
Mixpanel MCP Server
Built by StackOne StackOne
DrataGPLocalyzeFlipMindtoolsScreenloop

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, and optimized agent context. 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 and Actions

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.

MCP Clients

Agent Frameworks

Claude Desktop
{
  "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>"
      ]
    }
  }
}

More Data & Analytics MCP Servers

Tableau

122+ actions

SurveyMonkey

104+ actions

Microsoft Excel

101+ actions

Qlik

100+ actions

Snowflake

80+ actions

Smartsheet

78+ actions

PostHog

63+ actions

Mixpanel MCP Server FAQ

Mixpanel MCP server vs direct API integration — what's the difference?
A Mixpanel MCP server and direct API integration serve different use cases. Direct API integration is for software-to-software — backend code calling Mixpanel. A Mixpanel MCP server is for AI agents — MCP clients like Claude and Cursor, plus framework agents built with OpenAI, LangChain, or Vercel AI — discovering and calling Mixpanel at runtime. StackOne provides both.
How does Mixpanel authentication work for AI agents?
Mixpanel authentication for AI agents works through a StackOne Connect Session. Create one via the dashboard or the SDK — you get an auth link and ready-to-paste config for Claude Desktop, Cursor, and other MCP clients. Your user authenticates their own Mixpanel account; StackOne handles token exchange, storage, and refresh. Credentials never reach the LLM, and each user is isolated via origin_owner_id.
Are Mixpanel MCP tools vulnerable to prompt injection?
Yes — Mixpanel MCP tools can be vulnerable to indirect prompt injection. Any tool that reads user-written content — documents, messages, tickets, records, or free-text fields — is a potential vector. StackOne Defender scans every tool response before it enters the agent's context — regex patterns in ~1ms, then a MiniLM classifier in ~4ms. 88.7% accuracy, CPU-only.
What is the context bloat of a Mixpanel agent and how do I avoid it?
Context bloat happens when Mixpanel tool schemas and API responses eat your Mixpanel agent's memory, preventing it from reasoning effectively. A single Mixpanel query can return a massive JSON response, and connecting multiple tools compounds the problem. Tools Discovery and Code Mode reduce context bloat — loading only relevant tools per query and keeping raw responses out of the agent's context.
Can I limit which actions my Mixpanel agent can access?
Yes — you can limit which actions your Mixpanel agent can access directly from the StackOne dashboard. Toggle actions on or off, or restrict them to specific accounts, with no code changes to your agent. Session tokens can be scoped to exact actions so if one leaks, exposure stays contained.
Can I create custom agent actions for my Mixpanel MCP server?
Yes — you can create custom agent actions for your Mixpanel MCP server using Connector Builder. It's an integration agent your coding assistant (Claude Code, Cursor, or Copilot) can invoke to research Mixpanel's API, generate production-ready connector YAML, test against the live API, and validate before you ship.
When should I NOT use a Mixpanel MCP server?
Skip a Mixpanel MCP server if your integration is purely software-to-software — direct Mixpanel API integration is simpler when no AI agent is involved. For deterministic, compliance-critical operations (financial transactions, regulatory reporting), direct API gives you predictable behavior without agent-driven decision-making. MCP shines when AI agents need to dynamically discover and call Mixpanel actions at runtime.
What AI frameworks and AI clients does the StackOne Mixpanel MCP server support?
The StackOne Mixpanel MCP server supports both. MCP clients (paste-and-go apps): Claude Desktop, Claude Code, Cursor, VS Code, Goose. Agent frameworks (code SDKs you build with): OpenAI Agents SDK, Anthropic, Vercel AI, Google ADK, CrewAI, Pydantic AI, LangChain, LangGraph, Azure AI Foundry.

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.