Connector guide7-minute read23 MCP tools7 languages

How to Connect Mixpanel to Gemini via MCP

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

HCBy HelpCode teamUpdated 7 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Mixpanel

Mixpanel

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

tools

23

Region

INTL

Category

Analytics

Authentication

Basic Auth

Required env vars

MIXPANEL_API_HOSTMIXPANEL_SERVICE_ACCOUNT_USERNAMEMIXPANEL_SERVICE_ACCOUNT_SECRETMIXPANEL_PROJECT_ID
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Mixpanel in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

Try asking

Example prompts for Mixpanel

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Mixpanel · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Mixpanel, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Mixpanel + Gemini

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

MIXPANEL_API_HOST, MIXPANEL_SERVICE_ACCOUNT_USERNAME, MIXPANEL_SERVICE_ACCOUNT_SECRET, MIXPANEL_PROJECT_ID

Step 1 — Get credentials

  1. With the Owner or Admin role, open Organization Settings → Service Accounts (https://mixpanel.com/settings/org#serviceaccounts, for an EU project https://eu.mixpanel.com/settings/org#serviceaccounts) and add a service account. A project Owner or Admin can also create one under Project Settings → Service Accounts for that project only.
  2. Name it (for example AnythingMCP), give it access to the project and choose the role: Consumer is enough to read reports and profiles; creating, editing or deleting annotations and listing annotation tags need Analyst or higher. An expiry date is optional: once it passes, every call fails with 401.
  3. Copy the username (it looks like anythingmcp.abc123.mp-service-account) into MIXPANEL_SERVICE_ACCOUNT_USERNAME and the secret into MIXPANEL_SERVICE_ACCOUNT_SECRET straight away: Mixpanel shows the secret only once. If you lose it, create a new service account.
  4. Put the project id into MIXPANEL_PROJECT_ID: Project Settings → Overview → Project ID, or the number after /project/ in the project's address.
  5. Set MIXPANEL_API_HOST to where the project stores its data (Project Settings → Overview → Data Residency): https://mixpanel.com (US, the default), https://eu.mixpanel.com (EU) or https://in.mixpanel.com (India).
  6. Only if your project uses Data Views: set MIXPANEL_WORKSPACE_ID to the id of the global data view (the number after /view/ in the address). Otherwise leave it empty.
  7. Install the connector and run mixpanel_list_event_names to see which events your project tracks.

Plan: reports use Mixpanel's Query API, which comes with the Growth and Enterprise plans. On the Free plan every report tool answers 402, and so does the connection check at install. The annotation tools work on every plan. A Growth trial is enough to try the reports.

Limits: Mixpanel allows 60 queries per hour and 5 at the same time per project, shared with every other integration that queries the project. Each report is one query, so ask for a breakdown in one go rather than day by day or user by user. Above the limit Mixpanel answers 429: wait instead of retrying straight away.

What it reads: event trends, segmentation by any property with sums and averages, saved funnels, retention, frequency, saved Insights reports, cohorts and user or group profiles. Only saved funnels and saved Insights reports can be run; a report is found by the number after report- in its address. Dates are whole days in the project's time zone (Project Settings → Overview → Timezone).

Confirm first: annotations are notes pinned to a date that every chart of the project shows to all its members. The AI confirms the text and date with you before mixpanel_create_annotation or mixpanel_update_annotation. mixpanel_delete_annotation is switched off at install.

Common errors: 401: wrong username or secret, or the service account expired. 403: the service account has no access to this project, or its role is too low (annotation changes need Analyst). 400: usually a misspelled parameter, a date not written YYYY-MM-DD or a filter with a syntax error. If a correct project id is refused, check MIXPANEL_API_HOST against the project's data residency. Empty results are not errors: there is no data for that event or range.

The connector does not send or import events or profiles, export raw events, run JQL or the per-user activity stream, edit Lexicon, create cohorts, or handle feature flags, experiments or project administration.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Gemini

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart gemini.
  3. Run /mcp inside Gemini CLI (or gemini mcp list in your shell): anythingmcp should show as connected.
  4. Start prompting: Gemini CLI can now call the Mixpanel tools.

Available tools

ToolWhat it does
mixpanel_list_event_namesList the names of the most common events in the project over the last 31 days, as a plain array of strings
mixpanel_get_top_eventsGet today's top events with their count (amount) and percent_change against yesterday, under events, plus the counting type
mixpanel_get_event_countsCount one or more events per minute, hour, day, week or month over a date range
mixpanel_get_top_event_propertiesList the most used property names of one event with how many events carry each, as an object of property name to {count}
mixpanel_get_top_property_valuesList the most common values of one property of one event, as a plain array of strings (e.g. the browsers or plans seen)
mixpanel_get_event_property_countsCount one event broken down by the values of one of its properties, per unit over a date range
mixpanel_query_segmentationSegmentation: count one event over a date range, optionally filtered with where and broken down with on
mixpanel_query_segmentation_numericSegmentation into numeric buckets: count one event per day or hour, grouped into ranges of a numeric property expression (e.g. order amount…
mixpanel_query_segmentation_sumSum a numeric expression over the events of one type per day or hour, e.g. revenue per day from properties["amount"]
mixpanel_query_segmentation_averageAverage a numeric expression over the events of one type per day or hour, e.g. the average order value from properties["amount"]
mixpanel_list_funnelsList the saved funnels of the project with funnel_id and name. mixpanel_query_funnel needs one of these ids; a project without saved…
mixpanel_query_funnelGet the conversion data of a saved funnel over a date range: meta.dates and, per date, steps (count, step_conv_ratio, overall_conv_ratio…
mixpanel_query_retentionRetention: of the users who did born_event (first-time, "birth") or any event (recurring, "compounded") in each cohort date, how many came…
mixpanel_query_frequencyFrequency (addiction): how often users do an event within each day, week or month, counted per hour or per day
mixpanel_query_insights_reportRun a saved Insights report and return what it shows: computed_at, date_range, headers and series (metric name to date to value)
mixpanel_list_cohortsList the saved cohorts of the project with id, name, description, count (members now), created and is_visible
mixpanel_query_profilesRead user profiles (or group profiles with data_group_id): one, a list of distinct ids, those matching a where expression, or the members…
mixpanel_list_annotationsList the annotations of the project (notes pinned to a date on charts), optionally within a date range
mixpanel_get_annotationRead one annotation by id: results with id, date, description, user (who added it) and tags
mixpanel_list_annotation_tagsList the tags used on annotations with id, name and has_annotations
mixpanel_create_annotationAdd an annotation to the project: a note pinned to a date and time that every chart of the project shows to all its users
mixpanel_update_annotationChange the description or tags of an existing annotation (the date cannot be changed)
mixpanel_delete_annotationDelete an annotation for everyone in the project; it cannot be restored

Example prompts

  • "How many sign ups did we have per week over the last three months, broken down by country?"
  • "Show me the conversion of our saved onboarding funnel for last month and the step where most users drop off."
  • "Of the users who signed up in September, what share came back in each of the following eight weeks?"
  • "Add an annotation for the pricing page relaunch on 1 October and show me the text and date before you save it."

FAQ

Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.

Next steps

Was this guide helpful?

Your Mixpanel agent is one click away.

Install the connector, paste the key, prompt Gemini. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Mixpanel to ChatGPT via MCP

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

Connectors

How to Connect Mixpanel to Claude via MCP

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

Connectors

How to Connect Mixpanel to Cursor via MCP

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

Connectors

How to Connect Mixpanel to Meta Muse via MCP

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

Connectors

Mixpanel to MCP: Drive Mixpanel from any AI Agent

Let your AI read your Mixpanel product analytics: event trends, segmentation by any property, saved funnels, retention, frequency, saved Insights reports, cohorts and user profiles, and manage chart annotations. Signs in with a service account; US, EU and India data residency. Reports need the Growth or Enterprise plan.

Connectors

How to Connect Avito to Gemini via MCP

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.