Prerequisites
- A PostHog account with access to the project you want CloudThinker to read.
- Permission to create a personal API key. PostHog allows up to 10 personal API keys per user.
- A project that is receiving events. Analytics and error questions need ingested data; a project with no events returns an empty answer, not a broken connection.
PostHog does not charge for the MCP connection or for its tool calls. A few AI-powered tools bill as PostHog AI spend and need AI data processing enabled in your project.
Setup
1
Open the personal API key page
In PostHog, go to Settings → Personal API keys, or open the MCP preset link directly.
2
Create the key
Click + Create a personal API Key and give it a label such as
CloudThinker.3
Choose the scopes
Select the MCP Server preset. PostHog describes it as scoping access to a specific project. Without the preset, select only the scopes you need; PostHog recommends selecting only the scopes required for what you really use.
4
Copy the key value
Copy the value immediately. PostHog shows a personal API key once and never displays it again after you refresh the page. Keys begin with
phx_.5
Connect in CloudThinker
Go to Connections → PostHog, paste the key into POSTHOG_PERSONAL_API_KEY, select your POSTHOG_REGION, then click Connect.
Connection details
PostHog Cloud US and PostHog Cloud EU are separate instances that serve different hosts, and PostHog directs API requests to the host where the instance lives. Select US if you sign in at
us.posthog.com and EU if you sign in at eu.posthog.com.
Required permissions
CloudThinker cannot reach anything the key’s scopes exclude. A scope is a resource paired with read or write access, for exampleinsight:read.
Agent capabilities
Once connected, Alex can:Verify the connection
Example prompts
Every call asks for approval
PostHog’s MCP server has hundreds of tools, so it serves them behind a single command tool that runs the rest. That one tool can reach every change PostHog allows, so CloudThinker classifies it as a write and never lets it run unattended. The practical effect: PostHog calls pause for your decision, including ones that only read. In Manual mode the call waits for your approval. In Auto mode the classifier decides each call and records the outcome. See Auto Mode and Approvals.Troubleshooting
Every call fails with an authentication error
Every call fails with an authentication error
The key belongs to the other PostHog cloud, or it was revoked. Confirm POSTHOG_REGION matches the host you sign in to, then create a fresh key on that instance and reconnect.
The agent sees the wrong project
The agent sees the wrong project
One connection has one active project. Ask the agent to switch projects and approve the change, or add a second PostHog connection scoped to the other project.
Calls start failing after heavy use
Calls start failing after heavy use
Calls run against PostHog’s API and are subject to its rate limits, which are shared across all users and keys in your organization. There is no separate limit for this connection. Wait for the window to reset, then narrow the question so the agent reads less.
I lost the key value
I lost the key value
PostHog shows a personal API key once. Create a new one and update the connection; you cannot recover the original.
A read paused for approval
A read paused for approval
That is expected. PostHog’s whole tool surface arrives as one command tool that CloudThinker treats as a write, so reads pause too.
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- Scope the key tightly — PostHog states a personal API key can enable full access to your account, like logging in with your email and password. Use the MCP Server preset, and keep the key dedicated to CloudThinker so you can revoke it alone.
- Your project API token stays out of chat — the agent reads project details through a path that drops the token, so it is never quoted back into a conversation.
- Review before you approve — PostHog advises reviewing MCP tool calls before running them. The approval prompt shows the exact inputs first.
Related
Alex Agent
Cloud and observability investigation agent
Approvals
How CloudThinker gates a write behind your confirmation