KosmoKrator

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.

7 functions 7 read 0 write API key auth

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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key MIXPANEL_API_KEY Secret secret yes API Key
url MIXPANEL_URL URL url no Mixpanel URL

Call Mixpanel Analytics Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call mixpanel.mixpanel_get_cohort '{
  "id": "example_id"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:mixpanel mixpanel_get_cohort '{
  "id": "example_id"
}' --json

Agent Discovery Commands

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Mixpanel Analytics.

mixpanel.mixpanel_get_cohort

Read read

Retrieve detailed information for a Mixpanel cohort by its ID. Returns cohort membership data and behavioral criteria.

Parameters
id

Generic CLI call

kosmo integrations:call mixpanel.mixpanel_get_cohort '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:mixpanel mixpanel_get_cohort '{"id":"example_id"}' --json

mixpanel.mixpanel_get_current_user

Read read

Get the currently authenticated Mixpanel user. Returns account details for the API key owner — useful for verifying credentials and checking permissions.

Parameters
none

Generic CLI call

kosmo integrations:call mixpanel.mixpanel_get_current_user '{}' --json

Provider shortcut

kosmo integrations:mixpanel mixpanel_get_current_user '{}' --json

mixpanel.mixpanel_get_event

Read read

Retrieve analytics data for a specific Mixpanel event by name. Returns event counts and breakdowns over time.

Parameters
name, type, unit, from, to

Generic CLI call

kosmo integrations:call mixpanel.mixpanel_get_event '{"name":"example_name","type":"example_type","unit":"example_unit","from":"example_from","to":"example_to"}' --json

Provider shortcut

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

Read read

Retrieve detailed conversion data for a Mixpanel funnel by its ID. Returns step-by-step conversion rates and drop-off analytics.

Parameters
id

Generic CLI call

kosmo integrations:call mixpanel.mixpanel_get_funnel '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:mixpanel mixpanel_get_funnel '{"id":"example_id"}' --json

mixpanel.mixpanel_list_cohorts

Read read

List all behavioral cohorts in the Mixpanel project. Returns cohort names, IDs, and sizes.

Parameters
none

Generic CLI call

kosmo integrations:call mixpanel.mixpanel_list_cohorts '{}' --json

Provider shortcut

kosmo integrations:mixpanel mixpanel_list_cohorts '{}' --json

mixpanel.mixpanel_list_events

Read read

List events from Mixpanel Analytics. Optionally filter by event type, time unit, or date range. Returns the most recent events matching the criteria.

Parameters
type, unit, from, to, limit

Generic CLI call

kosmo integrations:call mixpanel.mixpanel_list_events '{"type":"example_type","unit":"example_unit","from":"example_from","to":"example_to","limit":1}' --json

Provider shortcut

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

Read read

List all funnels configured in the Mixpanel project. Returns funnel names, IDs, and basic configuration.

Parameters
none

Generic CLI call

kosmo integrations:call mixpanel.mixpanel_list_funnels '{}' --json

Provider shortcut

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

Retrieve detailed information for a Mixpanel cohort by its ID. Returns cohort membership data and behavioral criteria.

Operation
Read read
Schema command
kosmo integrations:schema mixpanel.mixpanel_get_cohort --json
ParameterTypeRequiredDescription
id string yes The Mixpanel cohort ID.

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.

Operation
Read read
Schema command
kosmo integrations:schema mixpanel.mixpanel_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

mixpanel.mixpanel_get_event

Retrieve analytics data for a specific Mixpanel event by name. Returns event counts and breakdowns over time.

Operation
Read read
Schema command
kosmo integrations:schema mixpanel.mixpanel_get_event --json
ParameterTypeRequiredDescription
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

Retrieve detailed conversion data for a Mixpanel funnel by its ID. Returns step-by-step conversion rates and drop-off analytics.

Operation
Read read
Schema command
kosmo integrations:schema mixpanel.mixpanel_get_funnel --json
ParameterTypeRequiredDescription
id string yes The Mixpanel funnel ID.

mixpanel.mixpanel_list_cohorts

List all behavioral cohorts in the Mixpanel project. Returns cohort names, IDs, and sizes.

Operation
Read read
Schema command
kosmo integrations:schema mixpanel.mixpanel_list_cohorts --json
ParameterTypeRequiredDescription
No parameters.

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.

Operation
Read read
Schema command
kosmo integrations:schema mixpanel.mixpanel_list_events --json
ParameterTypeRequiredDescription
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

List all funnels configured in the Mixpanel project. Returns funnel names, IDs, and basic configuration.

Operation
Read read
Schema command
kosmo integrations:schema mixpanel.mixpanel_list_funnels --json
ParameterTypeRequiredDescription
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.