PostHog

by PostHog, Inc.

Connect agents to PostHog to capture events, manage feature flags, and query product analytics.

MCP serverAnalyticsFree / PaidAPI keyanalyticsfeature flagsproduct analyticsopen sourcesession recording

PostHog's MCP server

PostHog publishes its own MCP server: the address an AI assistant uses to work in PostHog for you. In Claude it is called a connector. Add it to your assistant, sign in with your PostHog account, and the assistant can work with what that account can already reach.

Address
https://mcp.posthog.com/mcp
Connection
Streamable HTTP
Sign-in
Sign in with your PostHog account, or use an access token

What an assistant can do with it

  • Explore events, properties and dashboards
  • Run queries and read insights
  • Work with feature flags and experiments

Checked on November 24, 2026 against PostHog's own guide · Read PostHog's MCP guide

Set up PostHog for your whole team's AI assistants at once

Skip doing this person by person. In Team tools you pick PostHog and your team's other tools once, fill in your workspace details, add how your team works, and share one link. Everyone gets ready-made setup for their own assistant, and sees what changed when you update the set.

Already have an account? Open Team tools

Add PostHog to your assistant

Each person adds it in their own AI assistant and signs in there. No sign-in passes through Fugentic.

Claude

  1. Open Customize, then Connectors.
  2. Choose Add, then Add custom connector.
  3. Enter the name PostHog and the address above, then choose Continue.
  4. Sign in with your PostHog account when Claude asks.

On a Team or Enterprise plan, an owner adds it once under Organization settings, then Connectors. After that, each person chooses Connect.

Claude Code

Run this in a terminal, then type /mcp in Claude Code to sign in:

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

Cursor

Add this entry to the file ~/.cursor/mcp.json. Cursor asks you to sign in the first time it uses it.

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

VS Code

  1. Run the command Chat: Open Customizations.
  2. Choose MCP Servers, then Add Server.
  3. Choose HTTP, then enter the address above and the name PostHog.

Steps checked on November 12, 2026 against each assistant's own help pages.

How agents use PostHog

  • Track agent feature usage with granular event capture
  • Gate experimental agent capabilities with feature flags
  • Query user behavior data to personalize agent responses
  • Build cohorts of power users for targeted AI-driven campaigns
  • Run A/B tests on agent workflow variations and measure outcomes

Agent actions

Capture EventSend a single analytics event to PostHog

Inputs: distinctId, event, properties, timestamp

Returns: success

Capture Batch EventsSend multiple events in a single request

Inputs: batch

Returns: success, count

Identify PersonSet person properties for a distinct ID

Inputs: distinctId, properties

Returns: success

Get PersonRetrieve a person's profile and properties

Inputs: distinctId

Returns: person, properties, createdAt

Evaluate Feature FlagCheck whether a feature flag is enabled for a user

Inputs: flagKey, distinctId, personProperties

Returns: enabled, variant, payload

Get Feature FlagsList all feature flags in the project

Inputs: active, limit

Returns: flags, total

Query InsightsExecute an analytics query against PostHog data

Inputs: query

Returns: results, columns, rowCount

Get CohortRetrieve a cohort definition and its user count

Inputs: cohortId

Returns: cohort, name, count

Example workflows

  1. 1

    Feature flag-gated workflows

    Agent checks PostHog feature flags before executing experimental workflows

  2. 2

    Usage analytics pipeline

    Capture agent interactions as PostHog events for product analytics

About PostHog

Vendor
PostHog, Inc.
Pricing Always review details with the vendor
Free / Paid — Free tier: 1M events/month, unlimited feature flags. Paid plans based on event and session volume.
Authentication
API key
Rate limit Always review details with the vendor
300 requests / minute
Compatible nodes
AgentResourceOutput

Put PostHog behind your AI agent

Add PostHog alongside your other tools in the planner, without code, and map out how your AI agent works with it.

Open the planner →

Questions about PostHog

Yes. PostHog's own MCP server is at https://mcp.posthog.com/mcp. Each person adds it to their AI assistant and signs in with their own PostHog account. Checked on November 24, 2026.

In Claude, open Customize, then Connectors, choose Add, then Add custom connector, and enter the address https://mcp.posthog.com/mcp. Then sign in with your PostHog account. In Claude, an MCP server you add is called a connector.

Track agent feature usage with granular event capture Gate experimental agent capabilities with feature flags Query user behavior data to personalize agent responses Build cohorts of power users for targeted AI-driven campaigns Run A/B tests on agent workflow variations and measure outcomes

Capture Event, Capture Batch Events, Identify Person, Get Person, Evaluate Feature Flag, Get Feature Flags, Query Insights, Get Cohort

You add PostHog in the Fugentic planner, a no-code canvas for mapping out what your business does and which tools sit behind it. It shows how an AI agent would work with PostHog. Try it free at fugentic.ai/solutions/agentic-planner.

Related Analytics tools