PlugWiki
PostHog MCP Server logo

PostHog MCP, PostHog's official MCP server

Official · by PostHogRemote
Gethttps://mcp.posthog.com/mcpposthog/posthogDocs

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.

Install PostHog MCP

Claude Code

  1. 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. 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

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-onlyAdd ?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 tomcp.posthog.com. mcp-eu.posthog.com
Sign-in and keysSign in with your PostHog account in the browser. Clients without sign-in use a personal API key in the config.
Data retentionNo 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.

ServerOfficialRunsSign-inCan change thingsGitHub stars
For PostHog
PostHog MCP ServerThis pageOfficialHostedLocalAccountYes–
Other tools for the same job
LaunchDarkly MCP serverOfficialLocal––27
Statsig MCPFor StatsigOfficialHosted–––
Sentry MCPFor SentryOfficialHostedLocalAccount–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

1 more quote

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

    Source
  • Triage the week's top errors

    What are the top 5 errors in my project this week and how many users are affected?

    Source
  • Check which flags are live

    What feature flags do I have active?

    Source
  • Track LLM spend

    Show me my LLM costs this week

    Source
  • See 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 17
  1. PostHog MCP server · posthog.com
  2. posthog.com · posthog.com
  3. PostHog Wizard · github.com
  4. posthog.com · posthog.com
  5. github.com · github.com
  6. github.com · github.com
  7. osv.dev · osv.dev
  8. posthog.com · posthog.com
  9. posthog.com · posthog.com
  10. github.com · github.com
  11. github.com · github.com
  12. github.com · github.com
  13. github.com · github.com
  14. news.ycombinator.com · news.ycombinator.com
  15. news.ycombinator.com · news.ycombinator.com
  16. github.com · github.com
  17. mcp.sentry.dev · mcp.sentry.dev

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.