Product analytics platform with feature flags, session replay, error tracking and experiments, exposed through a REST API, a hosted MCP server and a CLI.

MCPCLIAPI

What your agent can do

  • exposes PostHog's products

    Via MCP.

  • capture, evaluate, create, update, and delete nearly all of your information in PostHog

    Via API.

  • The PostHog CLI lets you use PostHog from your terminal

    Via CLI.

Tasks depend on the interface and permissions.

Connection methods

Choose a route that fits your agent.

MCP connection
MCP server URL
https://mcp.posthog.com/mcp

Authentication
OAuth is the recommended path
CLI connection
CLI package
posthog-cli

Authentication
A personal API key with the scopes required for the commands you run.
API connection
API path
https://us.posthog.com

Authentication
require authentication with your personal API key

Documentation & experience

  • 3 of 3 connection paths checked
  • Latest documentation check 7 Oct 2026
View sources and checks
How documentation is checked