Skip to content
Skillpedia
βœ“ Official Β· PostHog● Free and open source☁️ RemoteπŸ”‘ Needs an API keyData and databases

PostHog MCP Server

Lets your AI agent query product analytics, feature flags, experiments, errors and session replays in PostHog.

41k stars on GitHubby PostHogLicense NOASSERTIONUpdated 18 days ago

How to install

This MCP is remote: it runs in the cloud.

Nothing to install. Copy the address and paste it into your AI app:

Server address

https://mcp.posthog.com/mcp
  • β€ΊClaude (site or app): Settings β†’ Connectors β†’ Add custom connector.
  • β€ΊChatGPT: Settings β†’ Apps β†’ Create app (developer mode), and paste the address.
  • β€ΊClaude Code, Cursor, VS Code and Windsurf: pick your app below.

Paste in the terminal:

claude mcp add --transport http posthog https://mcp.posthog.com/mcp --header "Authorization: <your value>"

What to fill in

NameWhat it isRequired
AuthorizationBearer token with your PostHog personal API key. Create one at https://us.posthog.com/settings/user-api-keys with the 'MCP Server' preset.Yes

Ready! Now test it

Restart the app and paste one of these requests in the chat:

Which pages had the most rage clicks this week?
Create a feature flag that rolls out to 10 percent of users.

What it is

PostHog stores analytics, errors, session replays and other product data so you and your agent can query it. The official MCP server connects your agent to it. You can ask for insights, SQL, replays and feature flag changes.

What it can do

  • Product and web analytics insights
  • SQL queries over your data
  • Feature flags and experiments
  • Error tracking
  • Session replays
  • Surveys and logs

When to use

  • β€ΊWhen you want to know why a metric dropped.
  • β€ΊWhen you want to roll out a feature to some users with a feature flag.
  • β€ΊWhen you want to find the errors affecting your users.

What you need

A PostHog account (Cloud US, Cloud EU or self-hosted). The remote server is https://mcp.posthog.com/mcp and you log in when you connect.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

How do I install it?

Run npx @posthog/wizard mcp add. It installs into Claude Code, Cursor, Codex, VS Code, Zed or PostHog Desktop.

Is it free?

PostHog has a monthly free tier per product and the README says no card is required.

Where is the server?

At https://mcp.posthog.com/mcp. It routes to the US or EU region when you log in.

Can I self-host PostHog?

Yes, with a one-line hobby deploy on Linux with Docker. The README says it is for roughly 100k events per month.

Does self-hosting come with support?

No. The README says they do not provide support or guarantees for open source deployments.

Is it official?

Yes. The registry describes it as the official PostHog MCP server.

If it does not work

  • β€ΊRun npx @posthog/wizard mcp add again if the server is missing from your client.
  • β€ΊMake sure you log in to the right region, US or EU.
  • β€ΊRestart your agent fully after adding the server.

5 new skills a week. 1 minute to read.