Mixpanel Data plugin marketplace
npx claudepluginhub jaredmcfarland/mixpanel_dataTurn Claude into a senior data analyst and Mixpanel product analytics expert. CodeMode-first: Claude writes Python using mixpanel_data + pandas instead of calling tools or CLI commands.
Claude Code marketplace entries for the plugin-safe Antigravity Awesome Skills library and its compatible editorial bundles.
Curated collection of 141 specialized Claude Code subagents organized into 10 focused categories
Directory of popular Claude Code extensions including development tools, productivity plugins, and MCP integrations
⚠️ Pre-release Software: This package is under active development and not yet published to PyPI. APIs may change between versions.
A complete programmable interface to Mixpanel analytics—Python library and CLI for discovery, querying, streaming, and entity management.
Mixpanel's web UI is powerful for interactive exploration, but programmatic access requires navigating multiple REST endpoints with different conventions. mixpanel_data provides a unified interface: discover your schema, run analytics queries, stream data, and manage entities—all through consistent Python methods or CLI commands.
Core analytics—typed Insights engine queries (DAU/WAU/MAU, formulas, filters, breakdowns), segmentation, funnels, retention, saved reports—plus entity management (dashboards, reports, cohorts, feature flags, experiments), raw JQL execution, and streaming data extraction.
Install directly from GitHub (package not yet published to PyPI):
pip install git+https://github.com/jaredmcfarland/mixpanel_data.git
Requires Python 3.10+. Verify installation:
mp --version
Option A: OAuth Login (interactive, recommended)
mp auth login --region us --project-id 12345 # Opens browser
mp auth status # Verify connection
Option B: Service Account (scripts, CI/CD)
# Interactive prompt (secure)
mp auth add production --username sa_xxx --project 12345 --region us
# You'll be prompted for the service account secret with hidden input
mp auth test # Verify connection
Alternative methods for CI/CD:
# Via inline environment variable (secret is only exposed to this command)
MP_SECRET=xxx mp auth add production --username sa_xxx --project 12345
# Via stdin (useful when secret is already in a variable)
echo "$SECRET" | mp auth add production --username sa_xxx --project 12345 --secret-stdin
Or set all credentials as environment variables: MP_USERNAME, MP_SECRET, MP_PROJECT_ID, MP_REGION
mp inspect events # List all events
mp inspect properties --event Purchase # Properties for an event
mp inspect funnels # Saved funnels
import mixpanel_data as mp
ws = mp.Workspace()
# Typed insights query (recommended)
result = ws.query("Purchase", math="unique", group_by="country", last=30)
print(result.df)
# Or use the CLI for legacy query methods
mp query segmentation --event Purchase --from 2025-01-01 --to 2025-01-31 --on country
import mixpanel_data as mp
ws = mp.Workspace()
for event in ws.stream_events(from_date="2025-01-01", to_date="2025-01-31"):
print(event["event"])
import mixpanel_data as mp
from mixpanel_data import Metric, Filter, Formula, GroupBy
ws = mp.Workspace()
# Discover what's in your project
events = ws.events()
props = ws.properties("Purchase")
funnels = ws.funnels()
cohorts = ws.cohorts()
# Insights queries — typed, composable analytics
result = ws.query("Login") # simple event count
result = ws.query("Login", math="dau", last=90) # DAU trend
result = ws.query("Purchase", math="total", # revenue by country
math_property="amount", group_by="country")
result = ws.query( # conversion rate formula
[Metric("Signup", math="unique"), Metric("Purchase", math="unique")],
formula="(B / A) * 100",
formula_label="Conversion Rate",
unit="week",
)
result = ws.query("Purchase", # filtered with breakdown
where=Filter.equals("country", "US"),
group_by=GroupBy("amount", property_type="number", bucket_size=50),
)
print(result.df) # pandas DataFrame
# Legacy live analytics queries
result = ws.segmentation(
event=events[0],
from_date="2025-01-01",
to_date="2025-01-31",
on="country"
)
# Query a saved funnel
funnel = ws.funnel(
funnel_id=funnels[0].id,
from_date="2025-01-01",
to_date="2025-01-31"
)
# Manage entities
dashboards = ws.list_dashboards()
cohort = ws.create_cohort(mp.CreateCohortParams(name="Power Users"))
# Feature flags and experiments
flags = ws.list_feature_flags()
flag = ws.create_feature_flag(mp.CreateFeatureFlagParams(name="Dark Mode", key="dark_mode"))
experiments = ws.list_experiments()
exp = ws.create_experiment(mp.CreateExperimentParams(name="Checkout Flow Test"))
# Operational tooling
alerts = ws.list_alerts()
annotations = ws.list_annotations(from_date="2025-01-01")
webhooks = ws.list_webhooks()