Mixpanel CLI for AI Agents

Use Composio Universal CLI with Mixpanel. Show daily active users for last month, list top events by user engagement, and more using natural language, with authentication handled for you.

Mixpanel logoMixpanel
Basic

Mixpanel is a product analytics platform tracking user interactions and engagement. It helps teams analyze behavior, track funnels, and improve user experiences.

100 Tools

Introduction

CLIs are eating MCPs. The industry is converging on the very same idea. MCPs for all their merit can be token hungry, slow, and unreliable for complex tool chaining. However, coding agents have become incredibly good at working with CLIs, and in fact they are far more comfortable working with CLI tools than MCP.

With Composio's Universal CLI, your coding agents can talk to over 2000+ SaaS applications. With Mixpanel, agents can query funnels and retention, run segmentation reports, import and export events, update user profiles, and run JQL queries, and more — all without worrying about authentication.

This guide walks you through Composio Universal CLI and explains how you can connect it with coding agents like Claude Code, Codex, OpenCode, etc, for end-to-end Mixpanel automation.

For exact tool slugs and parameter tables, see the tool catalog in the Composio docs.

Also integrate Mixpanel with

What is Universal CLI and why use it?

The idea behind building the universal CLI is to give agents a single command interface to interact with all your external applications. Here's what you'll get with it:

  • Agent-friendly: Coding agents like Claude Code, Codex, and OpenCode can use CLI tools natively — no MCP setup required.
  • Authentication handled: Connect once via OAuth or API Key, and all CLI commands work with your credentials automatically.
  • Tool discovery: Search, inspect, and execute 20,000+ tools across 2000+ apps from one interface.
  • Trigger support: Use triggers to listen for events across your apps, powered by real-time webhooks or polling under the hood.
  • Type generation: Generate typed schemas for autocomplete and type safety in your projects.

Prerequisites

Install the Composio CLI, authenticate, and initialize your project:

bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Authenticate with Composio
composio login

During login you'll be redirected to sign in page, finish the complete flow and you're all set.

Composio CLI authentication flow

Connecting Mixpanel to Coding Agents via Universal CLI

Once it is installed, it's essentially done. Claude Code, Codex, OpenCode, OpenClaw, or any other agent will be able to access the CLI. A few steps to give agents access to your apps.

  1. Launch your Coding Agent — Claude Code, Codex, OpenCode, anything you prefer.
  2. Prompt it to "Authenticate with Mixpanel"
  3. Complete the authentication and authorization flow and your Mixpanel integration is all set.
  4. Start asking anything you want.

Universal CLI Commands for Mixpanel

You can also manually execute CLI commands to interact with your Mixpanel.

Connect your Mixpanel account

Link your Mixpanel account and verify the connection:

bash
# Connect your Mixpanel account (opens OAuth flow)
composio connected-accounts link mixpanel

# Verify the connection
composio connected-accounts list --toolkits mixpanel

Discover Mixpanel tools

Search and inspect available Mixpanel tools:

bash
# List all available Mixpanel tools
composio tools list --toolkit mixpanel

# Search for Mixpanel tools by action
composio tools search "mixpanel"

# Inspect a tool's input schema
composio tools info MIXPANEL_ADD_UNIQUE_TO_PROFILE_LIST_PROPERTY

Common Mixpanel Actions

Add Unique Values to Profile List Property — Tool to add unique values to list properties on user profiles in Mixpanel using the $union operation

bash
composio tools execute MIXPANEL_ADD_UNIQUE_TO_PROFILE_LIST_PROPERTY \
  --data "<array>"

List Saved Cohorts — Tool to list all saved cohorts in a Mixpanel project

bash
composio tools execute MIXPANEL_COHORTS_LIST \
  --project_id "3153603"

List Saved Funnels — Get the names and funnel_ids of your funnels

bash
composio tools execute MIXPANEL_LIST_FUNNELS \
  --project_id "<integer>"

List Service Accounts — Tool to list all service accounts for an organization

bash
composio tools execute MIXPANEL_LIST_SERVICE_ACCOUNTS \
  --organization_id "2513599"

Append to Profile List Property — Tool to append values to list properties on user profiles in Mixpanel

bash
composio tools execute MIXPANEL_PROFILE_APPEND_TO_LIST_PROPERTY \
  --data "<array>"

Remove from Profile List Property — Tool to remove values from list properties on user profiles in Mixpanel

bash
composio tools execute MIXPANEL_PROFILE_REMOVE_FROM_LIST_PROPERTY \
  --data "<array>"

Remove from Group List Property — Tool to remove values from list properties on group profiles in Mixpanel

bash
composio tools execute MIXPANEL_REMOVE_FROM_GROUP_LIST_PROPERTY \
  --data "<array>"

Remove from Profile List Property — Tool to remove values from list properties on user profiles in Mixpanel using the $remove operation

bash
composio tools execute MIXPANEL_REMOVE_FROM_LIST_PROPERTY \
  --token "PROJECT_TOKEN" \
  --distinct_id "test-user-12345" \
  --remove_properties '{"test_list_property":"test_value"}'

Generate Type Definitions

Generate typed schemas for Mixpanel tools to get autocomplete and type safety in your project:

bash
# Auto-detect language
composio generate --toolkits mixpanel

# TypeScript
composio ts generate --toolkits mixpanel

# Python
composio py generate --toolkits mixpanel

Tips & Tricks

  • Always inspect a tool's input schema before executing: composio tools info <TOOL_NAME>
  • Pipe output with jq for better readability: composio tools execute TOOL_NAME -d '{}' | jq
  • Set COMPOSIO_API_KEY as an environment variable for CI/CD pipelines
  • Use composio dev logs tools to inspect execution logs and debug issues

Next Steps

  • Try asking your coding agent to perform various Mixpanel operations
  • Explore cross-app workflows by connecting more toolkits
  • Set up triggers for real-time automation
  • Use composio generate for typed schemas in your projects
TOOLS

Supported Tools

Every Mixpanel action and event your agent gets out of the box.

Add Service Accounts To Projects

Add existing service accounts to projects in an organization, assigning the specified role in each project to every listed account.

Add Unique Values to Profile List Property

Tool to add unique values to list properties on user profiles in Mixpanel using the $union operation.

Get Aggregated Event Property Values

Get unique, total, or average data for a single event and property over days, weeks, or months.

Get Aggregate Events

Get aggregate event counts over time.

Archive Experiment

Archive an experiment in a Mixpanel workspace.

Cancel Data Deletion

Cancel a GDPR or CCPA data deletion task that is still in progress.

List Saved Cohorts

Tool to list all saved cohorts in a Mixpanel project.

Create Annotation

Create an annotation marking a point in time on a Mixpanel project's charts.

Create Annotation Tag

Tool to create a new annotation tag in Mixpanel using the provided name.

Create Data Deletion

Create a GDPR or CCPA deletion task for users in a Mixpanel project.

Create Data Retrieval

Create a GDPR or CCPA data retrieval job for users in a Mixpanel project.

Create Event Stream Import

Create a warehouse event-stream import that syncs table rows as Mixpanel events.

Create Experiment

Create an experiment in a Mixpanel workspace with a name and optional hypothesis, settings, variants, metrics, and visibility.

Create Feature Flag

Create a feature flag with variants and rollout rules in a project workspace.

Create Groups Import

Create a warehouse import that syncs group properties to Mixpanel group profiles.

Create Identity

Send a Mixpanel identity mapping event linking an anonymous ID with an identified user ID, typically after authentication, to connect anonymous activity with the identified user.

Create Lookup Table Import

Create a warehouse lookup-table import to enrich event or user properties.

Create People Import

Create a warehouse import that syncs table rows to Mixpanel user profiles.

Create Service Account

Tool to create a new service account for your organization and optionally add it to projects.

Decide Experiment

Record whether a Mixpanel workspace experiment succeeded, with an optional variant and decision message.

Delete All Schemas

Delete all event and profile Lexicon schemas in a Mixpanel project.

Delete Annotation

Delete an annotation by project and numeric annotation ID.

Delete Entity Schemas

Delete Lexicon schemas of one entity type in a Mixpanel project.

Delete Experiment

Delete an experiment from a Mixpanel workspace.

Delete Feature Flag

Delete one feature flag by ID in a project workspace.

Delete Group

Tool to permanently delete a group profile from Mixpanel Group Analytics.

Delete Profile

Tool 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 Property

Tool to permanently delete properties from a Mixpanel user profile using the $unset operation.

Delete Schema

Delete the Lexicon schema for one entity type and exact entity name.

Delete Service Account

Delete a service account from an organization and remove it from all associated projects.

Delete Warehouse Import

Delete a warehouse import from a Mixpanel project.

Evaluate Feature Flags

Evaluate all enabled feature flags for a user and return eligible variants.

Export Raw Events

Export raw Mixpanel events for a date range with optional filters.

Force Conclude Experiment

Force conclude an experiment in a Mixpanel workspace, optionally specifying its end date.

Get All Projects

Get all projects associated with the authenticated Mixpanel account.

Get Annotation

Retrieve one annotation by project and numeric annotation ID, including its date, description, creator, and tags.

Get Annotation Tags

Tool to get all annotation tags from a Mixpanel project.

Get Dashboard

Retrieve one Mixpanel dashboard, including its contents and layout.

Get Data Deletion

Check a GDPR or CCPA data deletion job using its tracking ID and project token.

Get Data Retrieval

Check a GDPR or CCPA data retrieval job using its tracking ID and project token.

Get Experiment

Retrieve one experiment by workspace and experiment ID, including its settings, variants, metrics, cached results, and linked feature flag when available.

Get Feature Flag

Get one feature flag by ID in a project workspace.

Get Flag Definitions

Retrieve all enabled feature flag definitions for the authenticated project.

Get Import History

Get the 30 most recent execution events for a warehouse import.

Get Schema

Get the Lexicon schema for a specific event or profile name.

Get Service Account

Retrieve a service account's details by organization and service account ID, including its username, creation, last-use, and expiration times.

Get Warehouse Import

Get a warehouse import's full configuration, column mappings, and sync settings.

Batch Update Group Profiles

Send a batch of Mixpanel group profile updates in one request.

Delete Group Properties

Tool to delete specific properties from a Mixpanel group profile.

Create Identity Alias

Send an alias mapping to link a new Mixpanel distinct ID with an existing one, such as during signup.

Import Events

Import a batch of historical events into a Mixpanel project.

Execute JQL Query

Execute a custom JQL (JavaScript Query Language) query against Mixpanel's Query API.

Launch Experiment

Launch an experiment in a Mixpanel workspace.

List Annotations

List annotations in a Mixpanel project, optionally filtering by inclusive start and end dates.

List Entity Schemas

List Lexicon schemas for an event or profile entity type in a project.

List Experiments

List experiments in a Mixpanel workspace, including their settings, variants, metrics, lifecycle status, and access information.

List Feature Flags

List feature flags in a project workspace, optionally including archived flags.

List Saved Funnels

Get the names and funnel_ids of your funnels.

List Lookup Tables

List lookup tables defined in a Mixpanel project.

List Project Service Accounts

List service accounts that are members of a project, including their roles, membership grant types, sensitive-data access, and last-use/expiration times.

List Schemas

List all Lexicon schemas in a Mixpanel project.

List Service Accounts

Tool to list all service accounts for an organization.

List Warehouse Imports

List all warehouse imports configured for a Mixpanel project, including configuration, sync status, and scheduling metadata.

Append to Profile List Property

Tool 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 Activity

Get event activity feed for specified users from Mixpanel Query API.

Increment Profile Numerical Property

Tool to increment or decrement numerical properties on user profiles in Mixpanel.

Remove from Profile List Property

Tool to remove values from list properties on user profiles in Mixpanel.

Set Profile Properties

Tool to set user profile properties in Mixpanel using the $set operation.

Query Frequency Report

Query how frequently users perform events over a specified period, returning date-keyed frequency arrays under data.

Query Saved Funnel

Get data for a funnel.

Query Saved Insight

Get data from your Insights reports.

Query Numeric Average Report

Averages an expression for events per unit time.

Query Numeric Sum Report

Sums an expression for events per unit time.

Query Organization Audit Logs

Query one page of organization audit logs with optional actor, time, project and event filters.

Query Profiles

Query user or group profile data from Mixpanel.

Query Retention Report

Query cohort analysis showing user retention patterns over time.

Query Segmentation Report

Get data for an event, segmented and filtered by properties with daily/time-series breakdown.

Query Top Events

Get the top events for today, with their counts and the normalized percent change from yesterday.

Remove from Group List Property

Tool to remove values from list properties on group profiles in Mixpanel.

Remove from Profile List Property

Tool to remove values from list properties on user profiles in Mixpanel using the $remove operation.

Remove Service Accounts From Projects

Remove service accounts from the specified projects in an organization.

Replace Lookup Table

Replace all records in an existing Mixpanel lookup table with inline CSV.

Run Insights Query

Run an ad hoc Insights query with event, funnel, retention, cohort or formula metrics.

Run Warehouse Import

Trigger an immediate sync for an existing warehouse import.

Numeric Bucket Segmentation Query

Tool to get event data numerically bucketed by property values.

Set Group Property Once

Tool to set properties on a Mixpanel group profile only if they don't already exist.

Set Profile Property Once

Tool to set user profile properties in Mixpanel using the $set_once operation.

Get Top Event Properties

Get the top property names for an event.

Get Top Event Property Values

Tool to get the top values for a property ordered by frequency.

Get Top Events

Get a list of the most common events over the last 31 days.

Unarchive Experiment

Unarchive an experiment in a Mixpanel workspace and return the updated experiment.

Update Annotation

Update an existing Mixpanel annotation's description and/or tag IDs.

Update Experiment

Update an existing Mixpanel workspace experiment's fields, settings, variants, metrics, caches, dates, tags, or visibility.

Update Feature Flag

Update a feature flag with its complete configuration in a project workspace.

Union to Group List Property

Tool to add unique values to list properties on group profiles in Mixpanel.

Update Warehouse Import

Pause or resume an existing warehouse import and set its sync frequency.

Upsert Schema

Create or replace one event or profile Lexicon schema in a project.

Upsert Schemas

Create or replace multiple event or profile Lexicon schemas in a project.

FAQ

Frequently asked questions

Start with Mixpanel.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Mixpanel tool your agent needs.Free to start.

Start building