mcp
14
PostHog MCP is a server allowing users to leverage PostHog functionality via the Model Context Protocol. It provides users with insights into feature flags and errors, enhancing user experience through a desktop client interface.
PostHog MCP
Use the MCP Server
-
Obtain a personal API key on PostHog with appropriate permissions
-
Add the MCP configuration to your desktop client (e.g. Cursor, Windsurf, Claude Desktop) and add your personal API key
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://mcp.posthog.com/sse",
"--header",
"Authorization:${POSTHOG_API_TOKEN}"
],
"env": {
"POSTHOG_API_TOKEN": "Bearer {INSERT_YOUR_PERSONAL_API_KEY_HERE}"
}
}
}
}
Here are some examples of prompts you can use:
- What feature flags do I have active?
- Add a new feature flag for our homepage redesign
- What are my most common errors?
Running locally
Environment variables
- Create
.dev.vars
in the root - Add Inkeep API key to enable
docs-search
tool (seeInkeep API key - mcp
)
INKEEP_API_KEY="..."