Direct answer
PostHog MCP is a free hosted server that lets a coding agent read and write across PostHog: analytics and SQL, dashboards, feature flags, experiments, surveys, session replay and error tracking. It runs over the remote URL https://mcp.posthog.com/mcp, needs PostHog OAuth or a personal API key, and shows one exec tool by default in Claude Code and Codex, which reaches a catalog of 1,234 tool definitions.

What PostHog MCP does
PostHog MCP is a free hosted server that lets a coding agent read and write across PostHog: analytics and SQL, dashboards, feature flags, experiments, surveys, session replay and error tracking. An agent can create a feature flag, query trends or pull a stack trace from a prompt.
PostHog maintains it. It is licensed under MIT.
How a coding agent uses PostHog MCP
The agent asks, PostHog MCP acts, and the result comes back into the session.

- The agent asks: Put this feature behind a flag
- PostHog MCP acts: Creates the feature flag in your PostHog project
- The result comes back: The flag, then error-tracking issues after release
Install PostHog MCP in Claude Code
claude mcp add --transport http posthog https://mcp.posthog.com/mcp -s userInstall PostHog MCP in Cursor
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp"
}
}
}Install PostHog MCP in VS Code
{
"servers": {
"posthog": {
"type": "http",
"url": "https://mcp.posthog.com/mcp"
}
}
}Install PostHog MCP in Codex
codex mcp add posthog --url https://mcp.posthog.com/mcpThe default exec tool and examples from PostHog's 1,234 tool definitions
PostHog MCP's own documentation lists these, read on November 12, 2026.
- exec: the one tool Claude Code and Codex see in the default cli mode, which runs any PostHog command
- render-ui: added on clients that support MCP apps
- Tools mode (Cursor's default): one MCP tool per PostHog tool, for example create-feature-flag, query-trends, experiment-create, query-error-tracking-issues-list, dashboard-get, feature-flag-get-all, execute-sql, switch-organization, switch-project
Settings worth knowing in PostHog MCP
| Setting | What it changes | Server |
|---|---|---|
?features=flags,dashboards,insights | What it changes Limits tools to feature categories. | Server PostHog MCP |
?tools=dashboard-get,feature-flag-get-all,execute-sql | What it changes Allowlists tools by name, in union with features. | Server PostHog MCP |
?mode=cli or ?mode=tools (header x-posthog-mcp-mode) | What it changes Picks one exec tool or one MCP tool per PostHog tool. | Server PostHog MCP |
?readonly=true (header x-posthog-read-only) | What it changes Hides tools that create, update or delete. | Server PostHog MCP |
x-posthog-organization-id and x-posthog-project-id | What it changes Pin the session to one organization and project and remove the switch tools. | Server PostHog MCP |
Sign-in, limits and caveats for PostHog MCP
Sign-in: OAuth (recommended), routed to your US or EU region by the account you sign in with. Or a personal API key created with the 'MCP Server' preset, sent as Authorization: Bearer <key>.
Limits and price: Connecting and calling tools is free; standard PostHog usage billing applies, and some LLM-backed tools bill as PostHog AI spend and need AI data processing enabled. The limit is 480 requests per minute and 4,800 per hour per credential, with a 429 and Retry-After over it; PostHog API limits can apply on top. Enterprise-managed authorization (ID-JAG) needs the Scale or Enterprise platform add-on.
- PostHog warns about prompt injection and says to review tool calls before running them.
- One connection is one account and one active project; use a separate entry per account or region.
- Claude web and desktop silently drop exec when its inputSchema reaches 16,384 characters.
- The catalog holds 56 hand-written and 1,178 generated tool definitions; 415 depend on a feature flag, so a given account sees fewer.
- The npm package @posthog/mcp is a different product, an SDK that tracks MCP tool usage.
Use PostHog MCP for interface work
A coding agent shipping a feature can put it behind a flag with create-feature-flag, set up an A/B test with experiment-create, and check errors after release with query-error-tracking-issues-list.
Steal this workflow
Run this guide in your own assistant. The prompt carries the guide link and the workflow summary, so the assistant can adapt it to your project.
Read the guide "PostHog MCP: install, tools and limits" at https://better-design.com/blog/posthog-mcp and help me apply it to my project.
PostHog MCP is a free hosted server that lets a coding agent read and write across PostHog: analytics and SQL, dashboards, feature flags, experiments, surveys, session replay and error tracking. It runs over the remote URL https://mcp.posthog.com/mcp, needs PostHog OAuth or a personal API key, and shows one exec tool by default in Claude Code and Codex, which reaches a catalog of 1,234 tool definitions.
Start by asking what I am building and which tools I use. Then walk me through the workflow step by step, adapted to my answers.Claude and ChatGPT open with the prompt filled in. Gemini copies the prompt to your clipboard first, so paste it when the app opens.
Questions
What does PostHog MCP do?
PostHog MCP is a free hosted server that lets a coding agent read and write across PostHog: analytics and SQL, dashboards, feature flags, experiments, surveys, session replay and error tracking. An agent can create a feature flag, query trends or pull a stack trace from a prompt.
Does PostHog MCP need an API key or sign-in?
OAuth (recommended), routed to your US or EU region by the account you sign in with. Or a personal API key created with the 'MCP Server' preset, sent as Authorization: Bearer <key>.
Is PostHog MCP free?
Connecting and calling tools is free; standard PostHog usage billing applies, and some LLM-backed tools bill as PostHog AI spend and need AI data processing enabled. The limit is 480 requests per minute and 4,800 per hour per credential, with a 429 and Retry-After over it; PostHog API limits can apply on top. Enterprise-managed authorization (ID-JAG) needs the Scale or Enterprise platform add-on.
Which coding agents can use PostHog MCP?
Its documentation shows a setup for Claude Code, Cursor, VS Code, Codex. Any client that speaks MCP over the remote URL https://mcp.posthog.com/mcp can connect.
Where these PostHog MCP facts come from
Each fact on this page comes from PostHog MCP's own repository, documentation or package registry, read on November 12, 2026.
- PostHog (GitHub): github.com/PostHog/posthog/blob/master/services/mcp/README.md
- PostHog (GitHub): github.com/PostHog/mcp
- PostHog (GitHub): github.com/PostHog/posthog/tree/master/services/mcp/schema
- PostHog (GitHub): github.com/PostHog/posthog/blob/master/services/mcp/package.json
- PostHog: posthog.com/docs/model-context-protocol
- PostHog: posthog.com/docs/model-context-protocol/claude-code
- PostHog: posthog.com/docs/model-context-protocol/codex
- PostHog: posthog.com/docs/model-context-protocol/cursor
- PostHog: posthog.com/docs/model-context-protocol/vscode
- PostHog: posthog.com/docs/model-context-protocol/faq
- npm: www.npmjs.com/package/@posthog/wizard
- npm: www.npmjs.com/package/@posthog/mcp
Related
Add design rules next to it
PostHog MCP gives the agent its capabilities. It does not tell the agent what a good screen looks like. Better Design adds that part: a design system, interface principles and review rules that the agent calls while it builds.