> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Mixpanel in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/mixpanel
Last updated: 2026-11-24

Share Mixpanel with your team in Claude, ChatGPT and Cursor through Metorial: project token or service account sign-in, 20 tools (14 read-only).

---

To give your team Mixpanel in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Mixpanel integration in a Metorial portal, and each person connects with a project token. Agents can track, import, and query product analytics data. The integration has 20 tools, 14 read-only, 5 write and 1 destructive, plus 1 trigger.

**What you will learn**

- How an admin shares Mixpanel in a portal and how each person connects
- What Mixpanel asks for when you connect, and where to find it
- How to keep the 14 read-only tools and reject the other 6

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- A project token from Mixpanel for each person, or one for a shared connection
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **Project Token** (default) | API token | `token` |
| **Service Account** | Custom credentials | `serviceAccountUsername`, `serviceAccountSecret` and `projectToken` |

The portal and `metorial setup` use **Project Token** unless someone picks another method.

### Project Token

To connect, a person enters:

- `token`: Mixpanel project token for ingestion APIs

### Service Account

To connect, a person enters these values:

- `serviceAccountUsername`: Service account username
- `serviceAccountSecret`: Service account secret
- `projectToken` (optional): Project token for ingestion APIs (optional, only needed for track/engage/groups)

### Setup settings

Whichever method you pick, setup also asks for:

- `dataResidency` (optional): Data residency region. Use "eu" for EU projects or "in" for India projects. One of "us", "eu", "in".
- `projectId`: Mixpanel project ID, found in Project Settings.

## Admin: share Mixpanel in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Mixpanel. Under **Auth Method**, keep **Project Token** or pick another. For how members connect, choose **Each person connects** so everyone enters their own project token, or **Shared connection** to enter one project token for everyone.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Mixpanel.

4. **Choose who gets it**

   Add the access groups that should see Mixpanel. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Mixpanel integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search mixpanel
```

## Employee: connect Mixpanel

### In the portal

1. **Open Mixpanel in the catalog**

   Sign in to your portal and open Mixpanel. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. In the setup window, enter your project token (token).

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search mixpanel
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **Project Token**. To connect with **Service Account** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your Mixpanel connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list mixpanel
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 14 read-only tools, such as `list_cohorts` and `list_funnels`, and lose the 5 write tools, such as `track_events` or `import_events`, and the destructive tool `manage_identities`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list mixpanel
metorial tools <integration-id>
metorial call <integration-id> list_cohorts -d '{}'
```

`metorial tools` lists the 20 tools, minus any you rejected. `list_cohorts` takes no input. It lists all saved cohorts in the Mixpanel project.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (14)

- `query_profiles`: Search and retrieve user profiles from Mixpanel.
- `list_cohorts`: List all saved cohorts in the Mixpanel project.
- `export_events`: Export raw event data from Mixpanel for a specified date range as a JSONL attachment. Needs `fromDate` and `toDate`.
- `query_segmentation`: Query event segmentation data from Mixpanel. Needs `eventName`, `fromDate` and `toDate`.
- `get_top_events`: Get today's most popular events in the Mixpanel project ranked by volume.
- `get_activity_feed`: Retrieve a user's event activity stream from Mixpanel. Needs `distinctIds`, `fromDate` and `toDate`.
- `list_funnels`: List all saved funnels in the Mixpanel project.
- `query_insights`: Query a saved Insights report in Mixpanel by its bookmark ID. Needs `bookmarkId`.
- `query_retention`: Query retention data from Mixpanel. Needs `fromDate` and `toDate`.
- `query_funnel`: Query a saved funnel report in Mixpanel. Needs `funnelId`, `fromDate` and `toDate`.
- `list_event_properties`: List the top property names observed for a Mixpanel event, ordered by event count. Needs `eventName`.
- `list_event_property_values`: List the top observed values for a property on a Mixpanel event. Needs `eventName` and `propertyName`.
- `query_event_counts`: Get aggregate total, unique, or average counts for one or more Mixpanel events over a date range or recent interval. Needs `eventNames`, `type` and `unit`.
- `query_event_property_values`: Get aggregate total, unique, or average counts for values of a specific property on a Mixpanel event. Needs `eventName`, `propertyName`, `type` and `unit`.

### Write tools (5)

- `import_events`: Send a batch of events to Mixpanel. Needs `events`.
- `track_events`: Send real-time events to Mixpanel from your application. Needs `events`.
- `manage_annotations`: Create, list, or delete annotations in a Mixpanel project. Needs `operation`.
- `manage_user_profile`: Create or update a user profile in Mixpanel. Needs `distinctId` and `operation`.
- `manage_group_profile`: Create or update a group profile in Mixpanel. Needs `groupKey`, `groupId` and `operation`.

### Destructive tools (1)

- `manage_identities`: Link anonymous and identified users or merge two distinct IDs in Mixpanel's identity management system. Needs `operation`.

## Triggers

Mixpanel has 1 trigger, which fire on events in Mixpanel:

- `cohort_sync`: Receives cohort membership changes from Mixpanel via webhook.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Mixpanel there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Mixpanel on metorial.com](https://metorial.com/integrations/mixpanel): the integration overview