Connect PostHog to your agents
A trial starts first, then a project installs PostHog from its marketplace.
PostHog MCP server
Let agents check PostHog before and after they ship a change
Install the PostHog MCP server in an Aldena project and agents query analytics with SQL, manage feature flags and experiments, and triage errors in PostHog.
- Sign-in
- Browser sign-in
- Installs as
posthog- Transport
- Streamable HTTP
PostHog is an open source product platform that bundles analytics, session replay, feature flags, experiments, error tracking, a data warehouse and more. Its free hosted MCP server lets an agent use PostHog through plain requests: query events with analytics queries or SQL, create and roll out feature flags, set up experiments, look into error tracking issues, manage CDP destinations and triage support tickets, acting as the person who signed in.
That breadth suits agents in an Aldena project that build and ship. An engineering agent working on a checkout change creates a feature flag, wires the check into the code in its conversation's sandbox, and opens the pull request through the GitHub connector. After the merge, it rolls the flag out to a small share of users and queries the conversion funnel over the next days, then reports whether the change helped. If the error tracker lights up, it turns the flag off, reads the stack trace, and writes the fix before rolling out again.
Each PostHog tool has its own row in the project's permissions, so changing a flag's rollout can wait for approval. For analytics alongside other tools, see the Amplitude MCP server, and for deeper error triage the Sentry MCP server.
With PostHog, your agents can
Run analytics queries and SQL over your PostHog events
Create, roll out and turn off feature flags
Set up experiments and read their results
Look into error tracking issues and their stack traces
Manage CDP destinations and triage support tickets
Try asking
Things to ask an agent in a project chat once it's installed.
“Create a PostHog feature flag called new-checkout, roll it out to 10% of users in Germany, and add the flag check to the checkout page in a branch.”
“Query PostHog for the signup funnel over the last 14 days and tell me which step lost the most users after Tuesday's release.”
“Look at the top PostHog error tracking issue from today, find the line that throws in our repo, and propose a fix.”
Server
- Server URL
https://mcp.posthog.com/mcp- Website
- posthog.com
- MCP docs
- PostHog MCP docs
How to connect PostHog
- Open Marketplace
In a project, open Settings → Connectors → MCP servers and press Marketplace.
- Install PostHog
Search for PostHog and press Install. Aldena adds it as
posthog. - Sign in to PostHog
Open the sign-in link Aldena shows and approve. The server then acts as you.
- Let agents use it
Agents find its tools with
mcp_searchand call them withmcp_call. Each tool gets its own row in the project's permissions.
Related MCP servers
FAQ
Does the PostHog MCP server cost extra?
Connecting to PostHog's hosted server and calling its tools is free. Some tools use an LLM internally and can be billed as PostHog AI spend, and those are only available when AI data processing is enabled for your organization. The rest of your PostHog usage is billed as usual.
Does PostHog's MCP server work for EU accounts?
Yes, with the same URL. PostHog's sign-in routes you to the US or EU data region based on the account you log in with, so the marketplace install works for both. The tools then act as you, in the project and organization you have access to.
How do flags and experiments fit an agent's coding work?
An agent building a risky change can ship it behind a PostHog flag it creates, roll it out to a small share of users, and read the results before going wider. If errors climb, it turns the flag off and says so in the chat, so the release is reversible without a deploy.
Ready when you are
Spin up your first project.
One project per client, product, or piece of work, staffed with intake, requirements, build and code review agents.