PostHog MCP Server
MCP server by PostHog Community
PostHog MCP Server gives AI assistants access to PostHog product data, including analytics, errors, session replays and feature flags. It is for product teams and developers who want agents to query and act on that data.
Install PostHog MCP Server
Built from the published package, never by AI.
claude mcp add --transport http posthog-mcp-server https://mcp.posthog.com/mcp --header "Authorization: Bearer YOUR_API_KEY"Run in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"posthog-mcp-server": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"posthog-mcp-server": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"posthog-mcp-server": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
{
"mcpServers": {
"posthog-mcp-server": {
"serverUrl": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
https://mcp.posthog.com/mcpIn ChatGPT: Settings, Connectors, Add custom connector, then paste this URL. Works in any client that supports remote servers.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the posthog-mcp-server block.
About
The PostHog MCP Server is a remote MCP server at https://mcp.posthog.com/mcp. It connects AI assistants to a PostHog project, which stores analytics, errors, session replays, logs and business data. According to the source, the server routes to the correct data region (US or EU) when a user logs in. The source describes PostHog as a context layer that agents can query and act on, covering product analytics, feature flags, experiments and observability.
The server installs into Claude Code, Cursor, Codex, VS Code, Zed, or PostHog Desktop with the command npx @posthog/wizard mcp add. The source says setup guides for each MCP client are in the PostHog docs, and that MCP analytics can show how agents use the server. It is aimed at product teams and developers who want AI agents to diagnose problems, find opportunities and ship fixes using their product data.
Written from the project's README and checked against it.
What you need
- A PostHog Cloud account (US or EU region)
- An MCP-compatible client such as Claude Code, Cursor, Codex, VS Code, Zed or PostHog Desktop
| Setting | Needed | What it is |
|---|---|---|
AuthorizationHeader, secret | Required | Bearer token with your PostHog personal API key. Create one at https://us.posthog.com/settings/user-api-keys with the 'MCP Server' preset. |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Summarize recent product analytics trends in my PostHog project
- Find session replays where users hit errors in my app
- Check the current status of my feature flags and experiments
Good to know
- The source does not list the MCP server's individual tools
- Open source self-hosted deployments should scale to about 100k events per month
- PostHog does not provide customer support or guarantees for open source deployments
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
What you can do with it
- Reviewing product analytics with an AI assistant
- Diagnosing errors using session replays
- Checking feature flag and experiment results
Alternatives to PostHog MCP Server
All alternatives →World Monitor is a real-time global intelligence dashboard covering conflict, markets, energy, trade, shipping and cyber. Its MCP server gives AI assistants access to that data, and it is aimed at analysts, agents and scripts.
Lets AI agents create and change Power BI semantic models through a local MCP server. Built for developers who want natural language modeling in Power BI Desktop, Fabric workspaces and PBIP files.
Seal Open Data serves French public datasets from data.gouv.fr to AI assistants. It covers topics such as territories, companies, housing and population. It is aimed at users who want to query French open data from clients like Claude.
OpenMetadata MCP server lets MCP-compatible assistants search metadata, inspect lineage, and manage data quality tests. It is for data teams and AI agents that need governed context about enterprise data.
Compiles, validates and renders semantic chart specs for AI assistants through the Model Context Protocol. It is for agents that need reliable, good-looking and interactive charts across several chart libraries.
Query PostHog analytics, manage feature flags and experiments, and investigate errors from your AI assistant. It suits product teams and developers who already use PostHog for analytics, replays, and error tracking.
Compare with World Monitor, Power BI Authoring MCP Server (Local) or Seal Open Data
PostHog MCP Server: common questions
What data can the PostHog MCP Server reach?
According to the source, PostHog stores analytics, errors, replays, logs and business data, and agents can query and act on it through the MCP server. The source does not list exact tool names.
Which AI clients can use the PostHog MCP Server?
The source says it can be installed into Claude Code, Cursor, Codex, VS Code, Zed, or PostHog Desktop. It also mentions connecting to any MCP-compatible agent.
Is there a free tier for PostHog Cloud?
The source says PostHog Cloud has a monthly free tier, including the first 1 million events, 5k recordings and 1M flag requests each month. No card is required.
How do I install PostHog MCP Server?
In Claude Code run claude mcp add --transport http posthog-mcp-server https://mcp.posthog.com/mcp --header "Authorization: Bearer YOUR_API_KEY". For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is PostHog MCP Server the official server?
PostHog MCP Server is a community project by PostHog, not verified by a company domain.
Is PostHog MCP Server free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is PostHog MCP Server safe to use?
It scores 88 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to PostHog MCP Server?
Similar MCP servers: World Monitor, Power BI Authoring MCP Server (Local), Seal Open Data, OpenMetadata.
Does PostHog MCP Server work with ChatGPT?
Yes. Add its server URL in ChatGPT as a custom connector. See MCP in ChatGPT.
