npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@t-campbell18/mcp-mixpanel

v1.0.0

Published

MCP server for the Mixpanel API — query events, funnels, retention, profiles, and more

Readme

@t-campbell18/mcp-mixpanel

npm version License: MIT

An MCP (Model Context Protocol) server that wraps the Mixpanel REST API. Query events, funnels, retention, user profiles, and more — directly from any MCP-compatible AI agent.

Quick Start

npm install -g @t-campbell18/mcp-mixpanel

Set the required environment variables and run:

export MIXPANEL_PROJECT_ID="your-project-id"
export MIXPANEL_SERVICE_ACCOUNT_USERNAME="your-username"
export MIXPANEL_SERVICE_ACCOUNT_PASSWORD="your-password"
mcp-mixpanel

Environment Variables

| Variable | Required | Description | |---|---|---| | MIXPANEL_PROJECT_ID | Yes | Your Mixpanel project ID | | MIXPANEL_SERVICE_ACCOUNT_USERNAME | One auth method | Service account username | | MIXPANEL_SERVICE_ACCOUNT_PASSWORD | One auth method | Service account password | | MIXPANEL_API_SECRET | One auth method | Project API secret (legacy) | | MIXPANEL_REGION | No | US (default) or EU |

Authentication

At least one authentication method is required:

  1. Service Account (recommended): Set both MIXPANEL_SERVICE_ACCOUNT_USERNAME and MIXPANEL_SERVICE_ACCOUNT_PASSWORD. Service accounts support all query and export endpoints.
  2. API Secret (legacy): Set MIXPANEL_API_SECRET. Falls back to this if no service account is configured.

Tools

Query API

| Tool | Description | Example Prompt | |---|---|---| | query_events | Query event data with segmentation | "How many signups happened last week?" | | top_events | Get the most common events | "What are the top events today?" | | event_properties | Get top properties for an event | "What properties does the Purchase event have?" | | query_funnels | Query a saved funnel | "Show me conversion for funnel 12345" | | list_funnels | List all saved funnels | "What funnels do we have?" | | query_retention | Query retention data | "What's our 7-day retention for signups?" | | frequency_report | Get frequency/addiction report | "How often do users perform the Search event?" | | query_profiles | Query user profiles | "Find users who were last seen after Jan 1" | | user_activity | Get a user's event stream | "Show me recent activity for user abc123" | | query_insights | Run a saved Insights report | "Run insights report 67890" | | run_jql | Run a JQL script | "Run this JQL to find power users" | | segmentation_sum | Sum a numeric property over time | "What's total revenue this month?" | | segmentation_average | Average a numeric property over time | "What's the average order value this week?" | | list_cohorts | List all cohorts | "What cohorts do we have?" |

Export API

| Tool | Description | Example Prompt | |---|---|---| | export_events | Export raw event data (NDJSON, max 5000) | "Export all Purchase events from last week" |

Annotations

| Tool | Description | Example Prompt | |---|---|---| | list_annotations | List annotations in a date range | "Show annotations from this month" |

Setup

Claude Code

claude mcp add mixpanel -- npx -y @t-campbell18/mcp-mixpanel

Set environment variables in your shell before running Claude Code.

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "mixpanel": {
      "command": "npx",
      "args": ["-y", "@t-campbell18/mcp-mixpanel"],
      "env": {
        "MIXPANEL_PROJECT_ID": "your-project-id",
        "MIXPANEL_SERVICE_ACCOUNT_USERNAME": "your-username",
        "MIXPANEL_SERVICE_ACCOUNT_PASSWORD": "your-password"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "mixpanel": {
      "command": "npx",
      "args": ["-y", "@t-campbell18/mcp-mixpanel"],
      "env": {
        "MIXPANEL_PROJECT_ID": "your-project-id",
        "MIXPANEL_SERVICE_ACCOUNT_USERNAME": "your-username",
        "MIXPANEL_SERVICE_ACCOUNT_PASSWORD": "your-password"
      }
    }
  }
}

VS Code

Add to your VS Code MCP settings (.vscode/mcp.json):

{
  "servers": {
    "mixpanel": {
      "command": "npx",
      "args": ["-y", "@t-campbell18/mcp-mixpanel"],
      "env": {
        "MIXPANEL_PROJECT_ID": "your-project-id",
        "MIXPANEL_SERVICE_ACCOUNT_USERNAME": "your-username",
        "MIXPANEL_SERVICE_ACCOUNT_PASSWORD": "your-password"
      }
    }
  }
}

OpenClaw

mcp_servers:
  - name: mixpanel
    command: npx
    args: ["-y", "@t-campbell18/mcp-mixpanel"]
    env:
      MIXPANEL_PROJECT_ID: "your-project-id"
      MIXPANEL_SERVICE_ACCOUNT_USERNAME: "your-username"
      MIXPANEL_SERVICE_ACCOUNT_PASSWORD: "your-password"

EU Region

If your Mixpanel project is in the EU data residency, set:

export MIXPANEL_REGION=EU

This routes all API calls to Mixpanel's EU endpoints automatically.

License

MIT