# PostHog MCP server

> Ask about PostHog insights, dashboards, flags and experiments. Each change waits for your approval.

## Server URL

`https://mcp.posthog.com/mcp` (Streamable HTTP)

- Sign-in: Sign in with PostHog
- Connect in RevampKey: https://revampkey.com/marketplace/posthog

## Agent skills (5)

- [PostHog connector: safe analytics and flag work with AI](https://revampkey.com/marketplace/posthog/skills/essentials.md): Ground rules for working in PostHog: confirm the project first, read analytics freely, keep large results small, and ask before any change to saved insights, dashboards, flags or experiments.
- [PostHog Dashboard Consolidation with AI: Merge Duplicates, Remove Dead Ones](https://revampkey.com/marketplace/posthog/skills/dashboard-consolidation.md): Finds duplicate, dead and orphaned dashboards and insights in your PostHog project, then proposes merges, removals and tile reordering as a plan. It makes no changes until you approve each one.
- [PostHog Experiment Results Review with AI: Is the Test Decisive?](https://revampkey.com/marketplace/posthog/skills/experiment-results-review.md): Reads an experiment's results with a sceptical eye, checking the flag, sample size, run length and stability before calling a winner. It asks before starting, stopping or changing anything.
- [PostHog feature flag audit with AI: find stale flags safely](https://revampkey.com/marketplace/posthog/skills/feature-flag-audit.md): Reviews your PostHog feature flags to find fully rolled out, forgotten or unused ones, checks each definition first, and proposes cleanup. It asks before changing or deleting any flag.
- [PostHog Funnel and Retention Analysis with AI: Clear Answers Before Charts](https://revampkey.com/marketplace/posthog/skills/funnel-and-retention-analysis.md): Turns a plain product question into a funnel or retention query, runs it on a narrow scope first, and checks sample size and event definitions before drawing conclusions. It asks before saving any insight or changing a dashboard.

All skills: https://revampkey.com/marketplace/posthog/skills.md

PostHog is a product analytics platform. It stores your analytics, errors, session replays and business data, so you can query it and act on it. Product and engineering teams use it to see how people use their apps, find bugs, and ship changes behind feature flags. Developers and product managers are among the teams shipping with it.

Connect PostHog to RevampKey and you can ask about your insights, dashboards, feature flags and experiments. Ask what an insight shows or what is on a dashboard. Ask a plain question and the agent writes a HogQL query, runs it, and summarizes the rows. Ask for an experiment's results or a flag's definition. Connecting uses PostHog's own sign-in page.

The agent asks before it changes anything. It can add insights to dashboards, create, update or delete dashboards, create, update or delete feature flags, create experiments, and update or delete insights. Before each of these ten kinds of change, it asks you first. Nothing changes until you say yes.

## What you can do

### Check how a checkout experiment is doing

Your team runs an experiment on the checkout page. You ask the agent for the experiment and its results. It finds the experiment in PostHog, reads its results, and summarizes what they show in a few sentences. It reads only, so nothing in PostHog changes.

### Turn a plain question into a HogQL query

A product manager wants to know how many people signed up each week last month. She types the question in plain English. The agent writes a HogQL query for it, runs the query, and reports the rows it gets back. If she wants a different cut, she asks again and the agent runs a new query.

### Add an insight to a dashboard

You want the signup insight on your onboarding dashboard. Ask the agent to add it. The agent finds the insight and the dashboard, then asks you to approve the change before it adds the insight to the dashboard. Say no and nothing changes. You can ask it to show the dashboard's current tiles first.

## Things to ask

- Show me all my dashboards and which insights are on the onboarding one.
- Find the insight that tracks trial signups and show me its latest results.
- Write a HogQL query that counts signups per day for the last 14 days and run it.
- List my feature flags and show me the definition of the mobile checkout flag.
- How is the checkout experiment doing? Show me its results.

## What the agent can do

### Dashboards

Find your dashboards and read what each one holds. Create, update, or delete a dashboard, or add an insight to one. Each of these changes waits for your approval.

`dashboards-get-all`, `dashboard-get`, `dashboard-create`, `dashboard-update`, `dashboard-delete`, `dashboard-reorder-tiles`, `add-insight-to-dashboard`

### Insights

Find and list insights, read one, and run it for current results. Changes to an insight, such as updating or deleting it, wait for your approval.

`insights-get-all`, `insight-get`, `insight-query`, `insight-create-from-query`, `insight-update`, `insight-delete`

### HogQL queries

Turn a plain question into a HogQL query and run it. The agent reads the rows that come back and summarizes them for you. You do not need to write HogQL yourself.

`query-generate-hogql-from-question`, `query-run`

### Feature flags

List your feature flags and read the definition of any one. Create, update, or delete a flag after you approve each change.

`feature-flag-get-all`, `feature-flag-get-definition`, `create-feature-flag`, `update-feature-flag`, `delete-feature-flag`

### Experiments

List experiments, read one, and read its results. Creating a new experiment waits for your approval.

`experiment-get-all`, `experiment-get`, `experiment-results-get`, `experiment-create`

## FAQ

### How do I connect PostHog to an AI agent?

You need a PostHog account. Click Connect in RevampKey, then approve access on PostHog's own sign-in page using OAuth. PostHog routes you to the US or EU data region based on the account you log in with. Connecting is free, but some tools may be billed as PostHog AI spend.

### What can an AI agent do in PostHog?

The agent can read insights, dashboards, feature flags, experiments and query results. It can also run HogQL queries from your questions. It can create, update or delete dashboards, create, update or delete feature flags, add insights to dashboards, update or delete insights, and create experiments. Each of these waits for your approval. It works only through the 24 PostHog tools this connector provides.

### Will the AI agent change my PostHog data without asking?

No. Before the agent runs any of the 10 tools that create, change or delete, it asks you first and names the object involved. Read-only tools run without that step. Check the agent's answers against PostHog before you act on them.

### Can I ask PostHog questions in plain English without writing HogQL?

Yes. PostHog's query tools turn your question into a HogQL query and run it. The agent then summarizes the rows it gets back. You do not need to write HogQL yourself. Ask about signups, dashboards or any other data PostHog stores.

### What is the PostHog MCP server URL?

The PostHog MCP server URL is https://mcp.posthog.com/mcp. It uses the Streamable HTTP transport, so any client that supports remote MCP servers can connect to it.

### How does the PostHog MCP server authenticate?

With PostHog's own sign-in (OAuth). You approve access in your browser; no password is shared with the client.

### What can an AI agent do with the PostHog MCP server?

It exposes 24 tools: 14 that read and 10 that create or change things. In RevampKey the agent asks before it runs any tool that changes data.

### Are there agent skills for PostHog?

Yes. 5 SKILL.md playbooks teach an agent how to do real PostHog work step by step. RevampKey installs them when you connect PostHog; for Claude Code, Cursor or Codex you can copy them into your project.

## Tools (24)

- `add-insight-to-dashboard` (changes data)
- `create-feature-flag` (changes data)
- `dashboard-create` (changes data)
- `dashboard-delete` (changes data)
- `dashboard-get`
- `dashboard-reorder-tiles`
- `dashboard-update` (changes data)
- `dashboards-get-all`
- `delete-feature-flag` (changes data)
- `experiment-create` (changes data)
- `experiment-get`
- `experiment-get-all`
- `experiment-results-get`
- `feature-flag-get-all`
- `feature-flag-get-definition`
- `insight-create-from-query`
- `insight-delete` (changes data)
- `insight-get`
- `insight-query`
- `insight-update` (changes data)
- `insights-get-all`
- `query-generate-hogql-from-question`
- `query-run`
- `update-feature-flag` (changes data)

## Details

- Maker: PostHog
- Setup: Sign in with your account
- Category: Developer tools
- Documentation: https://posthog.com/docs/model-context-protocol

Page: https://revampkey.com/marketplace/posthog
