Discover / GTM & Growth

Mixpanel Event Analytics MCP

by mixpanelPython

Mixpanel API wrapper for user event tracking, funnel conversion analysis, and cohort retention.

MCP Serverstable

Maturity: stable because 13y old, v5.2.0 released 24d ago. Derived from release and commit history, not a rating.

Stars
108
Forks
89
Downloads / mo
7.6M
Last commit
2026-07-28
License
NOASSERTION
Open issues
28

Market and trust evidence

Edition not yet matched

No exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.

Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.

In practice

Written by AI from this repository’s README · high confidence

A Python backend needs to send analytics events and profile updates to Mixpanel without hand rolling HTTP calls.

Use it when

When Python server code must track events, update people profiles, or read feature flags in a Mixpanel project.

Not the right pick when

Not for importing, exporting, transforming or deleting Mixpanel data, which the README routes to the separate mixpanel-utils package.

Capabilities

  • Track events with custom properties
  • Update user profiles with people_set
  • Service account authentication for server to server use
  • BufferedConsumer for batching requests
  • Local feature flag variant lookup

Requirements

  • A Mixpanel project token
  • Service account username, secret and project id for the import endpoint and feature flags

Cost: Cost not stated

Install

Derived from the published package name in the repository, not from a model.

Video walkthroughs

Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.

What the repository ships

Ships CLAUDE.mdHas docsSecurity policyCI configured

Detected from the actual files in the repository root.

Latest release v5.2.0

Published 2026-07-10

Features

  • add service account authentication support (#175)

Fixes

  • restore PyPy 3.9 compatibility by pinning pydantic (#176)

Full Changelog

Release notes for the mixpanel Python package will be added here starting

with the first release made under the standardized release process.

For prior history, see CHANGES.txt.

Tags

README

mixpanel-python

_July 24, 2026_ - v5.3.0

PyPI

PyPI - Python Version

PyPI - Downloads

Tests

This is the official Mixpanel Python library. This library allows for

server-side integration of Mixpanel.

To import, export, transform, or delete your Mixpanel data, please see our

mixpanel-utils package.

Installation

The library can be installed using pip:


pip install mixpanel

Getting Started

Typical usage usually looks like this:


from mixpanel import Mixpanel

mp = Mixpanel(YOUR_TOKEN)

# tracks an event with certain properties
mp.track(DISTINCT_ID, 'button clicked', {'color' : 'blue', 'size': 'large'})

# sends an update to a user profile
mp.people_set(DISTINCT_ID, {'$first_name' : 'Ilya', 'favorite pizza': 'margherita'})

You can use an instance of the Mixpanel class for sending all of your events

and people updates.

Service Account Authentication

For enhanced security in server-to-server integrations, you can use service account credentials for authentication instead of API secrets:


from mixpanel import Mixpanel, ServiceAccountCredentials

# Create credentials object
# Service accounts replace api_key/api_secret for authentication
credentials = ServiceAccountCredentials(
    username='YOUR_SERVICE_ACCOUNT_USERNAME',
    secret='YOUR_SERVICE_ACCOUNT_SECRET',
    project_id='YOUR_PROJECT_ID'
)

# Token identifies the project and is used for event tracking
# Credentials are used for endpoints that require authentication
mp = Mixpanel(YOUR_TOKEN, credentials=credentials)

# Event tracking operations use the token (sent in payload)
mp.track(DISTINCT_ID, 'button clicked', {'color': 'blue'})
mp.people_set(DISTINCT_ID, {'$first_name': 'John'})

Service account credentials can also be used with custom consumers like BufferedConsumer:


from mixpanel import Mixpanel, BufferedConsumer, ServiceAccountCredentials

credentials = ServiceAccountCredentials(
    username='YOUR_SERVICE_ACCOUNT_USERNAME',
    secret='YOUR_SERVICE_ACCOUNT_SECRET',
    project_id='YOUR_PROJECT_ID'
)

# Option 1: Pass credentials to the consumer constructor
consumer = BufferedConsumer(max_size=50, credentials=credentials)
mp = Mixpanel(YOUR_TOKEN, consumer=consumer)

# Option 2: Let Mixpanel create the default consumer with credentials
mp = Mixpanel(YOUR_TOKEN, credentials=credentials)

# Event tracking uses the token (sent in payload)
mp.track(DISTINCT_ID, 'event_name')

Service account credentials are only used for the /import endpoint and feature flags. Regular event tracking operations (track, people_set, group_set) use the token provided in the constructor, which is sent in the event payload.

Service Accounts with Feature Flags

Service account credentials are automatically used for feature flag operations when configured:


from mixpanel import Mixpanel, ServiceAccountCredentials
from mixpanel.flags.types import LocalFlagsConfig

credentials = ServiceAccountCredentials(
    username='YOUR_SERVICE_ACCOUNT_USERNAME',
    secret='YOUR_SERVICE_ACCOUNT_SECRET',
    project_id='YOUR_PROJECT_ID'
)

# Token identifies the project for event tracking, credentials handle authentication
mp = Mixpanel(
    YOUR_TOKEN,
    credentials=credentials,
    local_flags_config=LocalFlagsConfig()
)

# Feature flag requests will use service account authentication
variant = mp.local_flags.get_variant_value('my-flag', fallback_value=False, context={...})

Note: When using service account credentials, the token parameter in the Mixpanel constructor is still required for event tracking operations (track, people_set, etc.) since the token is included in the event data payload. However, feature flag operations use the project_id from credentials instead of the token for authentication.

Additional Information

from the tracking python process.

Ask DeepWiki

Related tools