# Mixpanel

<div style={{maxWidth: '720px'}}>
![The Mixpanel connector in Workspace Settings, for product analytics, dashboards, cohorts, and event definitions, with a Connect button](</docs/_next/static/media/mixpanel-connector.1rt-1_j-t-pgq.jpg>)
</div>

The [Mixpanel MCP server](https://docs.mixpanel.com/docs/mcp) lets agents check how your product is used and keep your Mixpanel setup in order.

For use cases and example prompts, see [Mixpanel for AI coding agents](/integrations/mixpanel).

## What is Mixpanel? [#what-is-mixpanel]

[Mixpanel](https://mixpanel.com) is a product analytics tool for tracking what people do in your app or website.

## What agents can do [#what-agents-can-do]

Once you connect Mixpanel, agents can:

- Run insights, funnels, flows, and retention queries, and read saved reports
- Create, update, and delete dashboards
- Edit event and property descriptions, tags, and visibility in Lexicon
- Create and update cohorts, metrics, experiments, and feature flags
- Review data quality issues and a user's session replays

Agents can only reach the projects the connected account can, with the same role.

<Callout>
Agents can delete dashboards and cohorts, launch experiments, change feature flag rollouts, and edit events in Lexicon for everyone in the project. Tell agents when they should only read.
</Callout>

## Setup [#setup]

An organization admin may first need to turn on MCP in Mixpanel under **Settings → Org → Overview** (see [Mixpanel's docs](https://docs.mixpanel.com/docs/mcp#permissions-%26-access)).

This connector uses Mixpanel's US server, so it can't reach projects stored in Mixpanel's [EU or India data centers](https://docs.mixpanel.com/docs/mcp#mcp-server-urls).

Go to **Workspace Settings → Connectors** (or a project's **Connectors** page). Click **Add**, search for Mixpanel, and select it. You can also click **Connect** on the Mixpanel card, or **Connect another** to add another account.

### Step 1: who the connection is for [#step-1-who-the-connection-is-for]

Choose **Me** or **Workspace** as the owner, then choose which agents can use the connection. The default is **Me**, with **My personal assistants** selected. From a project's **Connectors** page, only **In this project** is selected instead. Enable **Team assistants** or **Agents in projects** separately. Anyone in the workspace can use the connection through the team assistants you pick, and anyone with access to the projects you pick can use it, including in sessions they launch themselves. See [connection options](/docs/integrations/connectors#fill-in-the-connection-details) for what each choice means.

Click **Continue**.

### Step 2: how agents reach Mixpanel [#step-2-how-agents-reach-mixpanel]

The second screen has two tabs: **Mixpanel account** and **Access token**. Pick one.

#### Mixpanel account [#mixpanel-account]

Click **Continue to Mixpanel** and sign in. On the **Authorize Superconductor?** page, click **Authorize**, and you're back on the Connectors page with **Mixpanel connected**.

Agents then act in Mixpanel as whoever signed in, in every project that person can reach. If you enable **In projects**, anyone with access to those projects can use that account — so sign in with an account whose permissions you're happy to share.

#### Access token [#access-token]

Use this tab to connect a Mixpanel service account. [Create one](https://docs.mixpanel.com/reference/service-accounts) with access to the projects agents should use (Lexicon edits need the Admin or Owner role), then encode its username and secret:

```bash
echo -n "<username>:<secret>" | base64
```

Paste the output into the **Mixpanel Service Account Credentials** field and click **Connect Mixpanel**.

## Reconnecting and disconnecting [#reconnecting-and-disconnecting]

If an account connection stops working, the Connectors page shows a **Reconnect needed** badge on it, and agents run without Mixpanel.

To fix it, click **Manage** next to the connection, then **Reconnect Mixpanel**, and sign in again. You can only reconnect a personal connection you own; for someone else's, Superconductor tells you who to ask.

For an **Access token** connection, click **Manage** and paste new credentials.

Superconductor can't revoke access at Mixpanel, so **Disconnect** only removes the connection from Superconductor. For an **Access token** connection, delete the service account in Mixpanel to revoke it.

## When to use it [#when-to-use-it]

Ask agents to use Mixpanel when work depends on how people use your product, or your tracking needs fixing. For example:

```text
Check in Mixpanel how many people finished onboarding each week this month, and where the rest dropped off.
```

```text
Check Mixpanel's data quality issues for the events this pull request changes, and fix the tracking code.
```

```text
Before we remove the old export feature, check in Mixpanel how many people used it in the last 30 days.
```

```text
Create a Mixpanel cohort of people who signed up last month but never came back, so the marketing team can follow up with them.
```

## Troubleshooting [#troubleshooting]

### Agents find no projects [#agents-find-no-projects]

Agents only see the projects the connected account or service account can. For a service account, add it to the project in Mixpanel.

### Calls fail with "Could not resolve user" [#calls-fail-with-could-not-resolve-user]

Mixpanel didn't accept the service account credentials, for example because the encoded value is wrong. Superconductor doesn't check them when you connect. Encode the username and secret again, then paste the result on the connection's **Manage** page.