analytics
Mixpanel Analytics CLI for AI Agents
Use the Mixpanel Analytics CLI from KosmoKrator to call Mixpanel Analytics tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Mixpanel Analytics CLI Setup
Mixpanel Analytics can be configured headlessly with `kosmokrator integrations:configure mixpanel`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure mixpanel --set api_key="$MIXPANEL_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor mixpanel --json
kosmokrator integrations:status --json Credentials
Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
api_key | MIXPANEL_API_KEY | Secret secret | yes | API Key |
url | MIXPANEL_URL | URL url | no | Mixpanel URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call mixpanel.mixpanel_get_cohort '{"id":"example_id"}' --json kosmo integrations:mixpanel mixpanel_get_cohort '{"id":"example_id"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs mixpanel --json
kosmo integrations:docs mixpanel.mixpanel_get_cohort --json
kosmo integrations:schema mixpanel.mixpanel_get_cohort --json
kosmo integrations:search "Mixpanel Analytics" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
mixpanel.mixpanel_get_cohort
Retrieve detailed information for a Mixpanel cohort by its ID. Returns cohort membership data and behavioral criteria.
read - Parameters
- id
kosmo integrations:call mixpanel.mixpanel_get_cohort '{"id":"example_id"}' --json kosmo integrations:mixpanel mixpanel_get_cohort '{"id":"example_id"}' --json mixpanel.mixpanel_get_current_user
Get the currently authenticated Mixpanel user. Returns account details for the API key owner — useful for verifying credentials and checking permissions.
read - Parameters
- none
kosmo integrations:call mixpanel.mixpanel_get_current_user '{}' --json kosmo integrations:mixpanel mixpanel_get_current_user '{}' --json mixpanel.mixpanel_get_event
Retrieve analytics data for a specific Mixpanel event by name. Returns event counts and breakdowns over time.
read - Parameters
- name, type, unit, from, to
kosmo integrations:call mixpanel.mixpanel_get_event '{"name":"example_name","type":"example_type","unit":"example_unit","from":"example_from","to":"example_to"}' --json kosmo integrations:mixpanel mixpanel_get_event '{"name":"example_name","type":"example_type","unit":"example_unit","from":"example_from","to":"example_to"}' --json mixpanel.mixpanel_get_funnel
Retrieve detailed conversion data for a Mixpanel funnel by its ID. Returns step-by-step conversion rates and drop-off analytics.
read - Parameters
- id
kosmo integrations:call mixpanel.mixpanel_get_funnel '{"id":"example_id"}' --json kosmo integrations:mixpanel mixpanel_get_funnel '{"id":"example_id"}' --json mixpanel.mixpanel_list_cohorts
List all behavioral cohorts in the Mixpanel project. Returns cohort names, IDs, and sizes.
read - Parameters
- none
kosmo integrations:call mixpanel.mixpanel_list_cohorts '{}' --json kosmo integrations:mixpanel mixpanel_list_cohorts '{}' --json mixpanel.mixpanel_list_events
List events from Mixpanel Analytics. Optionally filter by event type, time unit, or date range. Returns the most recent events matching the criteria.
read - Parameters
- type, unit, from, to, limit
kosmo integrations:call mixpanel.mixpanel_list_events '{"type":"example_type","unit":"example_unit","from":"example_from","to":"example_to","limit":1}' --json kosmo integrations:mixpanel mixpanel_list_events '{"type":"example_type","unit":"example_unit","from":"example_from","to":"example_to","limit":1}' --json mixpanel.mixpanel_list_funnels
List all funnels configured in the Mixpanel project. Returns funnel names, IDs, and basic configuration.
read - Parameters
- none
kosmo integrations:call mixpanel.mixpanel_list_funnels '{}' --json kosmo integrations:mixpanel mixpanel_list_funnels '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
mixpanel.mixpanel_get_cohort 1 parameters
kosmo integrations:schema mixpanel.mixpanel_get_cohort --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Mixpanel cohort ID. |
mixpanel.mixpanel_get_current_user 0 parameters
kosmo integrations:schema mixpanel.mixpanel_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mixpanel.mixpanel_get_event 5 parameters
kosmo integrations:schema mixpanel.mixpanel_get_event --json | Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | The event name to retrieve data for. |
type | string | no | Event type: "general" or "unique" (default: "general"). |
unit | string | no | Time unit: "hour", "day", "week", "month" (default: "day"). |
from | string | no | Start date in YYYY-MM-DD format. |
to | string | no | End date in YYYY-MM-DD format. |
mixpanel.mixpanel_get_funnel 1 parameters
kosmo integrations:schema mixpanel.mixpanel_get_funnel --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Mixpanel funnel ID. |
mixpanel.mixpanel_list_cohorts 0 parameters
kosmo integrations:schema mixpanel.mixpanel_list_cohorts --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mixpanel.mixpanel_list_events 5 parameters
kosmo integrations:schema mixpanel.mixpanel_list_events --json | Parameter | Type | Required | Description |
|---|---|---|---|
type | string | no | Event type: "general" or "unique" (default: "general"). |
unit | string | no | Time unit: "hour", "day", "week", "month" (default: "day"). |
from | string | no | Start date in YYYY-MM-DD format. |
to | string | no | End date in YYYY-MM-DD format. |
limit | integer | no | Maximum number of events to return (default: 100). |
mixpanel.mixpanel_list_funnels 0 parameters
kosmo integrations:schema mixpanel.mixpanel_list_funnels --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.