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.
7 天免费 · 无需信用卡 · EU 托管
问 Mixpanel 任何事
通过 AnythingMCP 对 Mixpanel 试一个真实提示 — Claude 调用工具并返回答案。在你的消息上按 Enter 即可在 Cloud 安装。
在 Cloud 上安装 MixpanelClaude 是 AI,可能会出错。请核对回答。
2 分钟设置
- 1在 cloud.anythingmcp.com 开始免费试用。
- 2在连接器商店点击 Mixpanel。提示时粘贴凭据。
- 3生成 MCP API 密钥,将 AI 客户端指向生成的 MCP URL。
Mixpanel 指南
面向主流 AI 客户端的逐步设置。
配置 Mixpanel
直接来自连接器定义:在哪里获取凭据、需要哪些权限,以及该适配器调用的是哪个 API。 由连接器作者以英文提供。
Mixpanel
This connector reads one Mixpanel project through the Query API (<host>/api/query): event names and today's top events, event and property counts, segmentation (counts, numeric buckets, sums, averages), saved funnels, retention and frequency, saved Insights reports, cohorts, and user or group profiles. It also manages the project's annotations through the App API (<host>/api/app/projects/<project id>/annotations). It signs in as a service account with HTTP Basic auth and sees what that account's role allows in the project.
Setup (about 5 minutes; you need the Owner or Admin role)
- Open Organization Settings → Service Accounts (https://mixpanel.com/settings/org#serviceaccounts, on 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 (https://mixpanel.com/settings/project#serviceaccounts) for that project only.
- Name it (for example "AnythingMCP"), grant it 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; when it passes, every call fails with 401.
- Copy the username (it looks like
anythingmcp.abc123.mp-service-account) intoMIXPANEL_SERVICE_ACCOUNT_USERNAMEand the secret intoMIXPANEL_SERVICE_ACCOUNT_SECRETstraight away: Mixpanel shows the secret only once. - Put the project id into
MIXPANEL_PROJECT_ID: Project Settings → Overview → Project ID (https://mixpanel.com/settings/project), or the number after/project/in the project's address. - Set
MIXPANEL_API_HOSTto the host the project lives on:https://mixpanel.com(US, the default),https://eu.mixpanel.com(EU Data Residency) orhttps://in.mixpanel.com(India Data Residency). Project Settings → Overview → Data Residency shows it, and an EU project opens on eu.mixpanel.com. - Only for a project with Data Views: set
MIXPANEL_WORKSPACE_IDto the id of the global data view (the number after/view/in the address). Leave it empty otherwise.
Plan: the Query API is part of the Growth and Enterprise plans. On the Free plan every report tool (all but the annotation tools) answers 402, and so does the connection check at install, which lists event names. The annotation tools work on every plan. A Growth trial is enough to try the reports.
Rate limits: the Query API allows 60 queries per hour and 5 at the same time per project, shared with every other integration that queries the project; above that Mixpanel answers 429. Every report tool call is one query, so plan them: one mixpanel_query_segmentation with on instead of one call per value, and never loop over days or users. On a 429, wait instead of retrying at once.
Dates: from_date and to_date are whole days written YYYY-MM-DD, both included, in the project's time zone (Project Settings → Overview → Timezone). Annotation dates are YYYY-MM-DD HH:mm:ss.
Where to start: mixpanel_list_event_names shows which events exist (exact names, case-sensitive), mixpanel_get_top_event_properties and mixpanel_get_top_property_values show the properties and values to filter on. Then mixpanel_get_event_counts for trends of several events, mixpanel_query_segmentation for one event filtered and broken down, mixpanel_query_segmentation_sum or mixpanel_query_segmentation_average for revenue-like numbers, mixpanel_query_segmentation_numeric for value ranges.
Expressions (where and on): refer to an event property as properties["name"] (Mixpanel's own properties start with $, e.g. properties["$browser"]). Operators: ==, !=, >, >=, <, <=, +, -, *, /, %, and, or, not, in, plus defined(...), number(...), string(...), boolean(...), floor, round, ceil. Strings take double quotes. Examples:
properties["$browser"] == "Chrome"properties["plan"] == "pro" and number(properties["amount"]) >= 50properties["account_id"] in [1,2,3,4]defined(properties["utm_source"]),not defined(properties["city"])on:properties["$country_code"]; for sums and buckets a number:number(properties["amount"]). Inmixpanel_query_profiles, profile properties are writtenuser["$email"]. Comparing a number with a string gives no match, so cast withnumber(...)when a property was tracked as text.
Funnels: only saved funnels can be queried. mixpanel_list_funnels gives the funnel_id; mixpanel_query_funnel returns, per date, each step's count and conversion ratios. The conversion window defaults to the one saved with the funnel.
Retention: mixpanel_query_retention with retention_type "birth" (default) needs born_event, the event that starts a cohort (e.g. "Sign Up"); event is what counts as coming back (any event without it). unit and interval_count set the buckets, e.g. unit "week" and interval_count 8 for eight weeks. "compounded" measures recurring activity instead. mixpanel_query_frequency shows how many days or hours per period users are active.
Insights reports: only saved reports can be run. mixpanel_query_insights_report needs the report's bookmark id: open the report and take the number after report- in the address (editor-card-id="report-12345"), or after #report/ in an older address.
Profiles: mixpanel_query_profiles returns at most page_size profiles per call (usually 1000). For the next page pass the session_id from the first answer with page one higher and the same filter. Always set output_properties to the few properties you need. Members of a cohort: filter_by_cohort with the id from mixpanel_list_cohorts. mixpanel_list_cohorts and mixpanel_query_profiles are POST requests that only read.
Annotations: notes on a date shown on every chart of the project. mixpanel_create_annotation and mixpanel_update_annotation change what all project members see: confirm the text and date with the user first. mixpanel_delete_annotation is installed switched off. They need the Analyst role or higher.
Errors: 401 means the username or secret is wrong or the service account expired. 403 means the service account has no access to this project, or its role is too low (annotation changes need Analyst). 400 comes with Mixpanel's reason, usually a misspelled parameter, a date not written YYYY-MM-DD or an expression with a syntax error (check the quotes). 429 is the rate limit above. When a correct project id is refused, check MIXPANEL_API_HOST against the project's data residency. Results that are empty objects or lists are not errors: the event, property or range has no data.
Out of scope: sending or importing events and profiles (the ingestion API lives on separate hosts, needs Owner or Admin, and tracked events cannot be removed again), raw event export, JQL (in maintenance mode; Mixpanel advises against new use), the per-user activity stream (in maintenance mode), Lexicon, cohort creation, feature flags, experiments and project administration.