PostHog MCP Server Integration
Seamlessly integrate PostHog analytics, feature flag management, and error tracking into your FlowHunt AI workflows with the PostHog MCP Server.

What does “PostHog” MCP Server do?
The PostHog MCP (Model Context Protocol) Server is designed to connect AI assistants with the PostHog analytics platform, enabling enhanced development and operational workflows. By acting as a bridge between AI clients and PostHog’s feature flag management, analytics, and error tracking capabilities, the server allows AI models to perform tasks such as querying active feature flags, managing feature toggles, and retrieving error data. This integration empowers developers and teams to interact with their analytics data, control feature rollouts, and troubleshoot issues programmatically via LLMs, streamlining product management and observability processes.
List of Prompts
- What feature flags do I have active?
Check which feature toggles are currently enabled in your PostHog project. - Add a new feature flag for our homepage redesign
Create and configure a new feature flag to control the homepage redesign rollout. - What are my most common errors?
Retrieve and summarize the most frequent errors detected by PostHog.
List of Resources
- (No explicit resources are documented in the available information.)
List of Tools
- docs-search (requires Inkeep API key)
Enables LLMs to search through documentation, if configured with the appropriate API key.
Use Cases of this MCP Server
- Feature Flag Management
Developers can programmatically query, add, and manage feature flags, simplifying feature rollouts and experimentation. - Error Analytics & Monitoring
Retrieve common errors and monitor analytics data directly through AI assistants for rapid debugging and quality assurance. - Operational Insights
Use prompt templates to gain insights into user behavior, product usage, and operational metrics within PostHog. - Automated Documentation Search
When enabled, AI clients can search internal or external documentation to assist with troubleshooting or onboarding.
How to set it up
Windsurf
- Obtain your PostHog API key using the MCP Server preset here.
- Open Windsurf’s configuration file.
- Add the PostHog MCP Server configuration as shown below.
- Save and restart Windsurf.
- Verify the connection by running a test prompt.
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://mcp.posthog.com/sse",
"--header",
"Authorization:${POSTHOG_AUTH_HEADER}"
],
"env": {
"POSTHOG_AUTH_HEADER": "Bearer {INSERT_YOUR_PERSONAL_API_KEY_HERE}"
}
}
}
}
Claude
- Obtain your PostHog API key.
- Open Claude’s configuration file.
- Insert the PostHog MCP Server JSON snippet as shown.
- Save and restart Claude.
- Test the integration with an example prompt.
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://mcp.posthog.com/sse",
"--header",
"Authorization:${POSTHOG_AUTH_HEADER}"
],
"env": {
"POSTHOG_AUTH_HEADER": "Bearer {INSERT_YOUR_PERSONAL_API_KEY_HERE}"
}
}
}
}
Cursor
- Get your API key from PostHog.
- Open Cursor’s settings or configuration file.
- Add the server details using the JSON configuration.
- Save the changes and restart Cursor.
- Check connectivity with a sample prompt.
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://mcp.posthog.com/sse",
"--header",
"Authorization:${POSTHOG_AUTH_HEADER}"
],
"env": {
"POSTHOG_AUTH_HEADER": "Bearer {INSERT_YOUR_PERSONAL_API_KEY_HERE}"
}
}
}
}
Cline
- Obtain the PostHog API key.
- Edit Cline’s configuration to include the PostHog MCP Server.
- Use the JSON snippet below.
- Restart Cline.
- Validate the setup using a prompt.
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://mcp.posthog.com/sse",
"--header",
"Authorization:${POSTHOG_AUTH_HEADER}"
],
"env": {
"POSTHOG_AUTH_HEADER": "Bearer {INSERT_YOUR_PERSONAL_API_KEY_HERE}"
}
}
}
}
Securing API Keys
Always store API keys as environment variables, not in plain text. Example:
"env": {
"POSTHOG_AUTH_HEADER": "Bearer {INSERT_YOUR_PERSONAL_API_KEY_HERE}"
}
How to use this MCP inside flows
Using MCP in FlowHunt
To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:
{
"MCP-name": {
"transport": "streamable_http",
"url": "https://yourmcpserver.example/pathtothemcp/url"
}
}
Once configured, the AI agent is able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “MCP-name” to “posthog” and replace the URL with your own MCP server URL.
Overview
Section | Availability | Details/Notes |
---|---|---|
Overview | ✅ | |
List of Prompts | ✅ | Details from README.md |
List of Resources | ⛔ | Not documented |
List of Tools | ✅ | docs-search (available if Inkeep API key is set) |
Securing API Keys | ✅ | Documented in setup instructions |
Sampling Support (less important in evaluation) | ⛔ | Not documented |
Based on the available information, the PostHog MCP Server is easy to set up and well-documented for prompts and tools, but is limited in explicit resource and advanced MCP feature documentation. It scores well for basic integration and developer utility.
MCP Score
Has a LICENSE | ✅ (MIT) |
---|---|
Has at least one tool | ✅ |
Number of Forks | 3 |
Number of Stars | 35 |
Frequently asked questions
- What is the PostHog MCP Server?
The PostHog MCP Server connects AI assistants to the PostHog analytics platform, enabling direct access to feature flag management, analytics, and error tracking via the Model Context Protocol.
- What can I do with the PostHog MCP Server in FlowHunt?
You can query feature flags, create or manage toggles, retrieve error analytics, and gain operational insights—all programmatically, from within your FlowHunt AI workflows.
- Is my API key secure?
Yes, you should always store your PostHog API key as an environment variable, not in plain text. The setup guides show you how to do this for each supported client.
- Are there any tools included with the PostHog MCP Server?
Yes, the server supports the docs-search tool (if configured with an Inkeep API key), allowing AI agents to search documentation for troubleshooting and onboarding.
- Do I need to add resources or advanced configurations?
Basic setup requires only your API key and the provided JSON configuration. Advanced resource documentation is not required for standard integrations.
Get Started with PostHog MCP Integration
Empower your FlowHunt AI agents with direct access to analytics, feature flag control, and error insights via PostHog MCP Server.