
PostHog MCP servers: which one to use
Use PostHog's own hosted server. It is free to connect and has a read-only setting. Community servers are for API-key setups, including self-hosted PostHog.
- Servers
- 5
- active
- Official
- 1
- by PostHog
- Hosted
- 2
- nothing to install
- Local
- 3
- runs on your machine
- OAuth
- 1
- sign in, no key
PostHog hosts its own MCP server, and connecting to it is free. It lets Claude Code, Claude Desktop, Cursor and other clients run queries, manage feature flags and experiments, and look into errors. You sign in with OAuth, or with a personal API key if your client cannot. The older PostHog/mcp repository is archived, and the server now lives in the main PostHog repository. The community servers are small projects with few stars, so start with the official one.
Good for
- Product teams who want Claude or Cursor to answer analytics questions with PostHog data
- Engineers who triage errors and manage feature flags from their editor
- Teams that need a read-only connection first
- Self-hosted PostHog users who need an API-key server
Which PostHog MCP server to use
Use the official PostHog server, and turn on its read-only setting if the assistant should only look. Pick the arvoretech or johnnikolo server if you run self-hosted PostHog.
| Server | Runs | Sign-in | Can change data | Tools | GitHub stars |
|---|---|---|---|---|---|
| For PostHog | |||||
| PostHog MCP ServerThis page | Hosted | Account | Yes | – | – |
| Other tools for the same job | |||||
| arvoretech posthog-mcp | Local | API key | Yes | – | – |
| Metta-AI posthog-code-mode | Local | API key | – | 1 | 1 |
| johnnikolo posthog-mcp | Local | API key | No | 5 | 0 |
All PostHog MCP servers
5 active · 1 official · official first, then by GitHub stars
PostHog MCP ServerOfficialHostedOAuthOfficial PostHog MCP Server for product analytics, feature flags, experiments, and more.
- prime-agent-posthog-mcp
Official PostHog MCP integration for Prime Agent: talks to PostHog's own MCP server (mcp.posthog.com) with a project-scoped personal API key, giving the agent analytics, funnels, path/user-flow analysis, trends, dashboards, and session replay out of the box (MIT).
2 GitHub stars - PosthogHosted or Local
PostHog MCP — wraps PostHog Analytics API (app.posthog.com/api)
0 GitHub stars
posthog-mcpLocalQuery PostHog: profile, projects, insights.
793/wk downloads a week- mcparmory-posthogLocal
Capture analytics events, evaluate feature flags, and manage projects
Questions
Is there an official PostHog MCP server?
Yes. PostHog hosts it at https://mcp.posthog.com/mcp. When you sign in, PostHog sends you to the right data region, US or EU, for your account.
Is the PostHog MCP server free?
Connecting to it and calling its tools is free. Normal PostHog usage billing still applies to the data your queries read. Some tools use an LLM inside PostHog, can count as PostHog AI spend, and only appear when AI data processing is on for your organization.
Does it work in Claude and Cursor?
Yes. PostHog documents setup for Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf and Zed. The PostHog Wizard in the install box adds it to most of them in one step.
How do I make it read-only?
Add readonly=true to the server address, or send the header x-posthog-read-only: true. PostHog then removes every tool that creates, updates or deletes data.
Can it change or delete things in PostHog?
Yes. The official server can read and write across PostHog, including feature flags and experiments. PostHog warns that prompt injection can trick an assistant, so review tool calls, use read-only mode, or limit the session to certain tools or one project.
Do I need an API key?
No. PostHog recommends OAuth, which works out of the box with the Wizard. If your client cannot do OAuth, create a personal API key with the MCP Server preset. The arvoretech, Metta-AI and johnnikolo servers each need a personal API key.
Does it work with self-hosted PostHog?
The arvoretech and johnnikolo servers do. Both READMEs describe a personal API key plus a base URL setting (POSTHOG_BASE_URL for arvoretech, POSTHOG_HOST for johnnikolo), and arvoretech says it works with PostHog Cloud and self-hosted installs. PostHog's hosted server routes you to the US or EU cloud region of your account.
What are the rate limits?
The official server allows 480 requests per minute and 4,800 per hour for each credential. Opening a session and listing tools count as requests too, and a request over the limit gets a 429 with a Retry-After header.
Why would I use the code-mode server instead?
Its README says it replaces the official server's many tool definitions with a single tool that runs JavaScript against PostHog in a sandbox, to save context. It has one star and needs a personal API key.