How to integrate Mixpanel MCP with Grok Build

Connect Grok Build to Mixpanel MCP. Show daily active users for last month, list top events by user engagement, and more from your terminal, 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 Grok Build

Grok Build is xAI's terminal coding agent. It runs on Grok 4.5, plans its work before it acts, and can run multiple sub-agents in parallel. It also reads Claude Code's MCP configuration, so any server you already have in a .mcp.json is picked up with no changes.

In this guide, I will show you how to connect your Mixpanel account to Grok Build through Composio, 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 leaving the terminal. Composio holds the OAuth tokens for you, and Grok Build only calls the tools you approve.

Also integrate Mixpanel with

Why use Composio over a standalone MCP server?

  • Read and write access. Composio's Mixpanel integration lets Grok Build take real actions like creating drafts, sending updates, and labeling records, not just reading data.
  • 1,700+ SaaS toolkits out of the box. One endpoint gives you a full catalog of pre-built connectors, from Gmail and Slack to Notion, Linear, and Salesforce.
  • One MCP server for every app. Wire up a single Composio server instead of maintaining a separate MCP entry for each app.
  • Smart, context-aware tool loading. Grok Build caps how many tools it holds in a single request. Composio loads only the tools a task needs, so you do not spend that budget on tools you are not using.
  • Cross-app automation. Chain actions across apps in one run. Pull a thread, summarize it in Notion, and post the highlights to Slack from a single prompt.

Prerequisites

  • Grok Build installed and signed in. Install with curl -fsSL https://x.ai/cli/install.sh | bash on macOS or Linux, or irm https://x.ai/cli/install.ps1 | iex on Windows PowerShell. On first launch Grok opens a browser to authenticate; for headless or CI use, set an XAI_API_KEY environment variable instead (create the key at console.x.ai).
  • Access to the Mixpanel account you want to connect.
  • The Composio MCP endpoint. Composio's server is remote and hosted, so there is nothing to run locally and no tunnel to set up.

Step-by-step: Connect Mixpanel to Grok Build

1. Install and verify Grok Build

Install the CLI, then restart your shell so the grok binary lands on your PATH:

bash
curl -fsSL https://x.ai/cli/install.sh | bash
which grok

On Windows, install with PowerShell instead: irm https://x.ai/cli/install.ps1 | iex. If which grok returns a path, you are set. Grok Build runs on Grok 4.5 by default; you can switch models inside the session with /model <name>.

2. Add the Composio server

Add Composio as a remote HTTP MCP server with the grok mcp add command:

bash
grok mcp add --transport http composio https://connect.composio.dev/mcp

You can also add and manage servers from inside a session. Run /mcps to open the extensions modal on the MCP tab, then add a new server and paste the Composio URL. Added this way, Grok auto-detects the name from the URL and lists the server as connect:

bash
https://connect.composio.dev/mcp
Grok Build /mcps extensions modal listing MCP servers Grok Build adding the Composio MCP server with its URL

Grok also reads Claude Code-style config, so an entry in ~/.grok/config.toml or a project .mcp.json works the same way.

3. Authenticate

Composio uses OAuth. In the /mcps modal, select the Composio server and press i to authenticate (Grok also triggers this browser flow automatically the first time it uses a Composio tool). Click Allow to authorize access. Grok stores the tokens under ~/.grok/mcp_credentials.json, and /mcps shows Composio as connected.

Grok Build prompting to authenticate the Composio MCP server Composio authorization screen with the Allow button for Grok Build

4. Start building

Ask Grok to work with your Mixpanel account through Composio. On the first Mixpanel action, Composio prompts you to connect the account through OAuth. Approve the scopes once, and Composio handles token refresh from there.

What you can do after connecting Mixpanel

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

Security + privacy notes (important)

  • Use least-privilege access. Grant only the Mixpanel scopes you actually need.
  • Review OAuth scopes before approving. Check that the requested scopes match what you expect Composio and Grok Build to do.
  • Keep write actions human-reviewed. Grok Build proposes a plan before it acts. Leave that approval step on for actions like sending messages or editing records.
  • Keep secrets out of version control. Your XAI_API_KEY and any tokens should never be committed. Use environment variables or a secrets manager.
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