by Mixpanel
Create a cohort
Creates a saved cohort of users from a cohort definition.
Updated Sep 26, 2026
create-cohort.md
Create a cohort
Creates a saved cohort of users from a cohort definition.
Note: Over MCP, read the structure of a cohort definition with Describe-Cohort-Schema before creating one.
Set up
Use the first option your agent supports.
MCP (official, remote)
Add this server to your agent's MCP settings, then sign in when asked.
{ "mcpServers": { "mixpanel": { "url": "https://mcp.mixpanel.com/mcp" } } }
Call the MCP tool Create-Cohort.
Server URL: https://mcp.mixpanel.com/mcp
Note: An organization admin enables MCP in Settings > Org > Overview first. EU and India projects use https://mcp-eu.mixpanel.com/mcp and https://mcp-in.mixpanel.com/mcp.
CLI (official)
Install the command and sign in with it, then confirm it runs.
pip install mixpanel-headless
mp --version
Run mp cohorts create.
Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.