What it is
The official PostHog MCP server: a Cloudflare Workers bridge that gives an agent
type-safe access to a PostHog project. It runs analytics SQL through the query
endpoint, reads event and property definitions, lists and inspects errors, and
performs full CRUD on feature flags, insights, dashboards, experiments, and
surveys. It is the tool behind the weekly /traffic-monday pull on this repo.
How it was vetted
Read at commit 13aaf2c and exercised live over the connected MCP against a real
PostHog project (509256), using the read and query tools that back the traffic
pull. The trust question for an analytics tool that can also write is one thing.
Can the agent change or delete production objects when you only meant to let it
read? So the audit centered on the write surface and the key that gates it.
- 26 of 44 tools are read-only; 18 are not, and 5 hard-delete. Counted from
the server’s own
schema/tool-definitions.json, where every tool carries areadOnlyHintand arequired_scopeslist. The five deletes remove feature flags, insights, dashboards, experiments, and surveys. - Scopes are declared per tool and enforced by PostHog, not by the MCP. Auth
is a Bearer personal API key (
api/fetcher.ts). PostHog personal keys are scope-selectable, and the write tools requirefeature_flag:write,insight:write,dashboard:write,experiment:write, orsurvey:write. A key minted with only the:readscopes you need cannot call any of them. This is the safe posture, and it is not the default. Nothing forces you to scope down at install time. - Hosted by default. The wizard wires the remote worker at
https://mcp.posthog.com/mcp; your key and results pass through it. The base is configurable (POSTHOG_BASE_URL) and the worker is open-source and self-hostable if the hosted path is a problem for you. - Two secondary egress paths.
documentation/searchDocsposts your query toapi.inkeep.com(third-party docs search), and the server emits its ownmcp tool call/mcp tool responsetelemetry to PostHog via theposthog-nodedependency. Neither touches your filesystem; there is no other outbound traffic in the source. - It is not a light install. The full tool set carries about 16,000 tokens of definitions (roughly 2,100 for the names and descriptions and 14,000 for the input schemas), paid on every turn whether you call a tool or not. Enable only the feature groups you use if your client supports it.