MCP server Official

PostHog MCP

PostHog's official hosted MCP server: analytics, SQL, feature flags, experiments and error tracking from your AI agent.

Author
PostHog
Works with
Any MCP client, Claude Code, Cursor, OpenAI Codex, Windsurf
License
MIT
Documented
Oct 2, 2026

What PostHog MCP is

The PostHog MCP server is a free hosted endpoint at https://mcp.posthog.com/mcp. It lets agents read and write across PostHog products, such as analytics and SQL, dashboards, experiments, feature flags, surveys, session replay and error tracking. The code now lives in the PostHog monorepo under services/mcp.

What it does

How PostHog MCP plugs in: which agents run it and what it addsRUNS INYour agentClaude CodeOpenAI CodexCursorWindsurf4 hosts documentedMCP SERVER · OFFICIALPostHog MCPConnect the agent to tools, data…4 install steps1 permission notelicense: MITWHAT IT ADDSWhat it doesRun analytics queries and HogQL S…Create and manage feature flags a…Triage error tracking issues and…Manage dashboards, surveys and CD…agent → extension → new capability · from the official repository or docs
Where PostHog MCP runs and what it adds, from its documentation
  • Run analytics queries and HogQL SQL
  • Create and manage feature flags and experiments
  • Triage error tracking issues and read stack traces
  • Manage dashboards, surveys and CDP destinations
  • Triage support tickets and run semantic-layer metrics (beta)

When to use it

Good fit

  • Fixing production errors from your editor using PostHog stack traces
  • Shipping a feature flag from a prompt
  • Answering product analytics questions in an agent session

Not for

  • Orgs without AI data processing enabled, if you need the AI-powered tools (they require it)

How to install PostHog MCP

You need: A PostHog account; Personal API key (manual install) or OAuth login; Node.js for npx

  1. Run: npx @posthog/wizard@latest mcp add
  2. Or add https://mcp.posthog.com/mcp in your client (Claude Code, Cursor, VS Code, Windsurf, Codex, Zed)
  3. Authenticate with PostHog; region (US/EU) is routed automatically
  4. Or use a personal API key from the MCP Server preset with mcp-remote
Configuration example (from the official docs)
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://mcp.posthog.com/mcp",
        "--header",
        "Authorization:${POSTHOG_AUTH_HEADER}"
      ],
      "env": {
        "POSTHOG_AUTH_HEADER": "Bearer {INSERT_YOUR_PERSONAL_API_KEY_HERE}"
      }
    }
  }
}

Permissions and security

What it can access

  • Read and write across PostHog products for the authenticated account

Security notes from the maintainers

  • Some tools use LLMs internally, may bill as PostHog AI spend and need AI data processing enabled in org settings

Review the source before granting an agent access to credentials or production systems. We document what the maintainers state; we do not audit code.

Limitations

  • Standalone PostHog/mcp repo is moved into the PostHog monorepo
  • Streamable HTTP clients must send Accept: application/json, text/event-stream

Tools it extends

No user reviews yet

AI coding IDE, formerly Windsurf, now Devin Desktop: manage local and cloud coding agents inside a full IDE.

Free stops at: Light quota for agent usage, resets daily and weekly, Limited model availability

Listed Not yet reviewed

Verified windsurf.com (opens Devin Desktop (formerly Windsurf) website in a new tab)

Frequently asked questions

Where is the PostHog MCP server code?

It moved from PostHog/mcp into the PostHog monorepo at services/mcp. source

What is the PostHog MCP server URL?

https://mcp.posthog.com/mcp; US/EU region is routed by login. source

How do I install PostHog MCP quickly?

Run npx @posthog/wizard@latest mcp add. source

Is PostHog MCP free?

Connecting and calling tools is free, but LLM-backed tools may be billed as PostHog AI spend. source

Related guides

Sources and gaps

Not stated by the maintainers: Last release date; Full tool list not fetched; License of monorepo services/mcp (MIT from PostHog/mcp LICENSE).

More extensions to look at