PostHog MCP server

Analytics and monitoring

Query analytics, manage feature flags and experiments, and investigate errors in PostHog.

Your AI app calls the PostHog MCP server, which does the work through tools like exec-read and exec-write and sends the result back to the chat.

About PostHog

PostHog is the official MCP server from PostHog, filed in our directory under analytics and monitoring. Query analytics, manage feature flags and experiments, and investigate errors in PostHog.

PostHog runs as a remote server at https://mcp.posthog.com/mcp, so there is nothing to install: your AI app connects over streamable HTTP, and most remote servers ask you to sign in with OAuth the first time.

The README for PostHog lists tools such as exec-read, exec-write and exec, which your AI app can call once the server is connected.

PostHog is listed in the official MCP registry as com.posthog/mcp, version 1.0.0.

At a glance

Publisher
PostHog, the company behind the product
Runs
As a hosted remote server
Written in
Python
GitHub stars
41,320
Official MCP registry
com.posthog/mcp

Tools PostHog gives your AI app

  • exec-read
  • exec-write
  • exec

Tool names as the PostHog README lists them. Your AI app shows the live list once PostHog is connected.

How to set up PostHog

  1. Nothing to install: PostHog is a remote server, so all you need is an AI app that accepts a remote MCP URL.
  2. Check the PostHog README for keys or settings; the registry lists none that PostHog requires.
  3. Add PostHog to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the PostHog tools to confirm the connection.
  5. Run one read-only task with PostHog first, such as a call to exec-read, before you allow anything that writes or sends.

PostHog compared with similar servers

  • OpenMetadata by open-metadata has fewer GitHub stars than PostHog (15.9k against 41.3k); PostHog is official while OpenMetadata is a community server, and OpenMetadata runs on your own machine and PostHog runs as a remote server.
  • Netdata by netdata has more GitHub stars than PostHog (81.7k against 41.3k); PostHog is official while Netdata is a community server, and both run remotely.
  • Nightingale by ccfos has fewer GitHub stars than PostHog (13.5k against 41.3k); PostHog is official while Nightingale is a community server, and Nightingale runs on your own machine and PostHog runs as a remote server.

Before you connect PostHog

  • Give PostHog its own sign-in or token with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each PostHog tool call until you trust what it does with them.
  • Treat text that PostHog fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for PostHog on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for PostHog

How marketing and sales teams put PostHog to work, by company size. Pick the size closest to yours and start PostHog on one use case.

Small business

  • A small business can ask PostHog where this month's customers came from and which channel is worth more budget.
  • Owners can use PostHog to get a weekly traffic and conversion summary in plain words, without learning the analytics tool.
  • PostHog runs as a remote server, so a small team can connect it in a few minutes with no install to maintain.

Mid-market

  • Marketing teams can connect PostHog to answer attribution and funnel questions in a chat, then save the useful ones as reports.
  • Growth teams can have PostHog flag drops in signups or conversion the day they happen, with the page or source that changed.
  • Start with exec-read and exec-write, the tools PostHog lists first, and add more once the team trusts the results.

Enterprise

  • Enterprises can expose governed metrics through PostHog, so every team's AI answers use the same definitions as finance.
  • Large analytics teams can use PostHog to triage anomalies across regions and products before the weekly business review.
  • Because PostHog comes from PostHog, the company behind the product, it follows that product's own auth and permissions, which security teams usually prefer.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

PostHog README

PostHog's repository lists no open license, so we don't copy its README. Read it on GitHub at PostHog/posthog.

Questions about PostHog

What is the PostHog MCP server?

Query analytics, manage feature flags and experiments, and investigate errors in PostHog. PostHog is published by PostHog, the company behind the product, on GitHub at PostHog/posthog, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I add PostHog to Claude Code?

PostHog is a remote server, so you add its URL instead of installing a package: run claude mcp add --transport http posthog https://mcp.posthog.com/mcp in your terminal. In other apps, add the PostHog URL as a remote or custom connector.

Does PostHog need an API key?

The registry lists no required keys for PostHog. Check the PostHog README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is PostHog an official MCP server?

Yes. PostHog is published by PostHog, the company that makes the product it connects to, so it follows that product's own API and auth.