Works with your agents
We're not writing much code by hand anymore and chances are neither are you.
Use the PostHog MCP to instrument tracking code, wrap a new feature in a flag, spin up a dashboard to monitor it, and even ask questions about feature usage – all without leaving your AI coding environment.
New to PostHog? Run the PostHog Wizard in your codebase to implement some basic tracking around your main features. It serves as an example of how it works and gives your AI agents the skills to instrument new features properly. Takes about ~8 minutes.
npx -y @posthog/wizard@latest
If you like your workflow, you can keep it
Using Claude Code, Cursor, or Codex? Add the PostHog MCP to utilize nearly all of PostHog's suite of analysis and data tools. Our tools are designed to work together – but if you'd rather start with only one or two products, you can do that too.
Try prompting your AI coding editor with…
- "Use the PostHog MCP to create a new experiment called "homepage-test" with two test variants and distribute traffic evenly"
- "Add PostHog tracking to this button and pass along UTM values as properties on the event"
- "When this form is submitted, create a PostHog workflow that sends a notification to my #alerts Slack channel."
If you're already using PostHog for analytics or debugging, you can ask questions about your data without leaving your editor. Examples:
- "Ask PostHog how many unique users clicked this button in the last 7 days"
- "Have there been any recent errors logged to PostHog in this component?"
But if you like trying new things…
PostHog Code, our AI code editor (available on desktop and soon on the web), has everything you've read about above, but also comes with features you can't get anywhere else.
- Signals – PostHog automatically monitors logs, errors, and summarizes session recordings to find patterns, then ships PRs to fix issues.
- Control Center – Monitor multiple agents all in one place
With PostHog Code you don't need a separate subscription to Claude Code or Codex – you get access to all the latest AI models directly within PostHog, and it costs about the same.