MCP Directory

How to add PostHog MCP Server (Official Remote) to Claude Desktop

Official PostHog server: product analytics, feature flags, experiments, error tracking and SQL. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 15, 2026 ยท 350โ˜… ยท stdio ยท apikey ยท official

Claude Desktop config for PostHog MCP Server (Official Remote)

npx @posthog/wizard@latest mcp add
{
  "mcpServers": {
    "posthog-mcp-server-official-remote": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://mcp.posthog.com/mcp",
        "--header",
        "Authorization:${POSTHOG_AUTH_HEADER}"
      ],
      "env": {
        "POSTHOG_AUTH_HEADER": "Bearer <your-personal-api-key>"
      }
    }
  }
}

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the PostHog MCP Server (Official Remote) config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm PostHog MCP Server (Official Remote)'s tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • A PostHog account (PostHog Cloud US or EU)
  • A PostHog personal API key, created under Settings โ†’ Personal API keys; the key is passed as a Bearer token in the POSTHOG_AUTH_HEADER
  • An MCP-compatible client (Claude Desktop/Code, Cursor, VS Code, Windsurf, Zed, etc.)
  • Node.js (for the npx wizard installer) when using local stdio setup; the remote server needs no local runtime
  • Optional: AI data processing enabled in PostHog for LLM-powered tools (e.g. natural-language SQL)

What PostHog MCP Server (Official Remote) can do in Claude Desktop

feature-flag-get-all

List all feature flags in the project, with create/update/delete and status tools

create-feature-flag

Create a new feature flag, including rollout and targeting conditions

insight-query

Run an insight/trend query and return product-analytics results

execute-sql

Run a HogQL/SQL query against PostHog event and warehouse data

dashboard-create

Create dashboards and add insight tiles (with get/update/delete tools)

experiment-create

Create A/B experiments; launch, pause, end, and read results

experiment-results-get

Fetch statistical results and timeseries for a running experiment

query-error-tracking-issues-list

List error-tracking issues; fetch issue details, events, and merge/triage

Security

The personal API key is sent as a Bearer token and can read analytics, feature flags, and error data; scope it tightly and rotate it if exposed. The connection goes out to PostHog Cloud, so confirm you log in with the correct US/EU region account to keep data in-region.

PostHog MCP Server (Official Remote) + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the PostHog MCP Server (Official Remote) config there under the "mcpServers" key and restart the client.

Is PostHog MCP Server (Official Remote) safe to use with Claude Desktop?

The personal API key is sent as a Bearer token and can read analytics, feature flags, and error data; scope it tightly and rotate it if exposed. The connection goes out to PostHog Cloud, so confirm you log in with the correct US/EU region account to keep data in-region.

Is this the official PostHog MCP server?

Yes. It is built and maintained by PostHog. The standalone PostHog/mcp repo was archived in January 2026 and the code now lives in the PostHog monorepo, but it is still the official, supported server.

Do I need to run anything locally?

No. The recommended setup is the hosted remote server at https://mcp.posthog.com/mcp. The npx wizard just writes the config into your client; the remote endpoint handles execution and region routing.

How do I authenticate?

Create a PostHog personal API key and pass it as a Bearer token in the POSTHOG_AUTH_HEADER. The wizard sets this up for you.

View repo Full PostHog MCP Server (Official Remote) page