PostHog MCP use cases
Contents
Once you've connected the PostHog MCP server, your agent can read and write across PostHog's products. Here's a tour of the most useful things to ask – click the copy icon next to any prompt to grab it for your own agent, then adapt it to your project.
For a real example, read how Runable uses agents in Claude Code, Codex, and its own product to run SQL, rank errors, and build dashboards in PostHog.
Single-prompt examples
Investigate bugs and errors
Triage and fix issues from your editor instead of context-switching to a browser. See the error tracking guide and logs guide for deeper walkthroughs.
"What are the top 5 errors in my project this week?" – Returns error groups ranked by occurrence with affected user counts.
"Show me the full stack trace for the most recent crash, then propose a fix." – Pulls the stack trace, error message, and metadata so the agent can suggest code changes.
"Show me error logs from the payments service in the last hour." – Filters logs by severity and service, returning timestamps, messages, and trace IDs.
"Mark this issue as resolved and assign all future TypeErrors to the backend team." – Updates issue status and creates an assignment rule in one go.
"Link the top error to Jira project BACKEND as a bug." – Creates an external reference linking the PostHog issue to a new Jira issue in the specified project.
Investigate ingestion health
Diagnose why events are missing, dropped, or degraded during ingestion. Useful for debugging instrumentation issues.
"What ingestion warnings has my project received in the last 24 hours?" – Returns recent ingestion issues like events dropped for invalid IDs, merge failures, or size limits.
"Show me all error-severity ingestion warnings with sample events." – Filters to critical ingestion problems and includes example events to help debug the root cause.
"Why are my person merges failing?" – Queries merge-related warnings explaining why identify or alias calls were rejected.
Explore product analytics
Ask data questions in plain English and get answers backed by a real PostHog query. See the analytics guide for more.
"How many unique users signed up in the last 7 days, broken down by day?" – Runs a trends query and returns daily counts.
"What are the most common paths users take after signing up?" – Executes a paths query that reveals the dominant journeys after the signup event.
"Show me the navigation paths from the pricing page to checkout." – Runs a paths query with start and end points to surface the routes that actually convert.
Manage path cleaning rules
Path cleaning rules normalize dynamic URLs – like /users/123 and /users/456 – into consistent patterns like /users/<id> so they appear as a single row in your analytics. Manage rules directly from your agent instead of editing them by hand in project settings. See the path cleaning docs for more on how rules work.
"Show me the current path cleaning rules for this project."











