Skip to content
← All MCP servers

Is the PostHog MCP server safe? What it can reach

What the PostHog MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.

Official serverChecked

PostHog’s official MCP server is hosted at mcp.posthog.com and lives in the PostHog monorepo; the standalone PostHog/mcp repo is archived. Sign in with OAuth or a personal API key. Its 1,300+ tools reach analytics, flags, experiments, session replays and persons. Add the read-only header or query parameter and limit tools with features.

Who maintains it

ImplementationKindStatus
PostHog hosted MCP (PostHog/posthog, services/mcp)Officialactive
PostHog/mcp (standalone, moved to the monorepo)Officialarchived

It runs as a hosted remote server. The documented endpoint is https://mcp.posthog.com/mcp.

How it signs in

OAuth is recommended; the authorization screen lets you limit the login to chosen projects. You can instead send a personal API key made with the MCP Server preset as a Bearer header. The server acts with that user’s rights, in the US or EU region of their account.

What its tools can do

KindTools
Readdashboard-get, dashboards-get-all, feature-flag-get-all, feature-flag-get-definition, experiment-get, experiment-results-get, insights-list, persons-list, execute-sql
Writeinsight-create, dashboard-create, dashboard-update, annotation-create, survey-create, experiment-create, experiment-launch, experiment-ship-variant, feature-flag-enable, feature-flag-disable, feature-flag-roll-out-to-everyone
Can’t be undonepersons-bulk-delete, session-recording-delete, feature-flags-bulk-delete-create, dashboards-bulk-delete, insight-delete, dashboard-delete, experiment-delete, survey-delete, feature-flag-archive, workflows-send-email-execute

The tools reference lists about 1,300 tools across every PostHog product; these lists are a small subset chosen for the riskiest and most common ones. Tool names are documented as stable. Use the read-only parameter or the features and tools query parameters rather than long deny lists.

Built-in limits

OptionWhat it does
x-posthog-read-only / readonlyHeader x-posthog-read-only or query parameter readonly (true or 1) leaves out tools that create, update or delete data.
featuresQuery parameter exposing every tool in the named categories, such as ?features=flags,dashboards,insights.
toolsQuery parameter exposing only the named tools, such as ?tools=dashboard-get,feature-flag-get-all,execute-sql.
Project limitsOn the OAuth screen choose Projects to limit the login to chosen projects, or use a project-scoped API key. Pinning an organization or project with x-posthog-organization-id and x-posthog-project-id sets the start context but does not restrict access.

The risks

  • Event properties, person data and session recordings can hold customer data, so reads send that data into the agent’s context and to your AI provider.
  • feature-flag-enable, feature-flag-disable and feature-flag-roll-out-to-everyone change what real users see, so one injected instruction could ship or kill a feature in production.
  • persons-bulk-delete and session-recording-delete remove customer records and recordings, which cannot be restored.
  • workflows-send-email-execute sends email, and a pinned project does not stop the agent from reaching other projects the login can see.

Limit it in Claude Code

Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:

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

Claude Code names MCP tools mcp__posthog__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:

{
  "permissions": {
    "deny": [
      "mcp__posthog__persons-bulk-delete",
      "mcp__posthog__session-recording-delete",
      "mcp__posthog__feature-flags-bulk-delete-create",
      "mcp__posthog__dashboards-bulk-delete",
      "mcp__posthog__workflows-send-email-execute",
      "mcp__posthog__experiment-delete"
    ],
    "ask": [
      "mcp__posthog__feature-flag-enable",
      "mcp__posthog__feature-flag-disable",
      "mcp__posthog__feature-flag-roll-out-to-everyone",
      "mcp__posthog__experiment-launch",
      "mcp__posthog__experiment-ship-variant",
      "mcp__posthog__dashboard-update",
      "mcp__posthog__insight-create",
      "mcp__posthog__survey-create"
    ]
  }
}

Limit it in Codex

Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:

[mcp_servers.posthog]
url = "https://mcp.posthog.com/mcp"
disabled_tools = ["persons-bulk-delete", "session-recording-delete", "feature-flags-bulk-delete-create", "dashboards-bulk-delete", "workflows-send-email-execute", "experiment-delete"]

Checklist

  • Connect with ?readonly=true unless you need writes.
  • Limit the OAuth login to the projects the agent needs.
  • Use ?features= or ?tools= to expose only what the task uses.
  • Ask before any feature flag change.

Checked against the vendor documentation on November 25, 2026. PostHog MCP docs · PostHog MCP FAQ · PostHog MCP tools reference · PostHog/mcp repo (archived)

What Excellent covers

Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server

Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing