MCP Gateway · Claude
Connect PostHog to Claude
Product managers, marketers and founders can ask Claude about their PostHog data in plain language. Claude runs the query, finds an insight someone already built, or reports how a survey is performing. Each person connects through the organization's custom connector, and the gateway limits them to the PostHog tools their role allows.
- Category
- Data & analytics
- Tools
- 172
- Authentication
- API key
- Claude
- Web, desktop and mobile
Behind the MCP Gateway
Run PostHog MCP behind the MCP Gateway
One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every PostHog call inspected and logged.
Set up
Add PostHog to Claude in 4 steps
- 01
Add PostHog from the catalog
An admin finds PostHog in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.
PostHog authenticates with an API key. Enter it under Upstream headers in the install dialog, or later on the server's Settings tab. The key is stored on the server, sent with every upstream request, and never reaches anyone's client configuration.
Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.
- 02
Choose who can use PostHog
Give teams the
mcp:connectscope on the PostHog server through team access or a role. The organization gateway works out each person's servers from their live access, so granting access adds PostHog to their gateway on the next call, and removing it takes it away. - 03
Connect Claude
Add the gateway URL as a custom connector, then connect it from Customize > Connectors.
On Team and Enterprise plans, an Owner opens Organization settings > Connectors, chooses Add > Custom > Web and pastes the gateway URL.
Each person opens Customize > Connectors and clicks Connect to sign in.
On Pro and Max plans, each person adds it themselves under Customize > Connectors, with + Add > Add custom connector.
- 04
Sign in and use PostHog from Claude
The first time Claude connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.
From then on, PostHog's tools appear in Claude, limited to what the person's access allows, and every call lands in the gateway's tool logs.
No client ID or secret is needed: the gateway's sign-in handles client registration. Each person only sees the servers their role can reach.
Use cases
What Claude users do with PostHog
Answer a product question
Ask how many people signed up last week, or which pages new users visit first. Claude writes and runs the query against your PostHog data and explains the result.
Find an insight someone built
Describe the chart you remember. Claude searches PostHog entities by name and description, finds the insight and returns its current results.
Check how a survey is doing
Claude gets response statistics for a survey, including how often it was shown, dismissed and answered, and summarizes whether it needs changes.
Tools
172 tools
Each PostHog tool can be allowed or denied per team and role at the MCP Gateway before Claude sees it.
docs-search
Use this tool to search the PostHog documentation for information that can help the user with their request. Use it as a fallback when you cannot answer the user's request using other tools in this MCP. Only use this tool for PostHog related questions.
experiment-get-all
Get all experiments in the project.
experiment-create
Create a comprehensive A/B test experiment. , ['product_view', 'add_to_cart', 'purchase']) and use funnel_steps parameter 6) Configure variants (default 50/50 control/test unless they specify otherwise) 7) Set targeting criteria if needed.
experiment-delete
Delete an experiment by ID.
experiment-update
Update an existing experiment by ID. Can update name, description, lifecycle state, variants, metrics, and other properties. RESTART WORKFLOW: To restart a concluded experiment, set end_date=null, conclusion=null, conclusion_comment=null, and optionally set a new start_date.
experiment-get
Get details of a specific experiment by ID.
Control
What Speakeasy can see and stop in Claude
The gateway covers every client the same way. The rest depends on what Claude exposes to Speakeasy.
Tool logs
Gateway
Every PostHog call is logged with the person and the client that made it.
Access by role
Gateway
People reach only the PostHog tools their team or role allows.
Request and response blocking
Gateway
A risk policy scoped to PostHog can reject a tool request before it reaches the server, or withhold a result from Claude. MCP-scoped policies are enabled per organization.
Anthropic inference hooks
Claude
On Claude Enterprise, each prompt is sent to Speakeasy before inference and denied prompts are blocked (beta). Inference hooks can't rewrite or redact a prompt.
Conversation import
Claude
Claude conversations can be imported through Anthropic's Compliance API for review after the fact.
- Custom connectors need a Claude plan that supports them.
- Budgets don't cover Claude web and desktop usage.
Questions
Frequently asked questions
Can product managers use PostHog in Claude without changing flags?
Can PostHog prompts in Claude be checked before they run?
How do Claude users get PostHog?
Are PostHog calls from Claude logged?
Connect more