
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
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the PostHog MCP Server (Official Remote) config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 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-allList all feature flags in the project, with create/update/delete and status tools
create-feature-flagCreate a new feature flag, including rollout and targeting conditions
insight-queryRun an insight/trend query and return product-analytics results
execute-sqlRun a HogQL/SQL query against PostHog event and warehouse data
dashboard-createCreate dashboards and add insight tiles (with get/update/delete tools)
experiment-createCreate A/B experiments; launch, pause, end, and read results
experiment-results-getFetch statistical results and timeseries for a running experiment
query-error-tracking-issues-listList 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.