How to integrate Mixpanel MCP with Kimi Code

Connect Kimi Code to Mixpanel MCP. 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

How to integrate Mixpanel MCP with Kimi Code

Kimi Code is Moonshot AI's open-source coding agent, powered by Kimi K2.6. It runs in your terminal, reads and edits code, executes shell commands, and plans multi-step tasks, with native MCP support for extending it to outside tools.

In this guide, I will explain the easiest and most secure way to connect your Mixpanel account to Kimi Code via Composio Connect, so it can show daily active users for last month, list top events by user engagement, analyze conversion funnel for signup flow, and more without ever putting your account credentials at risk.

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

Also integrate Mixpanel with

Why use Composio?

Composio provides:

  • Access to 1,700+ managed apps from a single MCP endpoint. This makes it convenient for agents to run cross-app workflows.
  • Managed OAuth. You do not have to worry about authentication and authorization flows for every app.
  • Programmatic tool calling. Allows LLMs to write code in a remote workbench to handle complex tool chaining. This reduces back-and-forth for frequent tool calls.
  • Large tool response handling outside the LLM context. This minimizes context bloat from large tool responses.
  • Dynamic just-in-time access to thousands of tools across hundreds of apps. Composio loads the tools your agent needs, so LLMs are not overwhelmed by tools they do not need.

Connect Mixpanel to Kimi Code

Kimi Code is a TypeScript agent distributed through npm. It acts as an MCP client and reads server definitions from an mcp.json file, and it can also add and authenticate servers conversationally through /mcp-config. Composio is a remote HTTP server that authenticates with OAuth, so no API key is stored anywhere.

1. Install Kimi Code

The quickest way is the official install script, which requires no pre-installed Node.js and places the kimi executable on your PATH.

bash
# macOS or Linux
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash

# Windows PowerShell
irm https://code.kimi.com/kimi-code/install.ps1 | iex

# Confirm the installation
kimi --version

2. Log in

Start Kimi Code in your project directory, then sign in from the interactive UI:

bash
kimi

Run /login and choose Kimi Code OAuth using the device-code flow, or use a Moonshot API key.

3. Add Composio with /mcp-config

In current versions of Kimi Code, MCP servers are managed inside the app, not with a shell subcommand. From the interactive UI, run:

bash
/mcp-config
Kimi Code MCP config flow for adding the Composio MCP server

Tell it the server name and URL in plain language. For example:

Server name is Composio, and here is the server URL: https://connect.composio.dev/mcp

Kimi Code asks whether to add it globally, at ~/.kimi-code/mcp.json, or project-local for the current checkout, then writes the entry for you:

bash
{
  "mcpServers": {
    "Composio": {
      "url": "https://connect.composio.dev/mcp"
    }
  }
}

There is no transport field to set. Kimi Code infers HTTP from the url.

4. Restart the session

The new server is picked up on a fresh session, not the current one. Start a new session:

bash
/new

On the new session, Kimi Code detects that the server needs authorization and prompts you to run:

bash
/mcp-config login Composio

5. Authorize with OAuth

Run the command Kimi suggests:

bash
/mcp-config login composio

Kimi Code opens Composio's authorization page or surfaces a URL. Approve access, then return to the session. You should see confirmation that the Composio MCP server is connected.

Composio authorization page for Kimi Code MCP setup

Check the connection status any time with /mcp. Composio should appear as connected with its tools listed.

Kimi Code showing Composio connected after OAuth authorization

Connect your Mixpanel account

Back in a Kimi Code session, ask the agent to connect to Mixpanel or give it any Mixpanel-related task.

For example, ask it to:

  • "Show daily active users for last month"
  • "List top events by user engagement"
  • "Analyze conversion funnel for signup flow"

It will prompt you to authenticate and authorize access to Mixpanel.

That is it. Composio tools are now available in Kimi Code, and your Mixpanel account is ready to use.

Conclusion

You have successfully connected Mixpanel to Kimi Code using Composio Connect. Your agent can now manage Mixpanel from the terminal with natural language, without exposing credentials in prompts or local scripts.

Since the same Composio endpoint exposes 1,700+ apps, you can add Slack, Calendar, Linear, and more to the same server and chain them into cross-app workflows.

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