Before you start
Connect PostHog with ?readonly=true on the address (https://mcp.posthog.com/mcp?readonly=true). Its docs say this removes every tool that creates, updates or deletes, so this recipe cannot change anything in PostHog. GitHub needs access to the repository you will file issues in. Run your agent from a checkout of that repository so it can read the code. PostHog's docs advise reviewing tool calls before they run: error messages come from your users' browsers, so treat them as untrusted text.
List the top errors
Start with a ranking so you can decide what is worth an issue.
Say to Claude CodeWhat are the top 5 errors in my project this week? For each one, give the error message, how many users it affects and when it was last seen.
Trace each one to the code
PostHog's docs show this pairing: the full stack trace for a crash, then a proposed fix. Asking for a cause first keeps the agent from editing files.