Is the PostHog MCP server official?
Yes. It is built and hosted by PostHog and its source is in the PostHog monorepo.
@PostHog
Basic information
PostHog is an open-source product analytics suite with events, session replay, feature flags, and experiments. Its remote MCP server lets assistants query analytics with natural language or HogQL, manage flags, and investigate product behavior conversationally.
https://mcp.posthog.com/mcpclaude mcp add posthog --transport http https://mcp.posthog.com/mcpTool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
This server requires authentication. Tool discovery may require signing in or credentials from the provider.
Fetch the live tool list directly from this server's endpoint using the button above.
The PostHog MCP server is PostHog's official, free, hosted Model Context Protocol endpoint (https://mcp.posthog.com/mcp) that lets AI agents query analytics, run SQL, manage feature flags and experiments, and triage errors in your PostHog project.
It is a remote server with nothing to run locally. You add the URL to an MCP client such as Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf or Zed, sign in to PostHog through OAuth, and the agent can read and write across PostHog products. The source lives in the PostHog monorepo under services/mcp; the older PostHog/mcp repository now only points there.
You need a PostHog account (US or EU Cloud). No API key is required for OAuth-capable clients: the first time the agent uses the server, a browser window opens so you can log in, and the PostHog auth server routes you to the correct data region automatically.
The fastest route is the PostHog Wizard, which installs the PostHog MCP server into PostHog Desktop, Cursor, Claude Code, Claude Desktop, Codex, VS Code and Zed:
npx @posthog/wizard mcp add
claude mcp add --transport http posthog https://mcp.posthog.com/mcp -s user
Alternatively, install the PostHog plugin, which ships the same tools plus slash commands such as /posthog:flags, /posthog:insights and /posthog:errors:
claude plugin install posthog
After installing, run /mcp and follow the browser prompts to log in.
Use the PostHog connector in the Claude connector directory and click Connect. To configure it manually, open Settings > Developer > Edit Config and add:
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": ["-y", "mcp-remote@latest", "https://mcp.posthog.com/mcp"]
}
}
}
Install the PostHog plugin from the Cursor Marketplace, or add this to mcp.json under Cursor Settings > Tools & Integrations > New MCP Server:
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp"
}
}
}
Run MCP: Open User Configuration from the command palette and add:
{
"servers": {
"posthog": {
"type": "http",
"url": "https://mcp.posthog.com/mcp"
}
}
}
The server is then available in Copilot chat.
codex mcp add posthog --url https://mcp.posthog.com/mcp
Codex supports native OAuth, so you are prompted to log in on first use.
Under Windsurf Settings > Cascade > MCP Servers > Manage MCP Servers > View raw config, add the same mcp-remote block shown for Claude Desktop to mcp_config.json.
If your client cannot do OAuth, create a personal API key with the MCP Server preset and send it as a header:
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer ${POSTHOG_API_KEY}"
}
}
}
}
exec tool, while tools mode registers every tool individually. Mode is auto-detected and can be overridden with ?mode=cli or ?mode=tools.?readonly=true or the x-posthog-read-only header.?features=flags,dashboards,insights) or exact name (?tools=dashboard-get,execute-sql).x-posthog-organization-id and x-posthog-project-id headers.The server exposes hundreds of tools, grouped by PostHog product:
execute-sql runs SQL queries, and query tools such as query-trends and query-funnel run insight-style queries. Dashboard tools (dashboard-get, dashboard-create, dashboards-get-all) read and build dashboards.feature-flag-get-all, create-feature-flag, update-feature-flag, experiment-create and experiment-results-get let an agent ship and evaluate rollouts.query-error-tracking-issues-list and error-tracking-issues-partial-update list, inspect, assign and resolve issues.persons-list, cohorts-create, session-recording-get, surveys-get-all and survey-create.query-logs and related log tools for querying and alerting.switch-organization, switch-project, projects-get, and docs-search for PostHog documentation.In CLI mode, the agent uses exec to search, inspect and call these tools on demand, and render-ui can draw visualizations in clients that support MCP apps.
Authorization: Bearer header, or the mcp-remote bridge.x-posthog-project-id (this also removes the switch-* tools), or add one named server entry per project.?mode=cli) or filter with features/tools.Yes. It is built and hosted by PostHog and its source is in the PostHog monorepo.
Connecting and calling tools is free. Normal PostHog usage billing still applies to the data your queries consume, and some AI-powered tools may be billed as PostHog AI spend.
No. OAuth is the recommended path. A personal API key with the MCP Server preset is only needed for clients that cannot do OAuth.
Yes. PostHog documents setup for Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf and Zed, and the wizard installs into most of them in one command.
The PostHog MCP server is remote at `https://mcp.posthog.com/mcp` using Streamable HTTP. For self-hosted PostHog, the README describes running the server yourself with `POSTHOG_API_BASE_URL` set to your instance.
Yes. The auth server routes you to the US or EU region based on the account you sign in with.
Tool calls use the PostHog API, so the standard API rate limits apply per team. Some AI-powered tools have lower limits.
Review tool calls before running them, as prompt injection is possible. You can restrict the session to read-only tools, filter tools, and pin the connection to one project.
The PostHog remote MCP server is a hosted Model Context Protocol endpoint at https://mcp.posthog.com/mcp, so AI assistants can connect to it without installing or running anything locally.
Add the endpoint https://mcp.posthog.com/mcp to any MCP-compatible client such as Claude Code, Cursor, or VS Code. The setup snippets on this page configure each client in one step.
Yes. PostHog uses OAuth: the first time you connect, your MCP client opens a browser window to sign in and authorize access, then reuses the credentials for future sessions.
PostHog exposes a Streamable HTTP endpoint, the transport used by remote MCP servers and supported by all major MCP clients.
Pharmaceutical drug & clinical trial intelligence
Read-only, source-backed AI model pricing, history, comparisons and cost calculations.
Research competitors' winning ads, clone them for your brand and launch paused campaigns on Meta, Google and TikTok from chat.
Discover, evaluate, and buy solutions for the cloud
Write, schedule and publish LinkedIn posts in your own voice, reply to comments and read your analytics, all from your AI assistant. Remote MCP server with OAuth sign-in.
Comments