PostHog MCP Server
SoonConnect PostHog to Claude, ChatGPT, Grok, Perplexity, Claude Code, Codex, Cursor or Antigravity — one connection, from the subscription you already pay for.
The PostHog MCP server is a connector on HeyMetra. Authorise PostHog once with an API key and it becomes tools your assistant can call — reads, plus 1 tool that can change the account.
Example exchange
At a glance
- Category
- Analytics
- How you connect
- An API key
- Access
- Reads · 1 can write
- Status
- Soon
What PostHog is
PostHog is product analytics: every event your app or site sends, the funnels and retention built on top of them, the cohorts of people behind a number, session replays and feature flags. It is where "what did people actually do" is answered, as opposed to what an ad platform says it delivered.
What it can do, and what you can switch off
Each of these is a switch on the connection itself. Turn one off and the assistant is told, and cannot use it — so a team can read order volume without ever reaching the payouts. Where PostHog itself will not serve something, it says so here rather than answering as though there were nothing to find.
Direct API access
Reads and writes
Let your assistant use this account's own API for anything HeyMetra's other operations do not cover. It reads directly, and what comes back is the provider's own answer rather than a figure HeyMetra has checked. It can also propose changes — those are never applied until you approve them, and HeyMetra cannot undo one afterwards.
Limit A personal API key reaches the projects the person who made it can open, so a project nobody shared is invisible rather than empty.
Limit Event data is queried, not exported: a question spanning months of raw events is a query PostHog may refuse on time rather than a download that eventually finishes.
What it can change, and what stops it
These are the only tools here that write. Every other call reads. A write is checked against the ceilings below before anyone is asked to approve it, so a call that would breach one is refused rather than queued.
Propose a change through this account's own API, for operations HeyMetra does not cover. Nothing is sent until you approve it, and HeyMetra cannot undo it afterwards.
Held for your approval
The ceilings — how far one change can move a budget, how many campaigns it can touch, how many writes a workspace gets in a day — are on the security page. The four questions worth putting to any connector that can write — ours included — are the ones to ask before you authorise this one.
Setting it up
You generate a key in PostHog and paste it into HeyMetra. Then add HeyMetra as a remote MCP server where you ask.
-
Note the address you sign in at
Look at the address bar while you are signed in to PostHog. On PostHog Cloud it is us.posthog.com or eu.posthog.com, and either the single word — `us`, `eu` — or the whole address works. If your company runs PostHog itself, write the whole address you use, like analytics.acme.com.
Worth knowing app.posthog.com redirects to whichever region your account lives in, so follow the redirect and read the address afterwards rather than before. A key issued on one region is refused by the other, so this is not cosmetic.
-
Open Settings → Personal API keys
It is under your own account menu rather than the project's settings — a personal API key belongs to you, not to one project, and reaches every project you can open.
Worth knowing PostHog allows ten personal keys per person. Make one for HeyMetra rather than reusing the key in a script: revoking it later then costs nothing else.
-
Create a key with read scopes
Choose the scopes rather than granting everything. Reading needs Projects, Insights, Queries and Events — PostHog lists them as `project:read`, `insight:read`, `query:read` and `event:read`. Leave the write scopes off unless you intend to let your assistant propose changes.
Worth knowing If a scope turns out to be missing, PostHog answers 403 and names the one it wanted, so this is correctable rather than a guess you are stuck with.
-
Copy the key immediately
It starts with `phx_` and is shown once. Refreshing the page loses it, and there is no way to read it back — the only remedy is creating another one.
-
Paste it into HeyMetra and name the connection
On the Connections screen choose PostHog, paste the key, type the address from step one, and name the connection after the product rather than after PostHog. The key goes to the vault and is never shown again; HeyMetra proves it works against that address before keeping it.
When it does not work
These are the things that actually go wrong, written from what you see rather than from what caused it.
The key is rejected and it was copied correctly.
The address is the wrong one. A key issued in the EU account is not a key the US host has ever seen, and a key from a company's own installation is unknown to both — so all three read as a bad key rather than as a wrong address.
Fix Sign in to PostHog, read the address out of the address bar, and edit the connection to match.
You run PostHog yourselves and it is not reachable from the internet.
HeyMetra calls your installation from its own servers. An address that only resolves inside your network, or one behind a VPN, is not an address we can reach.
Fix Connect an installation that answers on a public address. There is no tunnel or agent to install, and nothing here can work around it.
It connects, but a question comes back with 403.
The key was made without the scope that question needs. Reading events and running a HogQL query are separate scopes, so one can work while the other does not.
Fix Add the scope in PostHog — the 403 names it — or create a key with the read scopes and replace this one with the pencil. The connection keeps its name and everything pointing at it.
Only some of your products appear.
A personal API key reaches the projects YOU can open. A project somebody else owns and never shared is not one of them.
Fix Ask to be added to that project in PostHog, then reconnect so the project list is read again.
Where you ask
Frequently asked
Is the PostHog connector available yet?
Not yet — PostHog is marked Soon. When it opens it is on every plan: plans differ in how many accounts you connect at once, never in which ones. The connectors page names everything that is ready today.
What can I ask about PostHog once it is connected?
Whatever the tools can answer — you type the question into Claude or ChatGPT, not into anything of ours. For example: “How many people signed up last week?” or “Where do people drop out of the onboarding funnel?”
Can HeyMetra change my PostHog account?
Only through 1 named tool, listed above with what each one does — and each call is checked against ceilings held in code before a person is asked to approve it. Everything else is read-only.
How do I connect PostHog to Claude or ChatGPT?
You connect PostHog to HeyMetra once — with an API key you generate in PostHog — and then add HeyMetra as a remote MCP server in whichever of them you use. There is a setup page here for each one.
What does the PostHog connector cost?
Nothing on its own. Plans are priced by how many connectors and seats you get, not per connector or per tool call, and every plan can reach every connector that is live. The pricing page carries the current figures.
Connectors next to this one
The other half of the question lives in a different category: App Store Connect data sits behind the same connection, which is what lets one answer cover both.
PostHog is not available yet
This page exists so it is ready when the connector is. Do not buy a plan for PostHog — tell us you want it instead, and we will say when it lands rather than when we hope it will.