MCP serversAnalytics & researchLeer en español
Set up the PostHog MCP server
Query product funnels, web traffic, HogQL insights, feature flags and experiments in PostHog.
Before you start
Sign in to PostHog (US or EU cloud) and select the project you want to inspect.
Use OAuth sign-in or generate a scoped Personal API Key (phx_...) if needed.
Add it to your client
Open Settings › Connectors in Claude web or Claude Desktop.
Click Add custom connector and paste https://mcp.posthog.com/mcp.
Complete OAuth sign-in in your browser, or supply your PostHog API key if your client uses header auth.
Enable the PostHog connector in your chat tools menu and verify the available tools.
https://mcp.posthog.com/mcpIn ChatGPT, open Settings › Connectors (or Apps & Connectors on supported plans).
Choose Add custom connector and paste https://mcp.posthog.com/mcp.
Complete OAuth sign-in in your browser, or supply your PostHog API key if your client uses header auth.
Start a new chat, select the connector and test a read-only prompt first.
https://mcp.posthog.com/mcpRun the command below in your terminal to register the remote server.
Complete OAuth sign-in in your browser, or supply your PostHog API key if your client uses header auth.
Run /mcp inside Claude Code to confirm the connection status and inspect available tools.
claude mcp add --transport http posthog https://mcp.posthog.com/mcpOpen Cursor Settings › Tools & MCP (or edit .cursor/mcp.json).
Add the entry below under mcpServers and save the file.
Complete OAuth sign-in in your browser, or supply your PostHog API key if your client uses header auth.
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp"
}
}
}Create or open .vscode/mcp.json in your workspace (or run MCP: Add Server from the Command Palette).
Paste the configuration below under servers and click Start.
Complete OAuth sign-in in your browser, or supply your PostHog API key if your client uses header auth.
{
"servers": {
"posthog": {
"type": "http",
"url": "https://mcp.posthog.com/mcp"
}
}
}Register the remote server in Codex CLI with the command below.
Complete OAuth sign-in in your browser, or supply your PostHog API key if your client uses header auth.
Run codex mcp list to verify that the server is active.
codex mcp add posthog --url https://mcp.posthog.com/mcpWhat you can do
- Run HogQL queries, funnel breakdowns and web analytics reports.
- Check signup attribution by referrer, UTM campaign and landing page.
- Inspect or manage insights, feature flags, experiments and error tracking.
“Break down our signups by utm_source and utm_campaign in PostHog over the past 30 days.”
What it can change
Can read analytics and also create insights, dashboards or update feature flags depending on your authorized scopes.
Pair PostHog MCP + Spica Post MCP
Measure real product signups per social channel in PostHog MCP, then ask Spica Post MCP to double down on the formats and networks converting best.
“Find which social UTM campaigns converted best in PostHog this month, then ask Spica Post to draft four posts around those topics.”
Questions
What is PostHog's official MCP endpoint?
PostHog hosts its official remote MCP server at https://mcp.posthog.com/mcp (registered as com.posthog/mcp).
Can PostHog MCP run custom analytics queries?
Yes. It supports HogQL queries, funnels, insights and web analytics directly from your AI client.
Pair your stack with one remote OAuth MCP for social publishing.
Works with the assistant you already use: Claude, ChatGPT, Gemini, Grok and more.


