Skip to main content
Use Mixpanel through Corsair: one client, typed API calls. Create a service account in Mixpanel (Project Settings, Service Accounts) with a role that fits what the agent should do: Consumer to read, Admin or Owner to import events and manage annotations, Lexicon, flags and experiments. Connect with:
  • api_key: the service account secret.
  • service_account_username: its username (name.xxxxxx.mp-service-account).
  • project_id: the project id (Project Settings, Overview).
  • region: us (default), eu or in, matching the project’s data residency. Every API switches to that region’s hosts.
  • project_token (optional): needed for events.track, profile and group updates, identity calls and GDPR, which authenticate with the token.
  • gdpr_token (optional): the GDPR API OAuth token from Personal Settings, Data & Privacy. A service account gets 401 on the GDPR API.
Plan limits seen on a free project (11-24): the Query API reports (insights, funnels, retention, segmentation, event counts, activity stream, cohorts, JQL) answer 402 plan_restricted; profiles.query and raw export work. Data Pipelines is a paid add-on (401), and the Platform API data definitions answer 404 until Mixpanel enables them for the project. Organization-level service account calls need an organization admin or owner service account (403 otherwise).
  • Rate limits. The Query API allows 60 queries per hour and 5 at once; raw export 60 per hour and 3 per second. Core retries a 429 using Retry-After; nothing else is retried.
  • Errors come back as core ApiErrors with Mixpanel’s message and error_code. Request bodies (tokens, profiles, events) are stripped from the error, and secrets Mixpanel echoes are redacted.
What you get:
  • 119 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

Find profiles on a plan
Import a signed-up event
See the full list on the API page.

What’s next

API reference

Every mixpanel.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.