AnalyticsFreeactiveReviewed by MCPIndex

PostHog MCP

Connects AI assistants to PostHog product analytics, feature flags, experiments, error tracking, and observability.

Looking for more MCP servers? Browse the full MCP tools directory or explore more tools in Analytics.

Quick overview

PostHog MCP turns analytics from a dashboard lookup into a contextual reasoning surface where product events, feature flags, experiments, errors, logs, and SQL can be investigated together. The architectural edge is cross-domain correlation: an agent can connect a release condition or flag variant to behavioral metrics, experiment exposure, error signals, and application logs without flattening everything into an exported report. The official PostHog MCP server is hosted at mcp.posthog.com/mcp, so the integration can be remote rather than another local process; that changes the trust boundary from package execution to authenticated remote data access. The security trap is that analytics context often contains user identifiers, event properties, session metadata, and business-sensitive dimensions. Scope the session to the correct PostHog project and region, use bounded date ranges, restrict raw SQL, redact identifiers, and prefer aggregate queries before enabling user-level investigation. A silent failure occurs when a query succeeds but returns no events because the project, region, timestamp semantics, event name, or property filter is wrong. Require the agent to show project ID, region, resolved time window, event schema, and query before interpreting an empty result. PostHog MCP is most useful when product analytics, feature-flag evaluation, experiments, error tracking, and logs share enough consistent release and event metadata to support causal investigation rather than isolated chart reading.

What this MCP server is best for

  • PostHog MCP is useful when you want to extend an AI assistant with real tools and live system access.
  • It helps move from chat-only answers to real actions such as reading data, managing systems, or retrieving current information.
  • It is best for developer and technical workflows where AI needs controlled access to external tools or services.

When to choose it

Choose PostHog MCP when you want an MCP server focused on Analytics and need tighter integration with your existing tools.

Good fit

posthogproduct-analyticsfeature-flagsexperimentserror-tracking

PostHog MCP Configuration

Use the following configuration as a starting point for Claude Desktop or any compatible MCP client, then replace placeholder credentials with your own values.

claude_desktop_config.json
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": ["-y", "@posthog/wizard@latest", "mcp", "add"]
    }
  }
}

How to set up PostHog MCP

These setup steps cover the typical installation flow for this MCP server.

  1. 1

    Use the PostHog Wizard or the current PostHog MCP setup flow for the target client.

  2. 2

    Authenticate against the correct PostHog region and project, and store the project credential in protected client configuration.

  3. 3

    Restrict access to the minimum projects and capabilities required for analytics or feature-flag workflows.

  4. 4

    Test event queries, feature-flag reads, experiment context, and error-tracking lookups with non-sensitive data.

  5. 5

    Review query limits and personally identifiable information handling before allowing SQL or raw event exploration.

  6. 6

    Pro-Tip: Do not send unrestricted raw event properties to an agent; define project scope, redact identifiers, bound date ranges, and expose aggregate queries before user-level diagnostics.

Frequently asked questions

Common questions for PostHog MCP.

What can PostHog MCP access?

The official integration can expose parts of PostHog's product analytics, web analytics, feature flags, experiments, error tracking, LLM observability, surveys, and SQL capabilities depending on the configured client and permissions.

Why does the PostHog region matter?

PostHog deployments can use different regional endpoints and project contexts. Using the wrong region or project can produce valid but empty responses or make expected flags and events appear missing.

What is a silent failure in PostHog MCP?

A query can succeed while returning no events because the date range, project, region, event name, or property filter is wrong. Fix it by verifying project ID, region, timestamp semantics, event schema, and a known-good event before interpreting an empty result.

Should SQL access be enabled by default?

No. Start with bounded, read-only analytics queries and add SQL only when its data exposure, execution cost, and project scope are understood.

PostHog MCP vs Competitors

FeaturePostHog MCPCompetitor
Cross-Domain Analytics Connects events, flags, experiments, errors, and observability context Standalone product analytics dashboards
Feature-Flag Correlation Can relate behavioral changes to flag and experiment context Generic BI connectors
Agent Querying Supports natural-language exploration with bounded MCP tools Prebuilt dashboard filters
Data Governance Can be constrained by project, region, query scope, and redaction policy Unfiltered event exports

Related Guides