
PostHog MCP, PostHog's official MCP server
Lets your AI assistant query your PostHog analytics, check and change feature flags, and triage errors.
This is PostHog's own server. It lets Claude, Cursor, ChatGPT and other assistants query your analytics, check and change feature flags, triage errors and read experiments. By default it can create and delete things, including rolling a feature flag out to everyone, so turn on read-only mode unless you want that. It works with PostHog Cloud, and for self-hosted PostHog you run the local server yourself.
Good for
- Product teams who want answers from their analytics in plain language
- Developers who want to check or change feature flags without opening the dashboard
- Engineers triaging the week's top errors and how many users they hit
- Teams adding PostHog to a new app and checking that events arrive
Works in
5 supported · 3 with issues · 6 should work
Tap an app to see how to set it up and any known problems.
Documented by PostHog. Add the address to mcp.json or install the plugin from the Cursor Marketplace. posthog.com
Documented by PostHog. Add an http server entry to mcp.json, then sign in from Copilot chat. posthog.com
Documented by PostHog, through the mcp-remote helper. posthog.com
Documented by PostHog. Codex handles the sign-in for you. posthog.com
Documented by PostHog. Add the address under context_servers in settings.json. posthog.com
Documented by PostHog. You cannot approve reads without also approving writes.
Known problems
- Open
Can't auto-approve reads without also auto-approving writes, since everything goes through one exec tool
Workaround: Add a second connection with ?readonly=true and always-allow that one.
Since Sep 2026 · GitHub
Documented by PostHog. Sign-in expires after about a day.
Not in PostHog's docs. Answers work as text, but charts fail to render.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Install PostHog MCP
Claude Code
- 1
Copy this prompt.
Add the PostHog MCP server to Claude Code. Run this command: claude mcp add --transport http posthog https://mcp.posthog.com/mcp -s user Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires PostHog account.
Read-only mode: Want it to only read? Add ?readonly=true to the end of the server address: https://mcp.posthog.com/mcp?readonly=true. Tools that create, update or delete are then removed from the list.
Sign in with your PostHog account when you first use it; no API key is needed. Sign-in normally routes you to US or EU Cloud on its own. If it lands on the wrong region, EU users should use https://mcp-eu.posthog.com/mcp instead. One connection is one account, one organization and one project; pin it with ?project_id= or ?organization_id= on the address. Limit tools with ?features=flags,dashboards,insights. For a client without OAuth, send a personal API key created with the MCP Server preset as the header Authorization: Bearer <key>. Run /mcp if the sign-in does not start on first use. The plugin bundles the same server and adds slash commands such as /posthog:flags.
From the vendor's docs. Source.
Tools
We don't list PostHog MCP's tools here yet. After you connect it, ask your assistant "What can you do with PostHog MCP?" to see them.
Pros and cons
Good
- Made and run by PostHog.
- Sign in with your PostHog account, with no key to copy.
- Covers analytics, feature flags, experiments, errors, SQL and surveys.
- Read-only mode removes every tool that creates, updates or deletes.
- Free to connect and use.
- Works with Claude, Cursor, Codex, VS Code, Windsurf and Zed.
Watch out
- By default it can delete data and roll flags out to everyone.
- Sign-in expires after about a day in Claude Desktop.
- One approval covers reads and deletes in the default mode.
- Self-hosted PostHog needs you to run the server yourself.
- Charts fail to render in ChatGPT.
- Limited to 480 requests per minute and 4,800 per hour.
Permissions
high risk · 6 things to watch
High risk
By default the assistant can read, change and delete things in your PostHog project, including rolling feature flags out to every user. Turn on read-only mode and pin it to one project unless you want it to make changes.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
Can roll feature flags out to everyone
By default the agent can create, delete, enable, disable and roll out feature flags, which changes what real users see. Use read-only mode unless you want this. posthog.com
One approval covers reads and deletes
In the default mode every call goes through a single tool marked destructive, so client approval rules cannot allow reads while asking about writes. Add a second connection with read-only mode and always-allow only that one. github.com
API keys sit in plain config files
Clients without sign-in need a personal API key in the config. Prefer sign-in, or create the key with the MCP Server preset so it reaches one project. posthog.com
Old wizard release 1.18.1 is flagged as malicious
OSV lists @posthog/wizard 1.18.1 (Nov 24, 2025) as malicious. PostHog's post-mortem does not name the wizard but says releases after the attack are known-good, so run it with @latest. osv.dev
PostHog warns about prompt injection
An agent can be tricked into following untrusted instructions. PostHog advises reviewing tool calls before they run. posthog.com
Your data stays in your PostHog region
The server does not store analytics data. It runs in PostHog's US and EU clusters and keeps short-lived session state in the region you connect to. github.com
Security advisories
No published security advisories for the MCP server as of Nov 1, 2026.
1 other advisory is about the wider posthog project, not this MCP server. See them on GitHub
Technical details
| Turning on read-only | Add ?readonly=true to the URL (https://mcp.posthog.com/mcp?readonly=true) or send the header x-posthog-read-only: true. Create, update and delete tools are then removed. Pinning to one project and ?features= filtering narrow it further. |
|---|---|
| Talks to | mcp.posthog.com. mcp-eu.posthog.com |
| Sign-in and keys | Sign in with your PostHog account in the browser. Clients without sign-in use a personal API key in the config. |
| Data retention | No analytics data is stored on the server; only short-lived session state such as the active project. |
Alternatives
Use PostHog's server if your analytics, flags and errors already live in PostHog. Pick LaunchDarkly or Statsig for flags held there, and Sentry for errors held in Sentry.
| Server | Official | Runs | Sign-in | Can change things | GitHub stars |
|---|---|---|---|---|---|
| For PostHog | |||||
| PostHog MCP ServerThis page | Official | HostedLocal | Account | Yes | – |
| Other tools for the same job | |||||
| LaunchDarkly MCP server | Official | Local | – | – | 27 |
| Statsig MCPFor Statsig | Official | Hosted | – | – | – |
| Sentry MCPFor Sentry | Official | HostedLocal | Account | – | 952 |
What people say
People say it speeds up onboarding and routine changes, and complain that sign-ins expire and approval rules cannot separate reads from deletes.
What people like
- Helped with onboarding: checking the integration, setting up dashboards and debugging an event that was not tracked.
- Easier than finding things in the PostHog UI, since you ask Claude to make the change.
Common complaints
- Working only through the assistant means you stop visiting the app and miss new PostHog features.
- The sign-in expires after about a day, forcing a new login and a new Claude session mid-analysis.
- Approval rules in clients cannot tell a read from a delete, since calls go through one tool.
- In ChatGPT, text answers work but charts fail to render.
In their words
“I recently set up Posthog in production on 3 apps and Posthog's MCP and integrated AI chat were very helpful for onboarding (verifying integrations, setting up and recommending dashboards, debugging an event not being tracked properly, etc).”dmixHacker NewsJul 2026
“Last time I used PH, I found myself not finding the things I needed so ended up connecting the mcp and asking claude to change things for me. MCP was a nice addition, so thanks for that. The problem of mcp is that it prevents product discoverability.”heyheyhouhouGitHub issueApr 2026
“Day-to-day session timeouts are annoying. As a user, if I spread research across a couple of days, the connection is broken when I come back. I have to re-authenticate the MCP and start a new Claude session.”cvolzer3GitHub issueSep 2026
“PostHog authentication and text-based MCP tool calls work correctly; only the embedded MCP UI fails.”TheCodby
Questions
What is the PostHog MCP server URL?
The hosted address is https://mcp.posthog.com/mcp. Add ?readonly=true to it for read-only mode.
Is the PostHog MCP server free?
Yes. Connecting and calling its tools costs nothing. Your normal PostHog usage billing still applies to the data queries read, and a few AI-powered tools count as PostHog AI spend.
Does it work with PostHog EU Cloud?
Yes. PostHog's docs say sign-in routes you to US or EU automatically. If sign-in lands on the wrong region, use mcp-eu.posthog.com instead of mcp.posthog.com.
Can I use it with self-hosted PostHog?
Not through the hosted address, which only reaches PostHog Cloud US and EU. Run the local server from the PostHog repo yourself and point it at your own PostHog address.
Can the agent change my feature flags?
Yes. It can create, delete, enable, disable, archive and roll out flags, including rolling a flag out to everyone. Turn on read-only mode if you only want it to look.
How do I make it read-only?
Add ?readonly=true to the end of the server address. Tools that create, update or delete data are then dropped from the list.
Do I need an API key?
No. Sign-in with your PostHog account is the recommended way. If your client cannot sign in, create a personal API key with the MCP Server preset and send it as a bearer token.
Are there rate limits?
Yes: 480 requests per minute and 4,800 per hour per sign-in or key. Opening a session and listing tools count too, and going over returns a 429 error.
Can I connect more than one project or account?
Yes. Add one connection per account or project and pin each one to a project. An account in each region needs two connections.
Why does my client show a single exec tool?
Most clients use a mode where one tool finds and calls PostHog tools on demand, which saves context. Add ?mode=tools to the address to list every tool.
Examples
Create a feature flag with a partial rollout
Create a feature flag called 'new-checkout-flow' that's enabled for 20% of users, and show me the configuration
SourceTriage the week's top errors
What are the top 5 errors in my project this week and how many users are affected?
SourceCheck which flags are live
What feature flags do I have active?
SourceTrack LLM spend
Show me my LLM costs this week
SourceSee what is being tracked
What events are being tracked?
Source
Information
updated Nov 2, 2026
- Publisher
- PostHog (official)
- Endpoint
https://mcp.posthog.com/mcp- Transport
- Streamable HTTP, SSE
- Auth
- OAuth
- Version
- 1.0.1
- License
- MIT
- Last commit
- Oct 31, 2026
- Open issues
- 3,869
- Listed in
- Official MCP registry
WebsiteDocsGitHubOfficial MCP RegistryPostHog Wizard (mcp add)ChangelogIssuesPrivacy policySupport
Other PostHog MCP servers
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 17Hide
- PostHog MCP server · posthog.com
- posthog.com · posthog.com
- PostHog Wizard · github.com
- posthog.com · posthog.com
- github.com · github.com
- github.com · github.com
- osv.dev · osv.dev
- posthog.com · posthog.com
- posthog.com · posthog.com
- github.com · github.com
- github.com · github.com
- github.com · github.com
- github.com · github.com
- news.ycombinator.com · news.ycombinator.com
- news.ycombinator.com · news.ycombinator.com
- github.com · github.com
- mcp.sentry.dev · mcp.sentry.dev