> ## Documentation Index
> Fetch the complete documentation index at: https://modem.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mixpanel

> Query your Mixpanel product analytics through the Modem Agent

export const Prompt = ({text, variant = 'accent'}) => {
  const [copied, setCopied] = useState(false);
  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText(text);
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    } catch {}
  };
  const clipboardIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copy</title>
            <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
            <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
        </svg>;
  const checkIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copied</title>
            <polyline points="20 6 9 17 4 12" />
        </svg>;
  const promptIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style={{
    flexShrink: 0,
    opacity: 0.4
  }}>
            <title>Prompt</title>
            <path d="M20 2H2v20h2V4h16v12H6v2H4v2h2v-2h16V2zM6 7h12v2H6zm8 4H6v2h8z" />
        </svg>;
  return <div className={`prompt prompt-${variant}`} style={{
    marginTop: '12px',
    marginBottom: '12px'
  }}>
            {promptIcon}
            <span className="prompt-text">{text}</span>
            <button className="prompt-copy" onClick={handleCopy} title="Copy to clipboard" type="button">
                {copied ? checkIcon : clipboardIcon}
            </button>
        </div>;
};

The Mixpanel integration connects your Mixpanel account to the Modem Agent. Once connected, the agent can query your product analytics on demand: events, funnels, retention, segmentation, and more.

<Warning>
  Mixpanel is currently in **beta** and enabled per organization. If you don't see it under **Settings** → **Integrations**, email
  [support@modem.dev](mailto:support@modem.dev) to request access.
</Warning>

<Info>
  Mixpanel is a query-based integration, not a data source. Modem does not ingest, sync, or store any Mixpanel data. No messages, topics,
  or people are created from Mixpanel. The agent queries Mixpanel on demand when you ask a question.
</Info>

## Prerequisites

* **Admin or Owner** role in your Modem organization
* A [Mixpanel](https://mixpanel.com) account with access to the projects you want to query
* MCP access enabled in your Mixpanel organization (see step 1 below)

## Setup

<Steps>
  <Step title="Enable MCP access in Mixpanel">
    A Mixpanel organization admin must enable MCP access in Mixpanel under **Settings** → **Org** → **Overview** before anyone can connect. Changes can take up to 15 minutes to take effect.
  </Step>

  <Step title="Connect in Modem">
    Go to **Settings** → **Integrations** → **Mixpanel** in your Modem dashboard.

    1. Select your **Region** (US Cloud, EU Cloud, or India Cloud) to match where your Mixpanel data lives
    2. Click **Connect**
  </Step>

  <Step title="Authorize with Mixpanel">
    You'll be redirected to Mixpanel to sign in and approve the connection. Modem requests read-only analytics scopes. After you approve, you're returned to the integration settings page.
  </Step>

  <Step title="Choose tools (optional)">
    Once connected, the settings page lists every tool Mixpanel provides. All tools are available to the agent by default. You can disable individual tools, and use **Refresh** to pick up tools Mixpanel has added or changed. See [Managing Tools](#managing-tools) below.
  </Step>
</Steps>

<Note>
  The agent queries Mixpanel using the account that authorized the connection, so it can only see the projects that account has access to.
  The connection is shared with your whole Modem organization.
</Note>

## What the Agent Can Access

The agent's Mixpanel tools are provided by Mixpanel's hosted MCP server and cover its analysis surface:

| Category         | Examples                                           |
| ---------------- | -------------------------------------------------- |
| Events           | Event volumes and trends over time                 |
| Segmentation     | Breakdowns by property, cohort, or user attribute  |
| Funnels          | Conversion rates and drop-off between steps        |
| Retention        | How often users come back after their first action |
| Flows            | The paths users take through your product          |
| Data definitions | Your project's event and property catalog          |

Access is read-only. Modem requests only read analytics scopes during authorization, so the agent cannot modify anything in Mixpanel.

The exact tool list comes from Mixpanel and can change over time. The integration settings page always shows the current set.

## What the Agent Can Do

With Mixpanel connected, you can ask the agent to:

* Query product usage metrics (active users, event counts, adoption)
* Break down metrics by property, cohort, or segment
* Analyze funnel conversion and retention
* Explore your event and property definitions
* Cross-reference Mixpanel analytics with feedback from your [data sources](/docs/integrations/overview)

### Example Prompts

These work from the dashboard, Slack DMs, or by mentioning `@modem` in a channel.

Simple:

<Prompt text="How many users triggered the export event last week?" />

<Prompt text="What's our week-over-week retention for new signups?" />

<Prompt text="Which events do we track around onboarding?" />

Advanced:

<Prompt text="Compare signup funnel conversion this month vs last month and tell me where drop-off changed" />

<Prompt text="Break down active users by plan tier for the last 30 days" />

<Prompt text="Cross-reference our most-used features in Mixpanel with the top complaint topics in Modem" />

## Managing Tools

After connecting, the integration settings page shows a tool selection card:

* **Enable or disable individual tools.** Disabled tools are hidden from the agent. Changes require an Admin or Owner role.
* **Refresh** fetches the latest tool list from Mixpanel and reports anything added, removed, or updated.
* **Test Connection** verifies your authorization still works and reports how many tools are available.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Mixpanel doesn't appear in my integration settings">
    Mixpanel is in beta and enabled per organization. Email [support@modem.dev](mailto:support@modem.dev) to request access.
  </Accordion>

  <Accordion title="Authorization fails on Mixpanel's side">
    MCP access must be enabled by a Mixpanel organization admin under **Settings** → **Org** → **Overview** in Mixpanel. After enabling
    it, changes can take up to 15 minutes to take effect. Also confirm you selected the region that matches your Mixpanel data center.
  </Accordion>

  <Accordion title="Status shows 'Authorization expired' or 'needs attention'">
    Mixpanel access tokens expire. Click **Reconnect** on the integration settings page to re-authorize. If the problem persists, the
    last error is shown on the settings page.
  </Accordion>

  <Accordion title="Error about a custom MCP server with the slug 'mixpanel'">
    If you previously added Mixpanel as a custom server on the [External MCP Servers](/docs/integrations/mcp-servers) page, remove it there
    first, then connect the Mixpanel integration.
  </Accordion>

  <Accordion title="Agent says Mixpanel tools aren't available">
    Confirm Mixpanel is connected and the status dot is green, then run **Test Connection** to check the authorization is still valid.
    If both look fine, check the tool selection card in case the tool you need was disabled.
  </Accordion>
</AccordionGroup>

## Disconnecting

To disconnect Mixpanel:

1. Go to **Settings** → **Integrations** → **Mixpanel**
2. Click **Disconnect** and confirm

Disconnecting removes the connection and its stored credentials. Because Mixpanel is query-only, no Mixpanel data was stored in Modem to begin with; past agent conversations that referenced Mixpanel results remain in your chat history. Nothing is deleted from Mixpanel, and you can reconnect at any time.

## Related

<CardGroup cols={2}>
  <Card title="The Modem Agent" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/bot.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=2496f9106cb54fa9f4e27ad1f8f3a171" href="/docs/features/agent" width="22" height="22" data-path="icons/bot.svg">
    See what else the agent can do with your connected tools.
  </Card>

  <Card title="Integrations Overview" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/link.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=e774d33588635d44c6c935b78ed55f13" href="/docs/integrations/overview" width="24" height="24" data-path="icons/link.svg">
    All available integrations and how they fit together.
  </Card>

  <Card title="PostHog" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/posthog.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=31ab1e8d66c859a82744ad3c74717838" href="/docs/integrations/posthog" width="50" height="30" data-path="icons/posthog.svg">
    Modem's other product analytics integration.
  </Card>

  <Card title="External MCP Servers" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/code.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=6c9b5cbb0e89aebc55e9fd769945fc07" href="/docs/integrations/mcp-servers" width="24" height="24" data-path="icons/code.svg">
    Connect your own external tool servers to the agent.
  </Card>
</CardGroup>
