---
ref: tool:mixpanel/create-cohort
name: Create a cohort
company: company:mixpanel
workflows: []
access: [mcp, cli]
tags: [capability:build-audience, category:product-analytics, has:cli, has:mcp]
docs: https://docs.mixpanel.com/docs/mcp
updated: 2026-09-26
---

# 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.

```json
{ "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.

```sh
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.
