Provider REST API

Analytics

Connect Claude to Mixpanel

Run Mixpanel segmentation, funnel and retention queries, and browse events, properties and cohorts. Toolspoke puts 9 of its actions behind one MCP endpoint that Claude, Cursor, and Codex all speak.

Connection
Provider REST API
Authentication
Service account
Actions exposed
9
Cost per call (typical)
1 credit
Adapter
Maintained by Toolspoke

Connected in three steps

  1. 1

    Install Mixpanel

    Open the marketplace in your workspace, add Mixpanel to the project your agents work in, and it appears on the gateway immediately.

  2. 2

    Connect the credential

    Authenticate with service account. Where to get one, and what it has to be able to reach, is the next section.

  3. 3

    Point your agent at the gateway

    Give your client one address, https://toolspoke.com/mcp. Claude Code takes it as a command, Claude and Claude Desktop add it as a custom connector, and Cursor, Codex and VS Code each read it from a config file of their own.

.mcp.json
{
  "mcpServers": {
    "toolspoke": {
      "type": "http",
      "url": "https://toolspoke.com/mcp"
    }
  }
}

One block covers every tool you have installed. Mixpanel shows up in the client as soon as your policy allows it, and so does everything else you install later.

Where the address goes, per client

Claude Code

Run it in your project, then /mcp to sign in

claude mcp add --transport http toolspoke https://toolspoke.com/mcp
Claude and Claude Desktop

Settings, then Connectors, then Add custom connector

https://toolspoke.com/mcp
Cursor

~/.cursor/mcp.json, or .cursor/mcp.json for one project

{ "mcpServers": { "toolspoke": { "url": "https://toolspoke.com/mcp" } } }
Codex

~/.codex/config.toml

[mcp_servers.toolspoke]
url = "https://toolspoke.com/mcp"
VS Code

.vscode/mcp.json, or the MCP: Add Server command

{ "servers": { "toolspoke": { "type": "http", "url": "https://toolspoke.com/mcp" } } }

What Mixpanel asks for

Service account. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

Service account username and secretRequired
Your service account's username, a colon, then its secret. Mixpanel → Organization settings → Service accounts → Add service account. Sent as HTTP Basic. Give it the Analyst role on only the project this connection should reach; the secret is shown once, at creation.
reporting.1a2b3c.mp-service-account:9f8e7d6c5b4a3210
Project IDRequired
The numeric project ID from Mixpanel → Settings → Project settings. A service account belongs to an organization rather than to a project, so every Query API request has to name the project - without it Mixpanel refuses the call in a way that reads like the credential is wrong.
1234567
Region hostOptional
https://mixpanel.com for a standard project, https://eu.mixpanel.com for EU data residency, https://in.mixpanel.com for India. A project's data only exists on its own region's host.
https://mixpanel.com

What Claude can do in Mixpanel

9 actions, each one declared and named by the connector rather than discovered at runtime. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.

Reads
9Reads
Writes
0Writes
Destructive
0Destructive

Reads

9

Fetches data and changes nothing.

  • run_segmentation

    The general-purpose reporting action: count one event over a date range, bucketed by time and optionally split by a property. `type` picks what is counted - general counts every occurrence, unique counts distinct users, average counts occurrences per user. Use `on` to break the totals down by a property expression such as properties["$browser"], and `where` to filter with the same expression syntax. Dates are yyyy-mm-dd and both ends are inclusive. Note the buckets here are minute, hour, day or month - Mixpanel offers no weekly unit on this endpoint.

  • run_funnel

    Run one of the project's saved funnels over a date range. Mixpanel has no ad-hoc funnel on this endpoint - the steps live in a funnel saved in the UI, so call list_saved_funnels first and pass its funnel_id. `length` and `length_unit` set the conversion window; leave them out to use whatever the saved funnel was built with. Dates are yyyy-mm-dd.

  • list_saved_funnels

    List the funnels saved in the project, as funnel_id and name pairs. run_funnel can only query a saved funnel, so this is where its funnel_id comes from.

  • run_retention

    Measure how many users who did a first action came back later. Mixpanel defaults retention_type to birth, and birth retention needs born_event - pass it unless you set retention_type to compounded. Leave `event` out to count a return on any event. `interval_count` is how many buckets of `unit` to report. Dates are yyyy-mm-dd and both ends are inclusive.

  • list_cohorts

    List the cohorts saved in the project: each one's ID, name, description, creation date and how many users currently match it. This returns the cohort definitions and their sizes, never the people inside them - Mixpanel does not expose cohort membership through this endpoint. Note it is a POST despite being a read; that is Mixpanel's own shape for it.

  • get_event_names

    List the project's most common event names over the last 31 days. Call this before any query action: Mixpanel matches event names literally, and a near-miss returns an empty series rather than an error.

  • get_event_properties

    List the property names most often sent with one event, each with how often it appears. Use it to discover what you can pass to `on` or `where` in run_segmentation before spelling a property wrong.

  • get_property_values

    List the values one property actually takes on one event, as a flat list of strings. Use it to find the exact spelling of a value before filtering on it - the difference between "IN" and "India" in a where expression is an empty result.

  • get_top_events

    The events with the most activity today, each with its count and how far that has moved from the usual. Use it as the quick "what is happening right now" read; get_event_names is the one for discovering the taxonomy over a longer window.

What it will not do

Enforced by the gateway rather than left to convention, which is why each of these can be stated flatly.

It cannot call anything else
The 9 actions above are the whole of it. A call to any other name is refused before it reaches Mixpanel rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
It only reads
Every action here reads. Nothing this connector can do changes anything in Mixpanel.
It reaches no further than your credential
Toolspoke holds no access to Mixpanel of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
It never hears from Mixpanel
Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Mixpanel. An agent has to ask.
It does not smooth over provider limits
Toolspoke does not retry, queue or back off around Mixpanel's own rate limits. A call that Mixpanel refuses comes back to the agent as a failed call.

Before you connect it

What can Claude do in Mixpanel?

9 named actions: 9 that only read. They include run_segmentation, run_funnel and list_saved_funnels. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.

What credentials does the Mixpanel connector need?

Service account. The connector asks for service account username and secret and project id, and optionally region host. Values are encrypted at rest and attached to the outbound request by the gateway, so they are never part of the arguments an agent sends and never reach the audit log.

Does the Mixpanel connector work with Cursor and Codex, or only Claude?

Any client that speaks MCP, and every one of them gets the same 9 actions. There is a single address, https://toolspoke.com/mcp. Claude Code adds it with claude mcp add --transport http, Claude and Claude Desktop take it as a custom connector in settings, Cursor reads it from .cursor/mcp.json, Codex from ~/.codex/config.toml, and VS Code from .vscode/mcp.json. Each of them signs in to the gateway itself, so there is no key to paste.

What does the Mixpanel connector not do?

The 9 actions above are the whole of it. A call to any other name is refused before it reaches Mixpanel rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Every action here reads. Nothing this connector can do changes anything in Mixpanel. Toolspoke holds no access to Mixpanel of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Mixpanel. An agent has to ask. Toolspoke does not retry, queue or back off around Mixpanel's own rate limits. A call that Mixpanel refuses comes back to the agent as a failed call.

Can I limit which actions an agent can call?

Yes, in two places. The project switches Mixpanel's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.

What gets recorded when an agent calls Mixpanel?

Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and the credits spent. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.