Co-Pilot
Updated 24 days ago

posthog-for-claude

PPostHog
0.0k
posthog/posthog-for-claude
76
Agent Score

💡 Summary

PostHog for Claude integrates analytics, feature flags, and error tracking directly into Claude Code.

🎯 Target Audience

Product ManagersData AnalystsSoftware DevelopersMarketing TeamsUX Researchers

🤖 AI Roast:Powerful, but the setup might scare off the impatient.

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); API keys/tokens handling and storage. Run with least privilege and audit before enabling in production.

PostHog for Claude

Official PostHog plugin for Claude Code. Access your analytics, feature flags, experiments, and error tracking directly from Claude.

Installation

From Claude Code

claude plugin install posthog

Manual installation

  1. Clone and install the plugin:
git clone https://github.com/PostHog/posthog-for-claude claude --plugin-dir ./posthog-for-claude
  1. Authenticate via OAuth:
/mcp

Then follow the browser prompts to log in to PostHog.

Features

This plugin provides access to 27+ PostHog tools across these categories:

  • Feature flags - Create, update, and manage feature flags
  • Experiments - Run and analyze A/B tests
  • Insights - Query analytics and create visualizations
  • Dashboards - Manage dashboards and add insights
  • Error tracking - View and debug errors
  • LLM analytics - Track AI/LLM costs and usage
  • Documentation - Search PostHog docs

Slash Commands

  • /posthog:flags - List and manage feature flags
  • /posthog:insights - Query analytics and create visualizations
  • /posthog:errors - View and debug error tracking data
  • /posthog:experiments - Manage A/B testing experiments
  • /posthog:dashboards - Create and manage dashboards
  • /posthog:surveys - Create and manage user surveys
  • /posthog:query - Run HogQL queries and natural language analytics
  • /posthog:logs - Query application logs
  • /posthog:llm-analytics - Track AI/LLM costs and usage
  • /posthog:docs - Search PostHog documentation
  • /posthog:actions - Manage PostHog actions
  • /posthog:search - Search across all PostHog entities
  • /posthog:workspace - Manage organizations and projects

Example Usage

> What feature flags do I have?
> Create a feature flag called new-onboarding for 50% of users

> Show me errors from the last 24 hours
> Which errors are affecting the most users?

> How many users signed up this week?
> What's the conversion rate for the checkout funnel?

> Show me all my experiments
> What are the results of the checkout-flow experiment?

> Create a new dashboard called Product Metrics
> Add the signup funnel insight to the Growth dashboard

> What are the responses to the NPS survey?
> Create a feedback survey for the checkout page

> What's my most triggered event?
> Show me the top 10 pages by pageviews

EU Cloud

If your PostHog project is on EU Cloud, set the POSTHOG_MCP_URL environment variable:

# Add to your ~/.zshrc or ~/.bashrc export POSTHOG_MCP_URL="https://mcp-eu.posthog.com/mcp"

Then restart Claude Code or open a new terminal session.

Self-hosted

For self-hosted PostHog instances, set the POSTHOG_MCP_URL environment variable to point to your instance:

export POSTHOG_MCP_URL="https://mcp.your-posthog-instance.com/mcp"

Documentation

License

MIT

5-Dim Analysis
Clarity8/10
Novelty6/10
Utility9/10
Completeness8/10
Maintainability7/10
Pros & Cons

Pros

  • Comprehensive access to PostHog tools.
  • Streamlined analytics and error tracking.
  • Supports A/B testing and feature management.

Cons

  • Requires OAuth authentication.
  • May require environment variable setup for EU Cloud.
  • Dependency on PostHog service availability.

Related Skills

agno

S
toolCode Lib
90/ 100

“It promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”

mcp-builder

S
toolCode Lib
90/ 100

“This guide is so comprehensive it might just teach the AI to write its own MCP servers and put you out of a job.”

japanese-webdesign

A
toolCo-Pilot
88/ 100

“Powerful, but the setup might scare off the impatient.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author PostHog.