Mixpanel

Lightweight, dependency-free, in-memory Mixpanel ingestion + query API fake for testing code that uses the real mixpanel Node SDK (and the language-agnostic Mixpanel HTTP API).

Default port: 4808

Quick start

import { MixpanelServer } from "./services/mixpanel/src/server.js";

const server = new MixpanelServer(4808);
await server.start();
// ... run your app/tests ...
await server.stop();

Point the real mixpanel client at it via the host option:

import Mixpanel from "mixpanel";

const mp = Mixpanel.init("parlel", { host: "127.0.0.1:4808", protocol: "http" });
mp.track("Signed Up", { distinct_id: "user-123", plan: "pro" });

Every ingested event is held in memory and inspectable via /__parlel/*.

Implemented operations

Ingestion uses Basic auth (project token as username); any credentials are accepted.

Ingestion

Query

Service & inspection operations (parlel extensions)

Access via MCP / preview URL

In a parlel pool the service is reachable at its preview URL (host/port shown by the pool); set the SDK's host/protocol to that URL. Through the parlel MCP server the ingestion and query routes are exposed as a tool surface, so an AI agent can drive /track, /import, /engage and query /api/2.0/events directly.

Surface coverage

This emulator faithfully replicates the API surface most application code and agents exercise. Anything below the supported lines is either an intentional design choice for a fast, zero-cost local emulator (✓ By design) or a candidate for a future release (⟳ Roadmap) — never a silent inaccuracy.

Legend: ✅ fully supported · ◐ accepted (stored, not strictly enforced) · ✓ by design · ⟳ on the roadmap.

FeatureStatus
track (data param + JSON + array)✅ Supported
import historical ingest✅ Supported
engage people updates✅ Supported
events query✅ Supported
Captured-event inspection✅ Supported (parlel extension)
JQL / segmentation / funnels / retention math⟳ Roadmap
Real time-series aggregation✓ By design — Not computed
Basic-auth credential validation◐ Any credentials accepted

Manifest

See services/mixpanel/manifest.json:

<!-- parlel:testenv:start -->

Configuration — test.env

Copy these into your test.env (used by the bridge sidecar flow). Tokens are Parlel's seeded test credentials — any non-empty value is accepted by the emulator, so you rarely need to change them. Swap in real credentials only when pointing at the live service in prod.env.

MIXPANEL_TOKEN=parlel
MIXPANEL_API_SECRET=parlel-secret
MIXPANEL_HOST=http://parlel-bridge:4808
MIXPANEL_BASE_URL=http://parlel-bridge:4808
<!-- parlel:testenv:end -->