All integrations

Run agents with PostHog

Connect PostHog once, and every run that names it works in PostHog on the account you connected.

Connect PostHogOpens Settings → Connections in the console.

What an agent can do in PostHog

Query product analytics, feature flags, experiments, error tracking and logs, and build insights and dashboards.

Skills from PostHog's agent plugin that join every run reaching this server:

Jobs on Rush that use PostHog

How PostHog connects

PostHog is a remote MCP server, published by PostHog, at https://mcp.posthog.com/mcp. Connecting it signs in through the MCP OAuth flow on PostHog's side.

From PostHog: PostHog's MCP documentation · source code.

Connect it once in the console under Settings → Connections, or from your server with POST /me/connections. The sign-in finishes in a browser signed in to the console as the same person, and a link not finished within 10 minutes expires.

After that, a run that names posthog in connections, or runs a saved agent that names it, gets it; your connections reach no run that does not name them.

POST https://api.phoenix.so/me/connections

{
  "type": "mcp",
  "name": "PostHog",
  "url": "https://mcp.posthog.com/mcp"
}

Whose PostHog account the agent uses

Your PostHog connection is personal: it belongs to the person who signed in. A run started in the console uses that person's PostHog, and a run started with an API key uses the PostHog of the member who created the key.

To act for your own app's users, make each user an agent from your template and show them, signed in to your app, the sign-in link POST /o/{org}/agents/{agent}/connections returns. They sign in to their own PostHog, and that agent's runs use their account and nothing else: never yours, never another user's.

Frequently asked questions

How do I connect PostHog to Rush?

Open Settings → Connections in the console and connect PostHog, or send POST /me/connections with {"type":"mcp","name":"PostHog","url":"https://mcp.posthog.com/mcp"} and open the authorize_url it returns while signed in to the console. The connection reads pending until the sign-in finishes, then connected.

Does every run get my PostHog account?

No. A run gets your PostHog connection only when it names it in connections ("connections": ["posthog"]), or runs a saved agent that names it. A saved agent names its connections once, and every run of it gets them.

What can an agent do in PostHog?

Query product analytics, feature flags, experiments, error tracking and logs, and build insights and dashboards. 14 published jobs use it; this page lists them.

Which skills come with PostHog?

investigating-error-issue, investigating-logs, building-a-dashboard, from PostHog's own agent plugin, pinned to a commit. They join every run that reaches PostHog's MCP server, inside the run's 96 KiB skills limit.

Keep reading