The PostHog MCP server is the official Model Context Protocol service from PostHog, designed to let MCP clients (such as Claude, Cursor, VS Code, and Zed) directly access the PostHog platform's data and features. According to the materials, PostHog is a platform for building self-driving products, and its developer tools cover AI observability, analytics, session replay, feature flags, experiments, error tracking, logs, and more, and this MCP server exposes these capabilities to AI clients.
Main capabilities: The server provides tools for analytics queries and SQL, dashboards, experiments, feature flags, surveys, session replay, error tracking, and more. Example prompts include creating a feature flag, querying signup trends, creating an A/B test, and fetching an error list.
Usage: It can be automatically installed into Cursor, Claude, Claude Code, VS Code, and Zed with a single command; alternatively, the MCP configuration can be manually added to a desktop client along with a personal API key. For Node clients, the Model Context Protocol SDK's Streamable HTTP transport can be used, authenticating with a personal PostHog API key as a Bearer token, and the Accept: application/json, text/event-stream header must be included.
Configuration and filtering: URL query parameters can be used to filter available tools by feature (features) or by specific tool name (tools); when both are provided, their union is used. Resource filtering (the resources parameter) is also supported. The server has two modes: tools mode (registers all tools individually) and cli mode (wraps all tools as a single exec tool). cli is the default mode, but a few clients such as Cursor automatically choose tools mode. Users can pin the mode via a query parameter or request header. In cli mode, split_writes=true can separate read and write tools into exec-read and exec-write.
Learning and skills: In cli mode, a learn tool is provided that can load guides on analytics, SQL, artifacts, activity, examples, HogQL, visualization, URLs, feedback, and more on demand, and supports skill discovery and search (requires enabling the mcp-exec-skills feature flag).
Use cases: Suitable for developers who want to directly query PostHog data, manage feature flags, create experiments, view errors, and more from an IDE or AI client. Limitations: A PostHog account and personal API key are required; some features depend on feature flags; skill discovery is advisory, not mandatory; tool results may be truncated due to client limits. Specific pricing and cost information is not currently provided.