Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Analytics - official PostHog server

PostHog MCP server

Free hosted MCP server that lets AI agents read and write across PostHog products, including feature flags, experiments, error tracking, product analytics queries, SQL, logs, surveys and CDP destinations. PostHog hosts it at https://mcp.posthog.com/mcp with OAuth or API key auth.

Last verified 15 tools9 sources

Install

Terminal
claude mcp add --transport http posthog https://mcp.posthog.com/mcp -s user
Terminal
codex mcp add posthog --url https://mcp.posthog.com/mcp
JSON
{
  "mcpServers": {
    "posthog": {
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

VS Code

JSON
{
  "servers": {
    "posthog": {
      "type": "http",
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

Tools

execute-sql
Execute an SQL query.
query-trends
Run a trends query.
query-funnel
Run a funnel query.
insight-query
Run a saved insight's query and return results.
insights-list
Get all insights.
read-data-schema
Explore the user's events, actions, properties, and property values.
feature-flag-get-all
Get all feature flags.
create-feature-flag
Create feature flag.
experiment-create
Create experiment.
error-tracking-issues-partial-update
Update error tracking issue.
query-logs
Query logs.
dashboard-create
Create dashboard.
surveys-get-all
List surveys in the project (server-side search + filters).
switch-project
Switch the active PostHog project for subsequent tool calls.
docs-search
Search documentation.

As documented on October 17, 2026. A running server reports its current list through tools/list.

Notes and caveats

  • OAuth is the recommended path; the auth server routes to the US or EU region automatically.
  • If a client lacks OAuth, a personal API key with the MCP Server preset can be sent as Authorization: Bearer.
  • The fastest documented install is the PostHog Wizard (npx @posthog/wizard mcp add), which supports Claude Code, Cursor, Codex, VS Code, Zed and others; PostHog also ships Claude Code, Codex and Cursor plugins.
  • Connecting is free, but some tools use LLMs internally, are billed as PostHog AI spend, and require AI data processing to be enabled.
  • The tools page lists hundreds of tools across ~70 categories and documents an exec CLI mode that exposes them through a single tool; a tools query parameter scopes a session to a subset.
  • The official registry entry also lists an SSE endpoint at https://mcp.posthog.com/sse, which the docs pages do not mention.
  • Source lives in the PostHog monorepo (MIT Expat outside ee/; services/mcp package.json declares MIT); no separate MCP releases are published.

FAQ

What does the PostHog MCP server do?

Free hosted MCP server that lets AI agents read and write across PostHog products, including feature flags, experiments, error tracking, product analytics queries, SQL, logs, surveys and CDP destinations. The vendor documents 15 tools, including execute-sql, query-trends, query-funnel and insight-query.

How do I add the PostHog MCP server to Claude Code?

Run claude mcp add --transport http posthog https://mcp.posthog.com/mcp -s user, copied from PostHog's docs. This page also has snippets for Codex, Cursor and VS Code.

Does the PostHog MCP server need authentication?

Yes, OAuth or API key. Transport: Streamable HTTP. Status: GA, last checked October 17, 2026.

Sources

Last verified against 9 PostHog pages, then re-checked independently.

Newsletter

New MCP servers, the week they ship

One email per week. New official MCP servers, the coding tools that support them and how developers wire them up.