Skip to content

A Kiro Power for querying PostHog analytics, managing feature flags, experiments, and surveys directly from your IDE

Notifications You must be signed in to change notification settings

llamojha/posthog-kiro-power

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

PostHog Kiro Power

A Kiro Power for interacting with PostHog analytics directly from your IDE.

Features

  • Insights & Analytics - Run trends, funnels, and HogQL queries
  • Feature Flags - Create, update, and manage feature flags
  • Experiments - Set up and analyze A/B tests
  • Surveys - Create surveys and view response statistics
  • Error Tracking - List and investigate application errors
  • Dashboards - Create and manage analytics dashboards
  • LLM Analytics - Track AI/LLM costs across models

Installation

Prerequisites

  1. A PostHog account at posthog.com
  2. A Personal API Key with MCP Server preset:

Install in Kiro

  1. Open Kiro
  2. Open the Powers panel (Command Palette → "Open Powers")
  3. Click "Add Custom Power"
  4. Choose one of:
    • Local Directory: Clone this repo and provide the path to powers/posthog
    • Git Repository: Use this repo URL (once published)
  5. Update the API key in the power's mcp.json:
    "POSTHOG_AUTH_HEADER": "Bearer phx_your_api_key_here"

Usage

Once installed, Kiro will automatically activate the PostHog power when you ask about:

  • Analytics, funnels, or user behavior
  • Feature flags or experiments
  • Surveys or user feedback
  • Error tracking
  • PostHog-related queries

Example Prompts

  • "Show me the signup funnel conversion for the last 7 days"
  • "Create a feature flag for the new checkout flow at 10% rollout"
  • "What errors are users seeing in production?"
  • "Set up an A/B test for the pricing page"
  • "How many daily active users do we have?"

Configuration

The power uses PostHog's remote MCP server. Configuration is in powers/posthog/mcp.json:

{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://mcp.posthog.com/mcp",
        "--header",
        "Authorization:${POSTHOG_AUTH_HEADER}"
      ],
      "env": {
        "POSTHOG_AUTH_HEADER": "Bearer YOUR_PERSONAL_API_KEY_HERE"
      }
    }
  }
}

If your client doesn't support Streamable HTTP, use the SSE endpoint instead:

https://mcp.posthog.com/sse

Documentation

Contributing

Contributions welcome! Please open an issue or PR.

About

A Kiro Power for querying PostHog analytics, managing feature flags, experiments, and surveys directly from your IDE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published