Claude Code
Add PostHog's marketplace, then install the plugin
Run both lines in a terminal. They install PostHog's posthog plugin: this skill, PostHog's other skills, and a connection to PostHog's hosted MCP server.
- 01
claude plugin marketplace add PostHog/ai-plugin - 02
claude plugin install posthog@posthog
Installation and loading
- The plugin installs for you in every project and loads the next time you start Claude Code, or after
/reload-pluginsin an open session. - To connect your PostHog account, start
claude, type/mcp, selectplugin:posthog:posthogand follow the browser prompts.
Good to know
- The plugin includes PostHog's session-capture hook; PostHog's README says it sends sessions to LLM Analytics only when
POSTHOG_LLMA_CC_ENABLED=trueandPOSTHOG_API_KEYare both set. - If you use the separate posthog-telemetry plugin, PostHog says to keep only one of the two, because both register the same hook.
- On a self-hosted PostHog, this route's MCP connection won't reach your instance: the plugin's config is fixed to
https://mcp.posthog.com/mcp, which routes to PostHog's US or EU region.POSTHOG_MCP_URLworks only for the Gemini CLI extension.
