PostHog MCP
PostHog's hosted MCP server for analytics, feature flags, experiments and error tracking
BestMCPTools
PostHog MCP
bestmcptools.org
Last verified: November 10, 2026
Maintenance status
ActiveOld PostHog/mcp repo archived January 19, 2026; source now in services/mcp of the PostHog monorepo. 2026 signal: PostHog changelog (posthog.com/changelog) entry dated October 15, 2026 says five tools landed in PostHog's MCP server that week. Commit dates for services/mcp were not readable (robots-blocked) on November 10, 2026.
How to Install PostHog MCP
$npx @posthog/wizard mcp addCompatible with: Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf, Zed.
Setup by client
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"posthog-mcp": {
"command": "npx",
"args": [
"@posthog/wizard",
"mcp",
"add"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"posthog-mcp": {
"command": "npx",
"args": [
"@posthog/wizard",
"mcp",
"add"
]
}
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"posthog-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"@posthog/wizard",
"mcp",
"add"
]
}
}
}Claude Code (terminal)
claude mcp add posthog-mcp -- npx @posthog/wizard mcp addAdd any API keys or environment variables the server's README lists.
About PostHog MCP
PostHog MCP is the Model Context Protocol server from PostHog, the product analytics company. It is a hosted endpoint at https://mcp.posthog.com/mcp that lets an MCP client work with your PostHog project: analytics queries, feature flags, experiments, error tracking, session replays, dashboards and more. PostHog's docs call it "a free, hosted endpoint". Sign-in uses OAuth (recommended) or a personal API key. If you remember the older PostHog/mcp repository, that one is archived and its code moved into the main PostHog repository.
Quick facts (as of November 10, 2026)
| PostHog MCP | |
|---|---|
| Maker | PostHog |
| Type | Hosted (remote) server; the docs do not describe a local or self-run option |
| Server URL | https://mcp.posthog.com/mcp |
| Quick install | npx @posthog/wizard mcp add |
| Auth | OAuth (recommended) or a personal API key sent as an Authorization: Bearer header |
| Regions | US or EU, chosen automatically from the account you sign in with |
| Documented clients | Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf, Zed (plus PostHog Desktop in the wizard) |
| Rate limit | 480 requests per minute and 4,800 per hour per credential |
| Price | Connecting and calling tools is free; some LLM-backed tools may be billed as PostHog AI spend |
| Source | services/mcp in the PostHog monorepo (the monorepo README says MIT, except the ee directory) |
Tools
The docs describe tool areas rather than a short fixed list. The MCP tools reference groups tools into many categories, and the main page highlights error tracking (top errors, stack traces, marking issues resolved, assignment rules), feature flags and experiments, analytics queries and HogQL/SQL, CDP destinations, support ticket triage, and governed metrics from the semantic layer. Real tool names from the tools reference include:
- SQL:
execute-sql - Insights and analytics:
insight-query,explain-chart; query wrappers such asquery-funnelandquery-trends - Feature flags:
feature-flag-get-all,create-feature-flag - Experiments:
experiment-list,experiment-results-get - Error tracking:
query-error-tracking-issues-list,error-tracking-issues-partial-update - Session replays:
query-session-recordings-list,session-recording-get - Dashboards:
dashboard-create,dashboards-get-all - Logs:
query-logs - Web analytics:
query-web-overview,query-web-stats - Docs:
docs-search
The reference lists many categories, including surveys, cohorts, persons, alerts, annotations, notebooks, workflows, data warehouse sources, data pipelines, billing, conversations (support tickets) and more. It does not state a total tool count, so we do not give one.
CLI mode and tools mode
According to the FAQ, CLI mode exposes a single exec tool that discovers and calls tools on demand, saving context. It is the default for most clients, including Claude, Claude Code and Codex. Tools mode registers every tool individually and is the default for Cursor. You can override the mode with the x-posthog-mcp-mode header or a mode query parameter.
Narrowing what the agent can do
The FAQ documents several controls: a read-only setting (x-posthog-read-only header or readonly=true) that hides tools that write or delete data; features and tools filters; and pinning to an organization or project, which removes the switch-organization and switch-project tools. There is also a posthog:posthog-setup prompt for framework-specific setup help (Next.js is currently supported).
Setup
PostHog Wizard (any supported client). The docs' quick install:
npx @posthog/wizard mcp add
The wizard installs the server into PostHog Desktop, Cursor, Claude Code, Claude Desktop, Codex, VS Code and Zed.
Claude Code. The Claude Code page gives a plugin install and a manual command:
claude plugin install posthog
claude mcp add --transport http posthog https://mcp.posthog.com/mcp -s user
With the plugin, run /mcp in Claude Code and follow the browser prompts to log in. With the manual command, Claude Code prompts you to log in on first use.
Other clients. The main docs page links manual setup pages for Claude Desktop, Codex, Cursor, VS Code, Windsurf and Zed. We did not read those pages individually, so check them for exact config.
API key fallback. For clients without OAuth, create a personal API key with the "MCP Server" preset and send it as an Authorization: Bearer header.
Limitations and things to watch
- Hosted only. The docs describe a hosted endpoint. Your queries go through PostHog's server to your PostHog project.
- Rate limits. 480 requests per minute and 4,800 per hour per credential, counting every request including opening a session and listing tools. Over the limit you get a
429with aRetry-Afterheader. AI-powered tools such as sentiment analysis and trace summarization have additional, lower limits. - One account per connection. Each connection has one active account, organization and project. Accounts in different regions need separate connections.
- AI data processing. Some tools are only exposed when AI data processing is enabled in your organization settings.
- Prompt injection. PostHog warns that "LLMs can be tricked into following untrusted commands, so always review MCP tool calls before executing them." Read-only mode, tool filters and project pinning exist to narrow what the agent can reach.
- Normal usage billing. The FAQ says standard PostHog usage and billing still apply to the data your queries consume.
Pros and cons
Pros
- Official server from the vendor, with a documented hosted URL and a one-line wizard install.
- Broad coverage: analytics, flags, experiments, error tracking, replays, logs and more.
- OAuth with automatic US or EU routing.
- Documented safety controls: read-only mode, feature and tool filters, project pinning.
- Free to connect and call tools, per PostHog.
Cons
- Requires a PostHog account, and a large tool surface may be more than a simple use case needs (CLI mode helps with context).
- Remote only per the docs; no self-run option is described.
- Per-credential rate limits.
- Some tools may incur PostHog AI spend.
Who it is for
A good fit if:
- You already use PostHog and want an assistant to query insights, check experiments, triage errors or manage flags from your editor or chat client.
- You want to pair product data with error context. For crash and exception monitoring in a separate product, see Sentry MCP.
Not the right tool if:
- You need infrastructure metrics and logs from another platform: look at Datadog MCP or Grafana MCP.
- You need a server that runs entirely on your own machine. The docs describe only the hosted endpoint.
What we could not verify
- Repository commit dates. We could not open the
services/mcpfolder (blocked to automated readers) and the monorepo page showed no commit dates or releases. The oldPostHog/mcprepo shows an archived notice (archived January 19, 2026) pointing toservices/mcp. For recent activity we relied on PostHog's changelog, which has 2026 entries about its MCP server, for example one dated October 15, 2026 saying five tools landed that week. The changelog does not name the hosted endpoint in those entries. - Exact tool count and per-client config. The tools reference does not give a total, and we did not read every client page.
- Behavior in practice. This page is based on documentation only.
- Pricing details. PostHog states the MCP is free to connect; we did not read the pricing page for usage rates.
How this page was put together
We read PostHog's MCP documentation, its MCP FAQ, the tools reference, the Claude Code setup page, the changelog, the PostHog monorepo README and the archived PostHog/mcp repository page on November 10, 2026, and compared the documented behavior. We did not run the server.
Sources
- PostHog MCP docs
- PostHog MCP FAQ
- PostHog MCP tools reference
- PostHog MCP for Claude Code
- PostHog monorepo
- PostHog changelog
- Archived PostHog/mcp repository
See also the Mixpanel MCP server for another hosted product analytics server.
Pricing
Free: from Free to connect and call tools (as of November 2026); standard PostHog usage billing applies
Our Take on PostHog MCP
An official, hosted server for people already on PostHog. Broad tool coverage with read-only and filtering controls, but remote only per the docs and subject to per-credential rate limits.
Alternatives to PostHog MCP
Query Datadog logs, metrics, traces and incidents from your AI tools
View Datadog MCP →Query dashboards, metrics, and alerts in Grafana from an AI agent
View Grafana MCP →Sentry's official MCP server for issues, traces, logs and Seer in your agent
View Sentry MCP →