Back to Home
PostHog icon

mcp

Verified Safe

by PostHog

Overview

Provides an AI agent toolkit and server implementation to interact with PostHog analytics data, manage feature flags, create insights, and perform other analytics tasks through natural language queries.

Installation

Run Command
pnpm run dev

Environment Variables

  • POSTHOG_PERSONAL_API_KEY
  • OPENAI_API_KEY
  • POSTHOG_API_BASE_URL
  • POSTHOG_MCP_URL
  • INKEEP_API_KEY

Security Notes

The server expects sensitive API keys via Authorization headers or environment variables, which is standard practice. A hardcoded PostHog project API key ('sTMFPsFhdP1Ssg') is used internally for the MCP server's own analytics tracking, not for accessing user-specific data. The `userHash` for caching uses PBKDF2 with a fixed salt ('posthog_mcp_salt'); while not a direct vulnerability, this is less ideal than a unique random salt per user if cache integrity were a primary security boundary. The linter rule `noExplicitAny: 'off'` can subtly hide type-related bugs.

Similar Servers

Stats

Interest Score58
Security Score8
Cost ClassMedium
Avg Tokens2000
Stars142
Forks25
Last Update2026-01-19

Tags

PostHogAI AgentsAnalyticsFeature FlagsInsightsCloudflare WorkersLangChainAI SDKModel Context Protocol