Mixpanel MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Mixpanel MCP or direct API to query analytics, retrieve cohorts, analyze user funnels, and track product events through natural language.
Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Mixpanel Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Try Mixpanel now

Enter a prompt below to test the integration in our Tool Router playground. You'll be redirected to sign in and try it live.

Supported Tools

Tools
Add Unique Values to Profile List PropertyTool to add unique values to list properties on user profiles in Mixpanel using the $union operation.
Get Aggregated Event Property ValuesGet unique, total, or average data for a single event and property over days, weeks, or months.
Get Aggregate EventsGet aggregate event counts over time.
List Saved CohortsTool to list all saved cohorts in a Mixpanel project.
Create Annotation TagTool to create a new annotation tag in Mixpanel using the provided name.
Create IdentityTool to create an identity mapping in Mixpanel by linking an anonymous ID with an identified user ID.
Create Service AccountTool to create a new service account for your organization and optionally add it to projects.
Delete GroupTool to permanently delete a group profile from Mixpanel Group Analytics.
Delete ProfileTool to permanently delete a user profile from Mixpanel, along with all of its properties.
Delete Multiple Profiles (Batch)Tool to permanently delete multiple user profiles from Mixpanel in a single batch request.
Delete Profile PropertyTool to permanently delete properties from a Mixpanel user profile using the $unset operation.
Get All ProjectsGet all projects associated with the authenticated Mixpanel account.
Get Annotation TagsTool to get all annotation tags from a Mixpanel project.
Batch Update Group ProfilesTool to send a batch of group profile updates to Mixpanel.
Delete Group PropertiesTool to delete specific properties from a Mixpanel group profile.
Create Identity AliasTool to create an alias mapping between two distinct IDs in Mixpanel.
Execute JQL QueryExecute a custom JQL (JavaScript Query Language) query against Mixpanel's Query API.
List Saved FunnelsGet the names and funnel_ids of your funnels.
List Service AccountsTool to list all service accounts for an organization.
Append to Profile List PropertyTool to append values to list properties on user profiles in Mixpanel.
Update Multiple Profiles (Batch)Tool to update multiple user profiles in Mixpanel in a single batch request.
Get Profile Event ActivityGet event activity feed for specified users from Mixpanel Query API.
Increment Profile Numerical PropertyTool to increment or decrement numerical properties on user profiles in Mixpanel.
Remove from Profile List PropertyTool to remove values from list properties on user profiles in Mixpanel.
Set Profile PropertiesTool to set user profile properties in Mixpanel using the $set operation.
Query Frequency ReportGet data about how frequently users are performing events.
Query Saved FunnelGet data for a funnel.
Query Saved InsightGet data from your Insights reports.
Query Numeric Average ReportAverages an expression for events per unit time.
Query Numeric Sum ReportSums an expression for events per unit time.
Query ProfilesQuery user or group profile data from Mixpanel.
Query Retention ReportQuery cohort analysis showing user retention patterns over time.
Query Segmentation ReportGet data for an event, segmented and filtered by properties with daily/time-series breakdown.
Query Top EventsGet the top events for today, with their counts and the normalized percent change from yesterday.
Remove from Group List PropertyTool to remove values from list properties on group profiles in Mixpanel.
Remove from Profile List PropertyTool to remove values from list properties on user profiles in Mixpanel using the $remove operation.
Numeric Bucket Segmentation QueryTool to get event data numerically bucketed by property values.
Set Group Property OnceTool to set properties on a Mixpanel group profile only if they don't already exist.
Set Profile Property OnceTool to set user profile properties in Mixpanel using the $set_once operation.
Get Top Event PropertiesGet the top property names for an event.
Get Top Event Property ValuesTool to get the top values for a property ordered by frequency.
Get Top EventsGet a list of the most common events over the last 31 days.
Union to Group List PropertyTool to add unique values to list properties on group profiles in Mixpanel.
Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Mixpanel tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Get aggregate event counts for signups this week')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Why Use Composio?

AI Native Mixpanel Integration

  • Supports both Mixpanel MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Mixpanel data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Mixpanel access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Mixpanel
  • Scoped, least privilege access to Mixpanel resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Mixpanel with Composio?

Yes, Mixpanel requires you to configure your own Basic Auth credentials. Once set up, Composio handles secure credential storage and authentication for you.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.