POSTHOG MCP SERVER

Connect PostHog to Andromity with the PostHog MCP server

Connect PostHog's official MCP server to Andromity: let your AI coding agent query analytics, manage feature flags and experiments, and triage error tracking issues.

Server
https://mcp.posthog.com/mcp
Connects with
Browser sign-in (OAuth)
Category
Analytics

PostHog hosts an official MCP server at https://mcp.posthog.com/mcp. With it, Andromity can query product analytics, work with feature flags and experiments, and look at error tracking issues while it changes your code.

Sign-in is OAuth in your browser. PostHog's authentication server sends you to the US or EU region based on the account you sign in with, so one URL covers both.

What the agent can do with PostHog

  • Run product analytics queries and SQL (insight-query, execute-sql).
  • Create, enable, disable and evaluate feature flags (create-feature-flag, feature-flag-get-all).
  • Create, launch and read results of experiments (experiment-results-get).
  • List and triage error tracking issues (query-error-tracking-issues-list).
  • Work with dashboards, notebooks, logs, web analytics and surveys (survey-create).
  • Inspect LLM traces and evaluations (query-llm-traces-list).

Example prompts

Ask for the work in plain language. Naming the server helps, for example “use the PostHog MCP server”.

  • Check PostHog for the feature flag that gates the new onboarding flow, and remove its usages in this repo if it is at 100 percent rollout.
  • List the top error tracking issues from the last week and fix the one that points into this repository.
  • Query PostHog for how many users hit the checkout_completed event yesterday and add a test for the event name in this repo.
  • Create a feature flag for the new search endpoint and wire it into the handler.

Connect PostHog

  1. In VS Code, open Andromity Hub → MCP Servers → Discover. In the terminal app, open /settings → MCP → + Connect an app. Find PostHog and select Connect.
  2. Sign in to PostHog in your browser and approve the connection.
  3. Andromity saves PostHog to ~/.andromity/mcp.json and connects it.

See Connect an app for how Andromity stores connectors and tokens.

Access and safety

  • One connection signs in as one account with one active organization and project. To use another, add a separately named server entry.
  • PostHog documents read-only mode: set the x-posthog-read-only header or the readonly=true query parameter. It removes tools that create, update or delete data. Add the server by hand in mcp.json to use it.
  • PostHog documents pinning to an organization or project with the x-posthog-organization-id and x-posthog-project-id headers, or the organization_id and project_id query parameters.
  • For clients without OAuth, PostHog offers a personal API key created with the MCP Server preset.

In an untrusted folder, MCP servers don’t start at all. Read workspace trust and permission modes for the full model.

Limits to know

  • MCP calls use PostHog's standard API rate limits, applied per team. There is no separate MCP limit.
  • AI-powered tools have lower limits, need AI data processing enabled in your organization settings, and may be billed as PostHog AI spend.

Questions

Does PostHog have an official MCP server?
Yes. PostHog hosts it at https://mcp.posthog.com/mcp and documents it in its docs.
Is there a separate EU URL for PostHog MCP?
PostHog's docs use one URL, https://mcp.posthog.com/mcp, and route you to the US or EU region based on the account you sign in with.
Can I give the agent read-only access to PostHog?
Yes. Add the server by hand with the readonly=true query parameter or the x-posthog-read-only header.

Sources

This guide is based on PostHog’s own documentation. The app controls its server, so tools can change; check the source for the current list.

PostHog is a trademark of its owner. Andromity is not affiliated with or endorsed by PostHog.