Data & Analytics

Mixpanel MCP

Query Mixpanel analytics, manage dashboards, cohorts, metrics, feature flags, experiments, Lexicon events and properties, tracking plans, annotations and automations through Mixpanel's hosted MCP server.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • List dashboards

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Prefer Search-Entities with entity_types=['dashboard'] instead, it offers more flexibility and efficiency. Returns a list of all the dashboards in the project. Use query to filter by title (case-insensitive substring match).

  • List experiments

    Required tools: Get-Business-Context (call it once per conversation, before this tool). List and search experiments in a project. Filter by status, name (case-insensitive substring match), creator, creation date, or tags. Use Get-Experiment for full configuration.

  • List feature flags

    Required tools: Get-Business-Context (call it once per conversation, before this tool). List and search feature flags in a project. Filter by status, key, name, creator, or creation date. Use Get-Feature-Flag for full configuration.

  • List metrics

    Required tools: Get-Business-Context (call it once per conversation, before this tool). List all saved metrics in a project. Returns metric IDs, names, types, descriptions, and verified status. Use before creating experiments to find reusable metrics. For full definition: Get-Metric. To use in experiment: reference by ID. Results are ordered verified-first. Prefer verified metrics (verified=True) when choosing a metric that matches the user's request; fall back to unverified metrics only when no verified metric fits. Unverified metrics are still returned and may be used.

  • List organizations

    Returns the organizations the current user belongs to.

  • List properties

    Required tools: Get-Business-Context (call it once per conversation, before this tool). List properties for a Mixpanel project. Returns name and type by default. Two lookup modes (mutually exclusive): - names: Look up specific properties by exact name (max 100). - query: Search/discover properties by substring match (case-insensitive). resource_type: 'Event' for event properties, 'User' for user properties, or omit for both. events: Scope to one or more events' properties (only valid with resource_type='Event' or omitted). A lookup table property is listed with `extra` {mapped_property: <property>}. In Run-Query name it as the pair [mapped_property, name]. attributes: Extra attributes to include in the response. Valid values: description, display_name, hidden, dropped, sensitive, example_value, merged, tags, events. The 'events' attribute is only allowed when 'names' is provided — it requires a specific set of properties to look up event associations for. It is also expensive for large projects, so only request it when needed. tag: Filter to properties that have this tag name. hidden/dropped/sensitive: Filter by metadata status (True or False).

  • List tracking plans

    Required tools: Get-Business-Context (call it once per conversation, before this tool). List a project's tracking plans to find the one to read, update or delete. Entries are summaries: they carry event_count but not the events themselves. Call Get-Tracking-Plan with an entry's id for its membership. Results are paginated. If the response carries a next_cursor, pass it back as `cursor` for the following page; a null next_cursor means you have reached the end. Params: - project_id (int, required): Mixpanel project to list plans for. - name (str, optional): Case-insensitive substring of the plan name. Omit to list every plan in the project. - cursor (str, optional): next_cursor or previous_cursor from a previous call. Omit for the first page. - page_size (int, optional): Plans per page, 1 to 100. Omit to take the server default. - order (str, optional): Sort by creation time, 'desc' for newest first or 'asc' for oldest first. Omit to take the server default.

  • Merge group

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Merge a group of duplicate names into one canonical entity in a Mixpanel project's Lexicon. Works for events and event properties. DESTRUCTIVE: source entities are remapped to the canonical entity and their historical data is unified. Confirm with the user before calling. However, the merge can be undone in the Mixpanel UI with a single button click, so it's not a permanent action. Use with Find-Duplicate-Groups: pass its suggested_name as canonical_name, the remaining entity_names as source_names, and the group's entity_type as entity_type. canonical_name is filtered out of source_names automatically. entity_type must be 'events' or 'event_properties'. excluded: names from the suggested cluster the user does NOT want to merge. Pass them here (not in source_names) — they are left untouched but are still required to locate the suggestion, so include every name the cluster originally had across canonical + source + excluded. Server-side restrictions (rejected with an error): Mixpanel default entities, custom entities, dropped entities, entities already merged into another, and names that do not exist in the project.

  • Pause automation

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Pause one of the current user's active Automations. This is the safe direction: a paused Automation does not run or send notifications until it is activated again. Fails if the Automation is not active. An Automation (also called an agent flow or KPI Monitor, type metric_monitor) analyzes one metric with an AI agent, on a schedule or when the metric meets a threshold condition, and delivers a digest of its findings by email or Slack. Automations are personal: each user sees and edits only their own. Params: - project_id (int, required): Mixpanel project. - automation_id (str, required): The Automation's id from List-Automations.

  • Rename tag

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Rename an existing tag in a Mixpanel project. The new name must be unique within the project (max 175 characters). This updates all events and properties currently using this tag.

  • Run experiment pre launch checks

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Cross-references a draft experiment's configuration against a canonical list of pre-launch pitfalls and returns a structured PitfallReport. Call this at the **config-summary-for-approval** step before launching an experiment — once the user has chosen their primary metrics, baseline rate, MDE, cohort, etc. and the agent is summarizing the configuration for sign-off. Pitfall kinds (every one of these may appear in the returned report): - `pre_experiment_bias_likely` — retro A/A is enabled and a continuous-ish metric (continuous, retention, funnel) is configured but CUPED is off. - `high_variance_no_winsorization` — a continuous-ish metric is configured but Winsorization is off. - `multiple_primaries_no_bonferroni` — two or more primaries with no Bonferroni multiple-testing correction. - `underpowered_duration_insufficient` — expected exposures are less than half of the per-arm sample size required for the configured baseline rate and MDE. Severity: blocker. - `underpowered_duration_marginal` — expected exposures are between half and one full per-arm required sample size. - `cohort_too_small` — configured cohort cannot supply enough eligible users (per-arm target × `num_arms`) for every arm to hit its target. Pass `num_arms` for non-A/B experiments; defaults to 2. Severity: blocker. - `missing_guardrails` — no guardrail metrics configured. - `hypothesis_metric_mismatch` — the hypothesis mentions an outcome (signup, conversion, retention, revenue, etc.) that isn't represented in any configured primary metric name. - `primary_lacks_leading_indicator` — a retention-type primary is configured but no conversion- or funnel-type secondary metric is configured. Retention is lagging by construction; without a leading-indicator secondary, the agent has no earlier evidence to reason from while the experiment runs. Pass `secondary_metric_types` / `secondary_metric_count` so this pitfall can evaluate; with no secondary info supplied it silently abstains. Each pitfall carries a `severity` (`blocker` / `warning` / `fyi`) and an optional `fix_action` discriminated union (`extend_duration`, `enable_cuped`, `enable_winsorization`, `enable_bonferroni`, `add_guardrail`, `resize_cohort_or_sample`, `review_metric_alignment`) — the renderer pre-fills a corresponding `Update-Experiment` call from the fix_action so the user can accept a remediation with a single confirmation. **Blocker prevention is a form-layer concern, not Spark's.** This tool reports blockers so the agent can surface them prominently in the summary, but the experiment-creation form is what actually stops a launch when a blocker is unresolved. Don't pretend to gate the launch yourself — quote the blocker and the recommended fix_action, then defer to the form. Pitfalls are returned sorted by (severity, declaration order): blockers first, then warnings, then fyi; within a severity, the ordering above wins so data-trust risks (pre-experiment bias, variance inflation) surface before configuration nudges. All inputs other than `target_sample_size` are optional — the tool silently skips any pitfall whose inputs aren't supplied, so the agent can call it iteratively as the user fills out fields.

  • Run query

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Run a single analytics query and return its results directly. Use this whenever the user requests a chart, a report, a metric, explore a behavior or root cause, or asks to "create a report". Returns results to chain queries iteratively. Only use skip_results=true when building a dashboard or you won't use the results. The `report` parameter must be Mixpanel report JSON as defined by Get-Query-Schema. SQL or warehouse query text is not accepted. Report types and valid `chartType` values: - insights (bar, stacked-bar, line, stacked-line, pie, table, metric): Basic report, supports different chart types, trends, and metric aggregations. - funnels (ttc, frequency, trends, steps): Conversion rates between sequential events within a time window. Requires at least 2 steps. - flows (sankey, paths): Most frequent user paths to or from events. Shows steps before/after/between events as a sankey or paths chart. - retention (curve, trend): User engagement over time. Requires exactly 2 events: an initial action and a retention action. For very simple insights queries, use this schema as the `report` parameter (it only supports chartType table, line, or bar; use the full schema from Get-Query-Schema for other chart types): { "name": "string", "metrics": [ { "eventName": "string", "measurement": { "type": "basic", "math": "total | unique" } } ], "chartType": "table | line | bar", "unit": "hour | day | week | month", "dateRange": { "type": "relative", "range": { "unit": "day | week | month", "value": "integer" } } } Event names must match the project exactly; an unrecognized name returns zeros, not an error. Pass the literal "$all_events" (insights) or "$mp_anything_event" (retention), never their UI labels "All Events"/"Any event". Funnel steps, flow steps, and behavioral breakdowns each need a specific event. Profile sources ("All User Profiles", "All <group name>(s)") are not events and cannot be queried here. Breakdowns split results by a property or by experiment variant. Each breakdown's fields must be nested under a `metric` object (do NOT place `type`/`propertyName`/`experimentId` at the breakdown's top level). For example, to split "$all_events" into individual events by the "Event Name" property: "breakdowns": [ {"metric": {"type": "property", "propertyName": "Event Name", "resource": "event"}} ] To split by experiment variant, pass the experiment `id` from List-Experiments: "breakdowns": [ {"metric": {"type": "experiment", "experimentId": "<id from List-Experiments>"}} ] For an experiment that exists only in exposure events (not returned by List-Experiments), use: {"metric": {"type": "experiment", "experimentKey": "<experiment name from exposure events>"}} A lookup table property is the pair [mapped_property, name], e.g. ["itemCategory", "department"]; List-Properties lists each one with its mapped_property in extra. When mapped_property is a custom property, the first element can instead be the mapped_property_display_name from extra. For more elaborated queries, with multiple events, filters, breakdowns, formulas or advanced measurements you must call Get-Query-Schema(report_type: 'insights'|'funnels'|'flows'|'retention') first to see the full schema for the `report` parameter. Keep responses compact: prefer short date ranges (7-30 days) or coarser granularity (week/month), and avoid combining many breakdowns with fine-grained time series.

  • Search entities

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Search entities in a Mixpanel project: dashboards, reports, experiments, feature flags, metric trees, playlists, and heat maps. query: can be empty to browse by sort order. entity_types: set to include specific entity types. Values: insights, funnels, flows, retention, dashboard, launch-analysis, experiments, feature-flags, metric-trees, playlists, heat-maps. - Use Get-Report to fetch full details for insights, funnels, flows, and retention types. - Use Get-Dashboard to fetch full details for dashboards.

  • Search prior experiments

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Search the project's experiments store for prior tests on the same feature, metric, or hypothesis. Returns up to ``max_matches`` ranked matches with similarity reasons. Pass the ``metric_ids``, ``flag_key``, and ``hypothesis`` you are considering for the experiment you're setting up; the tool checks whether a similar experiment has already been run so you can surface what was learned. Provide whichever of these you have — any one is enough to get matches, and supplying more sharpens the ranking. Three deterministic signals are combined: metric_id overlap (Jaccard), flag-key similarity (exact / case-insensitive / substring / shared-token), and hypothesis-token overlap. Each match carries ``similarity_reasons`` so the agent can quote *why* a prior experiment is relevant. Pass ``exclude_experiment_id`` when ranking against an in-progress draft already saved in the store to prevent the draft trivially matching itself. ``include_archived=true`` to include archived experiments in the candidate pool.

  • Update annotation

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Change an annotation's description and/or tags. The date cannot be changed; delete and recreate the annotation instead. Parameters: - project_id (int): the project. - annotation_id (int or str): from List-Annotations. - description (str, optional): new text, up to 512 characters. - tags (list[str], optional): replaces the full tag set; [] removes all tags. - workspace_id (int, optional): workspace the annotation belongs to.

  • Update automation

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Update one of the current user's Automations. Pass only what changes: every omitted field keeps its current value, so to change only the schedule or a threshold's condition, pass only trigger, without re-fetching or re-supplying the metric or notifications. Two fields replace instead of patching: notifications replaces the whole list ([] removes every target), and metric_analysis.query_id replaces the monitored metric with the one from that Run-Query result. A threshold condition always judges the Automation's metric, so a new metric moves the condition onto it. Only update when the user asks. Updating a draft also activates it when its config is complete and the user is under their limit of active Automations, even if only the name changes: it starts running and sending real notifications. Before updating a draft, tell the user it will go live and get their consent. Otherwise status changes go through Activate-Automation and Pause-Automation; a paused Automation stays paused when updated. An Automation (also called an agent flow or KPI Monitor, type metric_monitor) analyzes one metric with an AI agent, on a schedule or when the metric meets a threshold condition, and delivers a digest of its findings by email or Slack. Automations are personal: each user sees and edits only their own. Params: - project_id (int, required): Mixpanel project. - automation_id (str, required): The Automation's id from List-Automations. - name (str, optional): New name. - description (str, optional): New description; an empty string clears it. - trigger (object, optional): The trigger fields to change. Restate method only to switch between a schedule and a threshold. - metric_analysis (object, optional): The metric, window or instructions to change. - notifications (list, optional): The full new list of targets.

  • Update business context

    Update the business context at the project or organization level. This is a full replace — the new content overwrites whatever exists; there is no merge or partial update. Other users may have authored the current context, so ALWAYS ask the user for explicit confirmation before calling this tool. Content should be minimal and focused: short, structured markdown notes that capture essential domain knowledge. Params: - context (str, required): The new context content. Pass an empty string to clear. - level (str, required): Either the literal string "project" or "organization". Must be passed explicitly so the level is never inferred. - project_id (int, required when level="project"): The project to update. - organization_id (int, required when level="organization"): The org to update. Call List-Organizations FIRST to obtain it. If List-Organizations returns exactly one org, use its id directly; if it returns more than one, ASK the user which org they mean before calling this tool.

  • Update cohort

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Update an existing Mixpanel cohort. All fields (name, description, definition, is_visible) are optional. Only the provided fields will be updated; omitted fields remain unchanged. `is_visible` toggles whether the cohort is hidden in the Mixpanel UI. Note that the `is_visible` value in the response is derived from entity sharing/visibility (a shared webapp serialization path) and may not reflect the value you just set — do not rely on the returned value to confirm a hide/unhide. To update the cohort's filter criteria, pass a new `definition` dict matching the CohortDefinition schema (same as Create-Cohort). Call Describe-Cohort-Schema for the full JSON schema if you don't already have it. `workspace_id` is required (unlike List-Cohorts, which lists project-wide when it is omitted).

  • Update custom property

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Update an existing formula-based custom property. Partial update: pass only the fields you want to change (`name`, `description`, `display_formula`, `composed_properties`); omitted fields keep their current value. When changing `display_formula` you must also pass the complete `composed_properties` mapping for it. `resource_type` is immutable. Use Get-Custom-Property first to see the current definition.

  • Update dashboard

    Required tools: Get-Business-Context (call it once per conversation, before this tool). Call Get-Dashboard with include_layout=True first to get cell/row IDs. - To update a report cell query_id, call Run-Query first. - To rename a report cell or change its description, send only name/description. - A report-link cell can't be renamed or requeried; delete it and create a report cell. - To add rows or cells, use any temporary string ID (e.g. "temp-row-1"). - To add cell in a new row, use the row temp id in the cell definition. - For updates and deletes, use real row and cell ids from Get-Dashboard. - rows_order may list only the rows to move; omitted rows follow in their current order. - filters replaces all board filters, using the Create-Dashboard filter schema; [] removes them. - time_filter sets the board date range, using the Create-Dashboard time filter schema; {} removes it. rows: ['<row_id>', 'add'] | ['<row_id>', 'delete'] Content: {type: 'text', html_content: 'string (max 5000000 chars)'} | {type: 'report', query_id: 'string', name: 'string (max 255 chars)', description: 'string'} cells: ['<cell_id>', 'create', 'text' | 'report', {row_id: 'string', ...Content}] | ['<cell_id>', 'update', 'text' | 'report', {...Content}] | ['<cell_id>', 'delete']

PreviousPage 4 / 5Next