MCP ServerOfficialHTTP

PostHog MCP Server

PostHog runs an official remote MCP server, so there is nothing to install — point your client at the endpoint, authorise in the browser, and an agent can query analytics in HogQL, read insights and dashboards, manage feature flags, and dig through error tracking and session data.

Hosted URL

https://mcp.posthog.com/mcp

Suggested model

Claude Sonnet 4.5

Chat with 60+ AI models on the same workflow — switch to a different model mid-conversation and re-run the same prompt, or use Compare mode to put several side-by-side and balance quality vs. cost.

Auth

OAuth — your client opens a browser on first connection and reuses the credentials after. EU Cloud projects use https://mcp-eu.posthog.com/mcp instead.

What the PostHog MCP server does

How models use it and what it is built for.

The server covers most of what a product team does inside PostHog. Analytics is the core: an agent can run HogQL — PostHog’s SQL dialect over the event schema — or ask for an insight to be generated from a natural-language description, then read the result. It can list and create dashboards and insights, so an exploration that proves useful can be saved rather than repeated. Feature flags are fully managed: list them, read their definitions and rollout conditions, create new ones and update existing ones, which is what makes this practical for shipping rather than only reporting. Error tracking exposes recent errors and their details, experiments and surveys are reachable, and a documentation search tool answers questions about PostHog itself. Authentication is OAuth — the first connection opens a browser and the credentials are reused afterwards — and PostHog runs the server in both US and EU regions, so EU Cloud data stays in the EU.

Tools the PostHog MCP server exposes

Typical tools an AI model can call. Exact names vary by version.

  • query-run — execute HogQL against your event data
  • get-sql-insight — turn a natural-language question into a query and run it
  • insights and dashboards — list, read and create saved analytics
  • feature flags — list, read, create and update flags and their rollout conditions
  • error tracking — list recent errors and inspect the details of one
  • experiments and surveys — read and manage running experiments and surveys
  • docs-search — search PostHog documentation from inside the conversation

Example prompts to try

Copy any of these into MCP Agent Studio after connecting.

  • What is the signup-to-activation conversion rate this month versus last?

  • Which errors started appearing after the release on Tuesday?

  • Create a feature flag for the new checkout, rolled out to 5% of users.

  • Write a HogQL query for weekly retention by acquisition channel and run it.

Models on MCP Playground

This is not a single-model product: you get the same MCP connection with 60+ models (Claude, GPT, Gemini, DeepSeek, open-weight, and more), you can switch mid-conversation, and you can open Compare mode to run the same prompt against multiple models at once. The card above is a suggested starting point for this server — not the only choice.

Default pick for PostHog

Claude Sonnet 4.5

HogQL is SQL with PostHog-specific event semantics. Sonnet 4.5 gets the event and person joins right, where weaker models quietly produce a plausible wrong number.

Check an AI agent can actually use the PostHog MCP server

Listing tools proves the server is reachable, not that a model can work with it. Evals go further: they read every tool on the server, write a test suite from its real schemas, and run it — code decides pass/fail on the responses (schema conformance, error codes, pagination, result caps) while a scoring model grades plain-English tasks driven through the tools.

Get a pass/fail report per tool with the evidence behind each verdict — and replay the same suite after every schema change. Destructive tools are excluded from the run.

Run evals

Try the PostHog MCP server in your browser

Open MCP Agent Studio with the connection pre-filled. Add your token, pick any of 60+ models, and start chatting — no install required.

Open Agent Studio

PostHog MCP server — FAQ

Common questions about connecting, scoping and using it safely.

What is the PostHog MCP server?

It is PostHog’s official remote MCP server, hosted at mcp.posthog.com. It gives an AI assistant access to analytics and HogQL, dashboards and insights, feature flags, experiments, surveys, session replay and error tracking, with no local install.

How do I authenticate?

OAuth. The first time your client connects it opens a browser window to sign in and authorise access, then reuses those credentials on later sessions. You never paste a personal API key into a config file.

Is there an EU endpoint?

Yes. PostHog runs the MCP server in both US and EU regions — EU Cloud projects connect to mcp-eu.posthog.com instead of mcp.posthog.com, so the data does not leave the region.

Can an agent actually change feature flags?

Yes, that is one of the reasons to use it — create and update are both available. Treat that accordingly: a flag change is a production change. Review what the agent proposes before approving it, especially on rollout percentages.

What is HogQL?

PostHog’s SQL dialect over your event and person data, based on ClickHouse SQL. The MCP server can run it directly, which is how an agent answers questions that no pre-built insight covers.

Other MCP servers

More on MCP Playground

PostHog MCP Server — Product Analytics and Flags for AI Agents