Skip to content
MCP serverOfficial: Published to the official MCP Registry by the GitHub account or domain it is named after, which owns its code or website.

PostHog

Hosted MCP server that lets AI assistants query PostHog analytics, flags and errors

PostHog is a freemium MCP server for analytics and data. It runs as a hosted remote server, so there is nothing to install locally.

Pricing
Freemium
Platforms
API, CLI, VS Code
Runs
Remotely
Version
1.0.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add --transport http mcp https://mcp.posthog.com/mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

Claude Code setup guide

In Customize → Connectors → Add → Add custom connector

https://mcp.posthog.com/mcp

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp": {
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

In chatgpt.com → Plugins → + → Add custom MCP server

https://mcp.posthog.com/mcp

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

ChatGPT setup guide

Add with the CLI

Run in a terminal

codex mcp add mcp --url https://mcp.posthog.com/mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.mcp]
url = "https://mcp.posthog.com/mcp"

Codex setup guide

Add to Grok Bot desktop app → Connect apps → Add a custom connector

https://mcp.posthog.com/mcp

Enter a Name (for example "PostHog"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

Full Grok Bot setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "mcp": {
          "httpUrl": "https://mcp.posthog.com/mcp"
        }
      }
    }

    Or run: gemini mcp add -s user --transport http mcp https://mcp.posthog.com/mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "mcp": {
          "serverUrl": "https://mcp.posthog.com/mcp"
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "mcp": {
          "url": "https://mcp.posthog.com/mcp",
          "transport": "http"
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "mcp": {
          "type": "streamableHttp",
          "url": "https://mcp.posthog.com/mcp"
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "mcp": {
          "url": "https://mcp.posthog.com/mcp"
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "mcp": {
          "url": "https://mcp.posthog.com/mcp"
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "mcp": {
          "url": "https://mcp.posthog.com/mcp"
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "mcp": {
          "url": "https://mcp.posthog.com/mcp"
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About PostHog

Connect an AI client such as Claude, Cursor or VS Code to PostHog and work with your product data through plain-language requests. The server runs as a hosted endpoint and exposes PostHog's tools for analytics queries, SQL, feature flags, experiments, error tracking and session replay, so an assistant can answer questions about your data or make changes without leaving the editor.

Setup is handled either by a one-line installer that writes the configuration into supported clients, or by adding the server URL manually with a personal API key. Access can be narrowed with feature filters, individual tool allowlists, and a choice between a full per-tool list or a single wrapper tool, which helps keep the tool list small for clients with schema limits.

Teams already using PostHog for analytics and debugging are the natural audience. Connecting the server is free; some tools that call LLMs internally may be billed as PostHog AI usage and only work when AI data processing is enabled in the organization settings.

What it does

Hosted MCP endpoint
A remote streamable HTTP server that any MCP-compatible client can connect to without running local infrastructure.
Analytics and SQL queries
Ask questions in plain text that are turned into trend, funnel and HogQL queries against your project data.
Feature flags and experiments
Create and inspect flags and A/B tests from the assistant, including rollout percentages and variants.
Error investigation
List top error groups, pull stack traces and update issue status or assignment from the editor.
Filterable tool surface
Limit exposed tools by feature area or by name using URL parameters to keep the toolset focused.
Regional routing
Authentication routes the connection to the US or EU region based on the account used to log in.

Good for

  • Triage production errors and open stack traces from inside an IDE
  • Ask an assistant for weekly signup or conversion numbers without opening dashboards
  • Create a feature flag with a percentage rollout from a prompt
  • Set up an A/B test on a page and check its status
  • Scope a read-only analytics assistant for a team by restricting the tool list

Pricing

Freemium

Free MCP access; PostHog product usage is billed pay-as-you-go above free tiers.

Prices change. Check posthog.com before you buy.

PostHog FAQ

Is the PostHog MCP server free to connect?

Connecting to the server and calling its tools is free, but some tools use LLMs internally and may be billed as PostHog AI spend.

Which clients can use PostHog?

It works with any MCP-compatible client, including Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf and Zed.

How do I authenticate?

You can use a personal API key sent as a Bearer token, or go through the PostHog login flow that routes you to the correct region.

Can I limit which tools the assistant can use?

Yes. Add the features or tools query parameters to the server URL to expose only selected tool groups or named tools.

How do I add PostHog to Claude Code?

Run this command in your terminal: claude mcp add --transport http mcp https://mcp.posthog.com/mcp

What are the best alternatives to PostHog?

The closest alternatives to PostHog are PostHog MCP Server, Posthog MCP Server, Posthog, Indie Metrics MCP and Engageable Analytics.

Where this comes from

  • Description: written from the project's README, the project's website and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers