Skip to content
PostHog

PostHog

1 views
MIT
analyticsproduct-analyticsfeature-flagsexperimentserror-trackinghogql

Summary

PostHog's official remote MCP server — query product analytics with HogQL, manage feature flags, and triage errors from your editor.

Features

  • Run HogQL queries against your product analytics data
  • Create, read, and update insights and dashboards
  • Create and manage feature flags
  • Launch and analyze experiments
  • Inspect error-tracking issues and stack traces
  • Hosted remote server — no local install to maintain

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "PostHog" tools will be available.
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.posthog.com/mcp"
      ],
      "env": {
        "POSTHOG_AUTH_HEADER": "Bearer <your-personal-api-key>"
      }
    }
  }
}

Description

The official PostHog MCP server connects an AI agent directly to your PostHog project, turning product analytics into something you can interrogate in plain language. An agent can run HogQL queries against your event data, build and read insights and dashboards, inspect trends and funnels, create and toggle feature flags, launch and analyze experiments, and pull error-tracking stack traces without leaving the editor.

It is a hosted remote server rather than a local process, so there is nothing to run or keep updated: authenticate with a PostHog personal API key and connect from Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, or any other MCP client. The fastest setup is PostHog's own installer, npx @posthog/wizard mcp add, which detects supported clients and writes the config for you across 25+ environments.

Connecting to the server and calling its tools is free. A handful of tools use LLMs internally and are billed as PostHog AI spend; those are only available when AI data processing is enabled in your organization settings.

Related MCP Servers

New

Microsoft's official MCP server for Azure DevOps - work items, repos, pipelines, wikis, test plans and iterations, reachable from any MCP client in plain language.

Developer Tools

MCP: Serena

by Oraios AI

New

Semantic code toolkit for coding agents — symbol-level search, editing and refactoring backed by language servers or the JetBrains platform.

Developer Tools

MCP: Hugging Face

by Hugging Face

New

Official Hugging Face MCP server: search models, datasets, Spaces and papers on the Hub, read repository files, and call Gradio apps as agent tools.

Developer ToolsWeb & Search
New

GitLab's own MCP server — issues, merge requests, CI/CD pipelines, job logs, wikis and semantic code search over an OAuth-authorised HTTP endpoint.

Developer Tools
Browse all MCP servers →