Skip to content

PostHog MCP: Connecting Your Product Analytics to Claude, Cursor and Codex

You connect your PostHog account to your assistant (Claude, Cursor, Codex, VS Code and others) once; then you write "what are the top 5 errors this week?" or "where do we lose people in the signup funnel?" PostHog's official MCP server runs queries in your project with your permissions, summarizes errors and experiments, and, if you ask, also creates feature flags, experiments and dashboards. The server runs on PostHog's own servers and nothing is installed on your computer. It connects with one click from the directory in Claude and with one command in Claude Code. Because write tools change a live project, a session can be limited to read-only.

What it does
Lets your assistant query product data and create flags and experiments
Type
Connector (remote MCP hosted by PostHog)
Made by
PostHog (official)
Where
Claude, Claude Code, Cursor, Codex, VS Code
Writes
Flags, experiments, dashboards; delete tools too
Data region
US or EU, picked from your account
Price
MCP is free; PostHog charges by usage

What Is PostHog MCP For?

PostHog is a product analytics service you add to your app or website to see what users do: which page was visited, at which step users dropped off, how many people a given error hit. Looking at those numbers means hopping between dashboards. PostHog MCP lets you ask your assistant instead: you write "who signed up but didn't finish the first step?" and the assistant runs a real query in PostHog and explains the result.

MCP is the common standard that lets an AI assistant connect to an outside service. PostHog's server sits in the middle of that bridge: the assistant passes the request to the server, the server asks your project with your PostHog permissions and brings the answer back.

YouYou write the question
AssistantClaude, Cursor, Codex
PostHog MCPPostHog's server, via OAuth
Your PostHog projectEvents, errors, flags, experiments

Write tools change your project; delete tools exist too.

Who it helps: software teams building an app or website, product managers asking which feature gets used, SaaS founders. For example, the developer of an online shop has the errors on the payment page listed from the editor and the stack trace read out; a marketing lead asks "how many signups did we get on Monday?" without opening a dashboard; a team has a flag created that opens the new checkout flow to 20 percent of users.

How Does PostHog MCP Work?

You ask"Where do we drop off in the signup funnel?"
Connects with your permissionOAuth sign-in; the region follows your account
Calls a tool› execute-sqlA read or write tool
Returns the resultAn answer backed by a query
The server runs at PostHog; nothing is installed on your computer. The address is https://mcp.posthog.com/mcp.

According to PostHog, the server doesn't store your analytics data: queries run in your PostHog project and the result goes straight back to the assistant. Authorization uses the server's own OAuth screen; you don't have to create an API key, which is only a route for clients without OAuth support.

To avoid loading a huge number of tools into the assistant's context window, the server runs in two modes. In most clients (Claude, Claude Code, Cowork, Codex) the default is "CLI mode": there is a single exec tool, and the assistant uses it to search for tools, look at their schema and call them. In clients that handle long tool lists well, such as Cursor, tools are registered one by one. The mode is detected from the client; you can change it with ?mode=cli or ?mode=tools.

What Do You Type, What Do You Get? Sample Prompts

The requests are adapted from the examples on PostHog's "use cases" page; the output is described only as far as the documentation describes it.

1. This week's errors"What are the top 5 errors in my project this week?"What you get: error groups ranked by occurrence, with the number of affected users.
2. Stack trace and fix"Show me the full stack trace for the most recent crash, then propose a fix."What you get: the stack trace, error message and metadata are pulled so the assistant can suggest code changes.
3. Signup count"How many unique users signed up in the last 7 days, broken down by day?"What you get: a trends query runs and daily counts come back.
4. Create a feature flag"Create a feature flag called new-checkout-flow enabled for 20% of users."What you get: a flag with a 20% rollout is created, and the flag's key and a link to it in PostHog come back. It changes the live project.
5. Lost users with SQL"Find users who triggered signup but didn't complete onboarding in the last 30 days."What you get: the assistant builds a HogQL query with subqueries over events and shows the gap.

For flag and experiment requests, ask the assistant to say what it will do first. Make your first attempts with a read-only connection (see "What can it access?").

How Do You Connect PostHog MCP? Steps by Assistant

There's nothing to install on the PostHog side. If you don't have an account, first create a free one at PostHog. When you connect, a PostHog sign-in opens in the browser; the server picks the US or EU region from the account you sign in with.

  1. In Claude, open Customize then Connectors, find PostHog in the directory and click Connect.
  2. When prompted, sign in to PostHog and approve access.
  3. Write what you want to ask PostHog in a chat; confirm in the chat tools menu that the connector is on.

PostHog's documentation describes the connector with the path "Settings > Connectors"; the current Claude path is Customize then Connectors. If you added PostHog to your team as an admin, your own account still isn't connected: if the connector shows "Remove from your team" instead of "Connect", each member connects their own account separately. On Claude Team and Enterprise, the Owner first enables the connector for the organization.

Which Tools Does PostHog MCP Offer?

PostHog's tools reference lists tools in 72 categories as of November 23, 2026, and the category counts add up to about 1,320; the Claude connector directory shows 57 tools. The two numbers differ and the list changes fast; for the current list, list the tools in your client or check PostHog's tools reference. Tool names are stable and can be used with the tools parameter to narrow a session to certain tools.

CategoryTool countWhat for
Error tracking35List error groups, read stack traces, mark an issue resolved, write assignment rules
Feature flags33Create, update and delete flags
Experiments51Set up an A/B experiment and read its results
Product analytics and insights18 + 3Trend, funnel and path queries; create insights
Dashboards19Create dashboards, add insights, delete them
SQL and data warehouse28 (+ 1 SQL)Run HogQL and SQL (execute-sql), manage tables
Logs and session replays24 + 9Query logs and look at recordings
Surveys, persons, workflows11 + 7 + 61Manage surveys, read and delete person records, build workflows
CDP destinations and functions14 + 2Set up and test destinations such as Slack

This table is picked from the category headings in the tools reference; categories change over time. PostHog's documentation says some tools use a language model: those are listed only if the organization admin has turned on PostHog AI data processing, and they can be billed as PostHog AI spend.

Which Assistants Does PostHog MCP Work With?

Claude and other chat assistantsAsk about product data from a chat and have insights and dashboards built.Web, Desktop · A PostHog account; on a Claude team account the Owner enables the connector · details
Claude Code, Cursor, Codex, VS CodeRun error, flag and experiment work from the editor while you code.Code editor, Terminal · A PostHog account; OAuth or a personal API key · details
ClaudeYesAs a directory connector, on the Claude Desktop page and on the web.
Claude CodeYesOne command or the plugin.
Cursor, VS Code, CodexYesPostHog has a setup page for each client.
Windsurf, Zed, PostHog DesktopYesListed on PostHog's MCP overview page.
Lovable, Replit, v0YesPostHog gives separate integration pages for these platforms.
ChatGPTUnclearPostHog's documentation gives no separate setup page for ChatGPT; it says it "works with any MCP-compatible client." Check in ChatGPT's settings whether it can connect to a remote MCP server.

What Can PostHog MCP Access and Change? Read-only Mode

Reads
  • Events, properties, insights, dashboards
  • Flags, experiments, surveys, error records, logs
  • Session recordings, person and group records, data warehouse tables
Writes

Creates and updates flags, experiments, surveys, dashboards, insights, alerts, notes and actions; marks an error issue resolved and writes assignment rules; sets up CDP destinations and workflows; writes email templates. The examples in the documentation also include enabling a workflow and linking an issue to a Jira record. An enabled workflow or a CDP destination you set up goes live and can send messages and data to your users or to outside targets such as email or Slack; ask the assistant for confirmation before enabling it.

Deletes

The tools reference has delete tools: dashboards (dashboard-delete), person records (persons-bulk-delete), flags, alerts, notes and more. The reference doesn't describe a separate way to undo.

Whose permissions

With the permissions of the PostHog account you sign in with. It works in the projects that account can reach; the assistant can switch to another project (switch-project).

If the assistant misreads a request, it can switch a live feature flag on or off or write to the wrong project; so in the first days make the connection read-only, and have it show the list before deletions and bulk changes. PostHog also asks you to review tool calls before they run.

Four ways to narrow permissions (PostHog docs)

Read-only: if readonly=true is added to the server address (or the header x-posthog-read-only: true), the tools that create, update and delete data are removed from the list.

Read-only address (format from the documentation)› https://mcp.posthog.com/mcp?readonly=true

Tool filter: a parameter such as features=flags,dashboards,insights opens only the tools in those categories; tools= also takes individual tool names.

Project restriction: on the OAuth screen choose "Projects" under "Organization & project access" and tick only the projects the assistant should reach; other projects are refused with a 403. With a personal API key, use a project-scoped key.

Approving writes separately: with split_writes=true, exec-read and exec-write are listed instead of exec; your client can always allow one and ask every time for the other.

Rate limit: before a request reaches the PostHog API, the server applies its own limit: 480 requests a minute and 4,800 an hour per credential (an OAuth token or a personal API key). Over the limit you get a 429 with a Retry-After header; opening a session and asking for the tool list count too.

Where Does the Data Go? EU and US Region

Region

PostHog's authentication server routes you to the US or EU region based on the account you sign in with. An account in each region needs its own connection; with one account in the EU and one in the US you set up two connections.

Does the server store it

According to PostHog, the MCP server doesn't store your analytics data; the query runs in your project and the result goes to the assistant.

What reaches the assistant

Query results enter the chat and are subject to the data settings of the assistant's company. Product analytics can carry personal data such as person profiles and session recordings; data-protection duties such as KVKK are yours. Claude's pricing page shows the model training row as "Opt-out" for Free, Pro, Max and Ultra; check your chat setting.

AI data processing approval

Some tools that use a third-party language model internally are listed only if the organization admin has turned on PostHog AI data analysis (Settings then Organization then General).

Source: PostHog MCP FAQ, the PostHog AI access page, claude.com/pricing, November 23, 2026. This is not legal advice.

Is PostHog MCP Free? Which Plan Do You Need?

According to PostHog, connecting to the MCP server and calling its tools is free. The data you query counts toward PostHog's normal usage bill; on the free plan each product has a monthly free allowance. Some tools that use a language model internally can be billed as PostHog AI spend. On the Claude side, web connectors are available to all users according to Anthropic. Enterprise-managed authorization (bulk connection through your identity provider) needs the Scale or Enterprise platform add-on at PostHog, and a Team or Enterprise plan and the Owner role in Claude.

Free$0 no card needed
  • Product analytics: 1 million events a month
  • Session replay: 5,000 recordings a month
  • Feature flags: 1 million requests a month
  • Surveys: 1,500 responses a month
  • 1 project, 1 year of data retention
  • Usage above the free allowance
  • 6 projects and 2-year retention
Paid (pay as you go)$0 base usage above the free allowance
  • The same monthly free allowance on every product
  • Above that, by usage; the unit price drops as volume grows
  • 6 projects, 2-year retention
  • Email support

There are no per-seat charges. The pricing page doesn't mention MCP separately; the numbers above are from the general plan summary. For example, in product analytics the price after the first 1 million events starts at $0.00005 per event.

Source: posthog.com/pricing, November 23, 2026. PostHog has no Turkish price page or TL price; paying by card from Turkey isn't clear in the official sources. This is not financial advice.

Official pricing page last checked on .

Does It Work in Turkish?

PostHog interfaceUnclearPostHog's documentation doesn't mention a Turkish interface option; check the interface language list in PostHog's settings.
Turkish requests and repliesUnclearThe reply language depends on the assistant; PostHog's MCP documentation says nothing specific about Turkish. Your event and property names can be in Turkish.
MCP documentationNoThe documentation is in English.

Common Problems and Fixes

What happensWhat to do
The connector shows "Remove from your team" instead of "Connect"PostHog was added to your team but your account isn't connected. In Claude's settings click Connect on PostHog and sign in.
A 429 errorYou went over the rate limit (480 a minute, 4,800 an hour per credential). Wait the Retry-After time; if you keep hitting it, use batch exports or endpoints. Each client session also spends requests before any tool call.
Tools that use a language model are missingThe organization admin may not have turned on PostHog AI data analysis: Settings then Organization then General.
I signed in but no project is foundThe region (US or EU) of the account you signed in with may not match the project's region; each region's account needs its own connection.
The assistant works in the wrong projectPin the connection to the project (the project_id parameter or the x-posthog-project-id header) and limit projects on the OAuth screen. Pinning is not an access limit, only the starting project.
It mixes up several accountsAdd a separately named server entry for each account; take care not to authorize all of them with the same account through OAuth. A personal API key ties each entry to one account.

For help, use PostHog's questions page and in-app support; the documentation recommends reviewing tool calls before they run (a prompt-injection risk).

How Do You Disconnect It?

  1. Claude: find PostHog under Customize then Connectors and disconnect it.
  2. Claude Code: remove the server with claude mcp remove posthog; if you installed the plugin, remove it from the /plugin menu.
  3. If you used an API key: invalidate the old connection by deleting the personal API key in PostHog.

After you disconnect, the flags, experiments and dashboards the assistant created in PostHog stay where they are.

Related Tools in the Atlas

Frequently asked questions

What is PostHog MCP?

The official MCP server hosted by PostHog. It opens your PostHog project to assistants such as Claude, Cursor, Codex and VS Code with your permissions: it queries events, summarizes errors and experiments, and creates flags, experiments and dashboards. The server runs at PostHog and needs no installation.

How do I connect PostHog to Claude?

In Claude, open Customize, then Connectors, find PostHog in the directory and click Connect; sign in to PostHog. If it was added to your team but isn't connected, click Connect on the connector yourself. On a team account, the Owner first enables the connector for the organization.

What is the PostHog MCP server URL?

The address is https://mcp.posthog.com/mcp. PostHog's authentication server picks the US or EU region from the account you sign in with.

Can I use PostHog MCP in Claude Code?

Yes. You can add the server with the claude mcp add command from the PostHog documentation, or install the plugin with claude plugin install posthog; then sign in through the browser with /mcp. The plugin also brings a hook that asks for approval before write tools.

Is PostHog MCP paid?

According to PostHog, connecting to the MCP and calling its tools is free. The data you query counts toward your PostHog usage bill; on the free plan each product has a monthly free allowance (for example 1 million events a month). Some tools that use a language model internally can be billed as PostHog AI spend.

Can PostHog MCP delete my data, and is it safe?

It works with your PostHog permissions; delete tools exist (for example for dashboards and person records). You can narrow permissions by adding readonly=true to the server address or by limiting projects on the OAuth screen. Review the assistant's tool calls before they run and have it show the list before deleting.

Does PostHog MCP keep data in the EU region?

The server routes you to the region of the account you sign in with (US or EU) and, according to the documentation, doesn't store your analytics data; the query runs in your project. The results do pass into the chat and are subject to the assistant company's data settings. EU and US need separate connections.

Related guides

Sources

Not clear in the official sources: The tool count (the Claude directory shows 57, the tools reference counts about 1,320) · whether it connects to ChatGPT (the documentation only says "any MCP-compatible client") · a Turkish PostHog interface (check PostHog's language settings) · paying by card from Turkey and a TL price. Each is covered in its section, along with what you can do.

You can do it yourself; if you’d like support

The guide is free and needs no sign-up; you can follow the steps here yourself. If you’d like professional support at some point, choose the option that fits your needs. This doesn’t affect the rankings in the guide.