How to connect Claude to PostHog

Create a PostHog personal API key, connect PostHog once in Ryze AI, add one MCP URL to Claude, then ask about insights, funnels, flags and cohorts.

Your MCP URL
https://connector.get-ryze.ai/mcp

Copies the link and opens Claude, Customize, Connectors, Add custom connector. See the steps

See pricing

By Ira Bodnar, Ryze AI · Updated

Quick answer

To connect Claude to PostHog, create a PostHog personal API key, paste it with your host into the PostHog card in Ryze AI, then add https://connector.get-ryze.ai/mcp as a custom connector in Claude and start a new chat.

  1. In PostHog create a personal API key with the Query and Insight scopes
  2. In Ryze AI open Integrations, click Connect on PostHog, paste the key and host, pick the project
  3. In Claude open Customize, Connectors, Add custom connector and paste the URL
  4. Click Connect, pick the workspace, click Allow connection, open a new chat

Before you start

  • A Claude account. Anthropic lists custom connectors using remote MCP on Free, Pro, Max, Ultra, Team and Enterprise plans. Free users can add one custom connector. On Team plans only Owners and Primary Owners can add a custom connector; on Enterprise plans Owners, Primary Owners and people with a custom role that includes Manage access to Libraries can. Members then connect to it individually.
  • A PostHog personal API key. It starts with phx_ and needs read access to the project, including the Query and Insight scopes. Add write scopes only if Claude should change objects. You also need the host: https://us.posthog.com for US Cloud, https://eu.posthog.com for EU Cloud, or your self-hosted URL.
  • A Ryze AI workspace on a plan or free trial. Paid Ads is $89 per month with a 7-day free trial. The PostHog tools also work on SEO Starter ($129 per month, 3-day free trial) and Agency ($279 per month). Connecting the connector is free; without an active plan or trial, Claude can only list workspaces and connect platforms.

How to connect Claude to PostHog in claude.ai

Three steps happen in PostHog and Ryze AI, three in Claude. The connector URL is the same for every user.

  1. Create a personal API key in PostHog

    In PostHog go to Settings, Personal API keys and click Create key. Grant read access to the project with the Query and Insight scopes, add write scopes only for objects Claude should change, and copy the phx_ key.

  2. Connect PostHog in Ryze AI

    In the Ryze AI app open Integrations, click Connect on the PostHog card, paste the key, enter the Host (US Cloud, EU Cloud or your self-hosted URL) and click Continue.

  3. Pick the project

    Choose the PostHog Project and click Save. One PostHog connection holds one project.

  4. Add the custom connector in Claude

    In claude.ai open Customize, Connectors (claude.ai/customize/connectors). Click + Add, then Add custom connector. Enter the name Ryze AI and the remote MCP server URL https://connector.get-ryze.ai/mcp, click Continue, review the authentication settings Claude detected and click Continue. Do not choose No sign in: the Ryze AI server requires OAuth sign-in.

  5. Click Connect and allow the workspace

    Click Add, then click Connect on the Ryze AI connector. On the Ryze AI page Connect your data sources to AI, sign in (or click Sign up), choose the workspace that holds PostHog under Workspaces and click Allow connection. One connection can cover up to 20 workspaces.

  6. Open a new chat and ask your first question

    Start a new chat. Connectors can be turned on or off per conversation from the + button, Connectors. Ask: List my PostHog dashboards and feature flags.

The Ryze AI PostHog guide covers the PostHog side of the connection, and the Claude connector FAQ covers the connection errors.

Claude Desktop, Team plans and the Claude Directory

Anthropic says Claude reaches a remote MCP server from Anthropic's cloud, not from your device, on every Claude client including Desktop, Cowork and the mobile apps. So the steps are the same in Claude Desktop: open Customize, Connectors and add the URL. The other paths are below.

Team and Enterprise organizations

  1. An Owner or Primary Owner (on Enterprise, also a person with a custom role that includes Manage access to Libraries) opens Organization settings, Connectors and clicks Add.
  2. Hover over Custom, select Web, enter the name Ryze AI and the URL https://connector.get-ryze.ai/mcp, then click Continue.
  3. Review the authentication settings, choose Sign in now or Sign in when needed (not No sign in), then click Add.
  4. Each member opens Customize, Connectors, finds Ryze AI (usually labeled Custom) and clicks Connect, signs in on the Ryze AI page, picks workspaces, clicks Allow connection and starts a new chat.

Claude Directory listing

  1. Open the Ryze AI listing at claude.ai/directory/ryze-ai. The listing carries the Community label: it has had automated reviews but is not verified by Anthropic.
  2. Sign in to Claude (when signed out the button reads Sign in to add) and add the connector from the listing.
  3. Complete the Ryze AI sign-in, choose workspaces, click Allow connection and start a new chat.

Claude Code, ChatGPT and Cursor

The same URL works in other MCP clients. PostHog is connected once in Ryze AI, so nothing changes on the PostHog side.

Claude Code

Run claude mcp add --transport http ryze https://connector.get-ryze.ai/mcp, then run /mcp inside Claude Code, select ryze and authenticate, and choose workspaces on the Ryze AI page. Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account; the free claude.ai plan does not include it.

ChatGPT

OpenAI lists full custom MCP server support on ChatGPT Business and Enterprise/Edu, and read and fetch only for Pro. On the web open Plugins (chatgpt.com/plugins), select the plus button, choose Add custom MCP server, enter the name Ryze AI and the URL, set authentication to OAuth and finish the Ryze AI sign-in.

Cursor

Add the entry below to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project), then sign in on the Ryze AI page and click Allow connection.

{ "mcpServers": { "ryze": { "url": "https://connector.get-ryze.ai/mcp" } } }

PostHog key scopes and permissions

PostHog access comes from the personal API key you paste into Ryze AI, so you set the limits when you create the key. Claude then adds its own per-tool approvals on top.

Read scopes
Create the key with read access to the project, including the Query and Insight scopes. That is enough for Claude to read insights, dashboards, flags, cohorts, persons and event definitions and to run HogQL queries.
Write scopes
Add write scopes only for the objects you want Claude to change. What the agent can change is limited by the scopes on the key. A key with read scopes only keeps Claude read-only, because PostHog rejects any change.
Host
Enter https://us.posthog.com for US Cloud, https://eu.posthog.com for EU Cloud, or the URL of a self-hosted instance. Ryze AI works with all three.
One project
One connection holds one PostHog project. To switch, click View on the PostHog card in Ryze AI, disconnect with the trash icon and connect again. Another project can live in another Ryze AI workspace.

Removing access

To remove access, disconnect PostHog with the trash icon on the card in Ryze AI. To cut it off at the source, delete the personal API key in PostHog under Settings, Personal API keys. PostHog also scans GitHub for exposed phx_ keys and rolls them automatically (PostHog docs).

What Claude can do in PostHog

The Ryze AI connector exposes three PostHog tools, one each for reading, writing and deleting. They act on the single project you picked.

ToolTypeWhat it does
posthog__readReadReads projects, insights, dashboards, feature flags, cohorts, persons and event definitions for the connected project, and runs HogQL analytics queries.
posthog__writeWriteCreates or updates PostHog objects such as insights, dashboards, feature flags and cohorts.
posthog__deleteDeleteDeletes a PostHog object by path, for example a cohort. The deletion is irreversible.

In Claude, open Customize, Connectors, Ryze AI, Tool permissions and set the write and delete tools to Needs approval. Reads then run on their own. Scheduled tasks run without an approval step, and the Ryze AI chat approvals picker starts on Skip all approvals, so the key scopes are the stronger guard. PostHog stops unbounded HogQL queries, so ask for a time window and a row limit of 1,000 at most.

First 3 prompts to run

These prompts describe what to ask. The answers come from your own PostHog project, so this page does not show sample numbers.

1. Inventory the project

List my PostHog dashboards, feature flags and cohorts, and tell me which dashboards have no insights on them.

Tools used: posthog__read

What comes back: A list of dashboards, flags and cohorts for the connected project, grouped by type.

2. Run a HogQL query

Run a HogQL query for the number of $pageview events per day over the last 14 days, limited to 1,000 rows, and give me the SQL you used.

Tools used: posthog__read

What comes back: One row per day with the event count, plus the query text so you can re-run it in PostHog.

3. Create an insight

Create a PostHog insight that counts unique users who triggered $pageview each week, name it Weekly visitors from Claude, and add it to a new dashboard.

Tools used: posthog__write

What comes back: The new insight and dashboard, created in your project. Set write tools to Needs approval in Claude first if you want to confirm the change.

Event names such as $pageview are PostHog defaults; use your own event names where they differ.

Ryze AI vs PostHog's own MCP server

PostHog runs its own MCP server, so there are two ways to reach PostHog from Claude. They suit different jobs.

OptionSetupPostHog coverageAuthWorks in
Ryze AI connectorPaste a personal API key and host into the PostHog card in Ryze AI, add https://connector.get-ryze.ai/mcp to Claude3 tools: read (with HogQL), write, delete for insights, dashboards, flags and cohortsPersonal API key in Ryze AI, OAuth to the connectorClaude, ChatGPT, Cursor and other clients in Ryze AI's client list
PostHog's own MCP serverAdd https://mcp.posthog.com/mcp, for example in Claude Code with claude mcp add --transport http posthog https://mcp.posthog.com/mcp -s user, or run npx @posthog/wizard mcp addTools across error management, analytics, feature flags, experiments, SQL and CDP destinations, per PostHog docsOAuth or personal API key; routes to your US or EU regionClaude Code, Claude Desktop, Cursor, VS Code, Windsurf, Zed, Codex, Lovable, Replit and v0, per PostHog docs

PostHog notes that connecting to its server is free, but some of its tools use LLMs internally and may be billed as PostHog AI spend, and AI tools need AI data processing enabled in organization settings. If you only work inside PostHog, its own server covers more PostHog areas. If you want one Ryze AI connector for several platforms or a plan-based setup, use the Ryze AI connector. See the full Ryze AI tool list on the PostHog MCP page.

Sources: PostHog MCP server, PostHog MCP for Claude Code, PostHog API and personal API keys, Anthropic custom connectors, Ryze AI PostHog guide, Ryze AI Claude connect guide. Checked November 10, 2026.

PostHog errors and fixes

PostHog tools do not appear in Claude
Claude keeps the Ryze AI tool list from the moment you add the connector. If PostHog was connected afterwards, remove the Ryze AI connector, add it again and start a new chat.
Claude says a subscription is required
The PostHog tools need an active Ryze AI plan or free trial. Without one the connector can only list workspaces and connect platforms.
PostHog rejects a change
The personal API key has read scopes only, or lacks the scope for that object. Create a key with the write scopes you want and reconnect PostHog in Ryze AI.
A query is refused or stops
PostHog stops unbounded HogQL queries. Ask Claude to add a time window and a row limit of 1,000 at most.
Queries are rate limited
PostHog documents limits per personal API key: 240 requests per minute and 1,200 per hour on analytics endpoints, and 2,400 per hour on the query endpoint. Wait and retry, or spread the questions out (PostHog docs).
The wrong project is connected
PostHog holds one project per connection. Click View on the PostHog card in Ryze AI, disconnect with the trash icon, connect again with the right key and pick the project.
The one-time connection link is refused
If you asked the Ryze AI agent in Claude to connect PostHog, the link is valid once and for 24 hours, and it is refused while PostHog is already connected in the workspace. Change keys or projects in the Ryze AI app.
The EU or self-hosted project fails to connect
Check the Host field. Use https://eu.posthog.com for EU Cloud and your own URL for self-hosted, not the US address.
Claude does not offer Ryze AI in a chat
Turn the connector on from the + button, Connectors, and start a new chat after connecting.

Frequently asked questions

How do I connect Claude to PostHog?

Create a PostHog personal API key with the Query and Insight scopes, open Integrations in Ryze AI, click Connect on the PostHog card, paste the key, enter the host and pick the project. Then in claude.ai open Customize, Connectors, Add custom connector, enter the name Ryze AI and the URL https://connector.get-ryze.ai/mcp, click Connect, allow the workspace and start a new chat.

Does PostHog have its own MCP server for Claude?

Yes. PostHog documents an MCP server at https://mcp.posthog.com/mcp that signs in with OAuth or a personal API key and routes to your US or EU region. Its docs list Claude Code and Claude Desktop among the supported clients. The Ryze AI connector is a separate path with three PostHog tools.

Which PostHog connector should I use with Claude?

If you only work inside PostHog, PostHog's own server lists more areas, such as error management and experiments. Ryze AI is the best PostHog connector for Claude when you want one connector with a Ryze AI plan behind it and a three-tool read, write and delete setup, but it covers fewer PostHog areas than PostHog's own server.

What PostHog access do I need?

A personal API key that starts with phx_, with read access to the project including the Query and Insight scopes, and the host for your region. Add write scopes only if Claude should change objects.

Which Claude plan do I need?

Anthropic lists custom connectors on Free, Pro, Max, Ultra, Team and Enterprise plans. Free users can add one custom connector. On Team and Enterprise an Owner adds the Ryze AI connector first, then each member clicks Connect.

Can Claude change or delete things in PostHog?

Yes, when you ask. posthog__write creates or updates insights, dashboards, feature flags and cohorts, and posthog__delete deletes an object by path, which is irreversible. A key with read scopes only keeps Claude read-only.

Can I require approval before Claude changes PostHog?

Yes. In Claude open Customize, Connectors, Ryze AI, Tool permissions and set the write and delete tools to Needs approval. Scheduled tasks run without an approval step.

Does Claude work with PostHog EU Cloud or self-hosted?

Yes. Enter https://eu.posthog.com for EU Cloud, https://us.posthog.com for US Cloud, or your self-hosted URL as the host when you connect PostHog in Ryze AI.

Can I connect more than one PostHog project?

Not in one workspace. A PostHog connection holds one project. Another project can live in another Ryze AI workspace, and one Claude connection can cover up to 20 workspaces.

Does it cost anything?

Connecting the connector is free. The PostHog tools need an active Ryze AI plan or trial: Paid Ads is $89 per month with a 7-day free trial, SEO Starter is $129 per month with a 3-day free trial and Agency is $279 per month. Annual billing takes 30% off the first year.

Why do the PostHog tools not show up in Claude?

Claude keeps the tool list from when you added the connector. Remove the Ryze AI connector, add it again and start a new chat.

Connect PostHog to Claude

One Ryze AI connector gives Claude PostHog tools for read, write and delete. The tools work on any active plan or trial; Paid Ads is $89 per month with a 7-day free trial; annual billing takes 30% off the first year.

PostHog MCP server

Need help? Read the Claude connector FAQ or email Ryze AI support.