P

PostHog MCP

Query product analytics and feature flags.

PostHog·No reviews yet
Repo Docs
Share:

About

Query events, cohorts, and insights, and manage feature flags in PostHog.

Example tools

Illustrative tool names — the actual tool set is defined by the server at runtime.

list_resources
Enumerate resources exposed by this MCP
get_resource
Fetch a resource by ID
invoke
Invoke the primary action of this MCP

Screenshots

No screenshots yet.

Frequently Asked Questions

Common questions about PostHog MCP.

What is the PostHog Model Context Protocol (MCP) server used for?
The PostHog MCP server allows you to query analytics data, such as events, cohorts, and insights, directly from PostHog. It also provides functionality for managing feature flags within your PostHog projects, integrating these capabilities into your MCP client.
How do I authenticate with the PostHog MCP server?
Authentication for the PostHog MCP server uses OAuth. You will need to configure an OAuth client within your PostHog instance and then authorize the MCP server to access your PostHog data.
What kind of data can I query using the PostHog MCP?
You can query product analytics data including events, user cohorts, and various insights from your PostHog projects. This allows for programmatic access to your analytics and data exploration directly through the MCP.
Does using the PostHog MCP server incur additional costs?
The PostHog MCP server itself is open-source and available on GitHub. Any costs associated with its use depend on your existing PostHog deployment and infrastructure, and the scale of your PostHog usage.
Can I manage feature flags with the PostHog MCP?
Yes, a core capability of the PostHog MCP server is the management of feature flags. You can use it to create, update, and toggle feature flags programmatically within your PostHog environment.
What is a prerequisite for using the PostHog MCP server?
A prerequisite for using the PostHog MCP server is an active PostHog instance. You must have a PostHog deployment configured and accessible for the MCP server to connect and interact with your data.

Install PostHog MCP

Server URL

https://mcp.posthog.com/mcp

Claude Desktop

Add this to claude_desktop_config.json.

{
  "mcpServers": {
    "posthog": {
      "url": "https://mcp.posthog.com/mcp",
      "transport": "http",
      "authType": "oauth"
    }
  }
}

Cursor

Add this to ~/.cursor/mcp.json.

{
  "mcpServers": {
    "posthog": {
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

VS Code

Add this to your workspace settings.json.

{
  "mcp.servers": {
    "posthog": {
      "type": "http",
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Discussion(0)

Sign in to join the discussion.

No comments yet.