Posthog logo

Posthog

by PostHog

Connects MCP clients to PostHog for analytics, feature flags, experiments, dashboards, surveys, replay, and error tracking.

Install Posthog

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
https://mcp.posthog.com/mcp

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Hosted endpointLive · TodayLive Remote EndpointOur automated health check connected to this remote MCP endpoint successfully.Last checked 11/9/2026, 4:45:30 AM

Clients with native remote MCP support can connect directly to this URL.

Remote endpoint
https://mcp.posthog.com/mcp

Overview

PostHog/posthog connects MCP clients to PostHog through a hosted Streamable HTTP endpoint. Its tools cover product analytics and SQL, dashboards, experiments, feature flags, surveys, session replay, and error tracking, with examples ranging from trend queries to creating rollouts and experiments. Authenticate with a personal PostHog API key, then use the setup wizard or configure an MCP client manually. Reach for it when an agent needs to inspect PostHog data or make changes to supported PostHog resources.

Use cases

  • Query signup trends by day
  • Create a feature flag with a percentage rollout
  • Create an experiment with funnel metrics
  • Investigate the most frequent project errors
  • List dashboards and tracked events

Key features

  • PostHog analytics and SQL queries
  • Feature flag creation and inspection
  • Experiment setup and monitoring
  • Dashboard and event discovery
  • Error tracking investigation
  • Feature-based tool filtering

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

34/34 checks healthy over the last 23d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 1

Scanned 23d ago via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars40kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Posthog works

What PostHog/posthog does

PostHog/posthog exposes PostHog capabilities through the Model Context Protocol. It gives compatible AI clients access to analytics and SQL queries, dashboards, experiments, feature flags, surveys, session replay, error tracking, and related PostHog features.

The server supports both read and write workflows. An agent can query trends, inspect tracked events, list dashboards, review error groups, create a feature flag with a rollout percentage, or create an experiment with control and test variants. The available surface also includes feature areas such as actions, alerts, annotations, cohorts, customer analytics, data catalog, data schema exploration, data warehouse, and core utilities such as project switching and documentation search.

How it works

The hosted MCP endpoint is https://mcp.posthog.com/mcp. Clients connect over Streamable HTTP and authenticate by sending a personal PostHog API key as a Bearer token in the Authorization header.

Streamable HTTP clients must advertise both JSON and server-sent events in the Accept header: application/json, text/event-stream. MCP connection setup also requires initialization followed by the notifications/initialized message. The Model Context Protocol SDK handles that sequence when its client connects through the Streamable HTTP transport.

All tools are exposed when no feature filter is supplied. Adding a features query parameter restricts the exposed tools, for example ?features=flags,workspace,dashboards. This can reduce the server surface for a client that only needs selected PostHog areas.

Setup and configuration

The quickest installation path is the PostHog wizard:

Terminal
npx @posthog/wizard@latest mcp add

The wizard can add the configuration to Cursor, Claude, Claude Code, VS Code, and Zed. For a manual setup, first create a personal API key using PostHog’s MCP Server preset. Configure the client to run npx with mcp-remote@latest, pointing it at the hosted endpoint, and provide the key through the POSTHOG_AUTH_HEADER environment variable in the form Bearer <personal-api-key>.

A Node application can connect directly with the MCP SDK’s StreamableHTTPClientTransport. Set POSTHOG_AUTH_HEADER, optionally set MCP_URL to override the default endpoint, and include the required authorization and Accept headers in requests.

Tools and capabilities

  • Query trends, including unique-user counts over time.
  • Run analytics and SQL-oriented PostHog queries.
  • List and inspect dashboards and tracked events.
  • Create and inspect feature flags with rollout and targeting settings.
  • Create experiments with variants and funnel metrics.
  • Retrieve error-tracking issues and affected-user information.
  • Work with surveys, session replay, alerts, cohorts, annotations, and other exposed feature groups.

Limitations and notes

Tool availability depends on the selected feature filter. Supplying feature names exposes only matching groups; omitting the filter exposes the full available tool set. API access uses a personal PostHog key, so the connected client operates within the permissions associated with that key.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Posthog

PostHog/posthog is an MCP server that connects MCP clients to PostHog through the hosted Streamable HTTP endpoint. Its tools cover analytics and SQL, dashboards, experiments, feature flags, surveys, session replay, and error tracking, letting agents query data and manage supported PostHog resources with a personal API key.

Run `npx @posthog/wizard@latest mcp add` to add it automatically to supported clients. For manual installation, create a personal API key with the MCP Server preset and configure `mcp-remote@latest` with the hosted endpoint and a Bearer token in `POSTHOG_AUTH_HEADER`.

Yes, PostHog/posthog works with Cursor. The PostHog wizard can add the MCP configuration automatically, or you can configure Cursor manually with `mcp-remote@latest`, the `https://mcp.posthog.com/mcp` endpoint, and a personal PostHog API key.

Add a `features` query parameter to the MCP URL, such as `?features=flags,workspace,dashboards`. Only tools matching the selected feature groups are exposed; leaving the parameter out makes all available tools accessible.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPosthog AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/posthog-posthog?style=directory)](https://allmcps.com/mcp/posthog-posthog)
HTML Embed
<a href="https://allmcps.com/mcp/posthog-posthog"><img src="https://allmcps.com/api/badge/posthog-posthog?style=directory" alt="Posthog on AllMCPs" /></a>