PostHog Official Remote MCP Server
PostHog's hosted MCP (mcp.posthog.com/mcp) exposes analytics queries, insights, feature flags, error tracking and HogQL to agents โ attach a PostHog API key as Bearer token.
- Provider
- PostHog โ
- Source
- https://github.com/PostHog/posthog โ
- Categories
- ๐ ๏ธ Developer Tools & Gitโ๏ธ Cloud, Infrastructure & DevOps
ไธญๆ็ฎไป
PostHog ๅฎๆน่ฟ็จ MCP ๆๅกๅจใไฝฟ็จไธชไบบ API Key๏ผAI ไปฃ็ๅฏๆฅ่ฏขไบงๅๅๆใๆดๅฏใFeature Flag ไธ HogQL ๆฐๆฎใ
Maintainer of PostHog Analytics? Claim or update this listing โ
๐ Client-side only โ never leaves your browser.
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}claude mcp add --transport http posthog https://mcp.posthog.com/mcp
With credential header:
claude mcp add --transport http posthog https://mcp.posthog.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
Or add to .vscode/mcp.json:
{
"servers": {
"posthog": {
"type": "http",
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}- Open Settings โ Connectors (Integrations) โ Add Custom Connector.
- Paste the endpoint URL:
https://mcp.posthog.com/mcp - Provide your API key / Bearer token when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.posthog.com/mcp",
"--header",
"Authorization: Bearer YOUR_API_KEY"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"posthog": {
"serverUrl": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.codex/config.toml โ Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.posthog] url = "https://mcp.posthog.com/mcp" bearer_token_env_var = "POSTHOG_TOKEN"
Add to cline_mcp_settings.json (Cline โ MCP Servers โ Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"posthog": {
"type": "streamableHttp",
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.gemini/settings.json under mcpServers โ httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"posthog": {
"httpUrl": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}๐งฐ PostHog Analytics MCP Tools & Schema (39)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| organizations-get ~30 tok | ๐ข Read | List PostHog organizations. | โ |
| projects-get ~28 tok | ๐ข Read | List PostHog projects. | โ |
| project-get ~30 tok | ๐ข Read | Get details of a PostHog project. | โ |
| project-property-definitions ~36 tok | ๐ข Read | List property definitions of a project. | โ |
| docs-search ~29 tok | ๐ข Read | Search PostHog documentation. | โ |
| query-run ~31 tok | ๐ข Read | Run a HogQL query against project data. | โ |
| list-errors ~32 tok | ๐ข Read | List captured error-tracking exceptions. | โ |
| error-details ~33 tok | ๐ข Read | Get details of an error-tracking exception. | โ |
| dashboards-get-all ~30 tok | ๐ข Read | List PostHog dashboards. | โ |
| dashboard-get ~29 tok | ๐ข Read | Get details of a dashboard. | โ |
| dashboard-create ~30 tok | ๐ Write | Create a PostHog dashboard. | โ |
| dashboard-update ~28 tok | ๐ Write | Update a dashboard. | โ |
| dashboard-delete ~28 tok | ๐ด Destructive | Delete a dashboard. | โ |
| dashboard-reorder-tiles ~31 tok | ๐ Write | Reorder dashboard tiles. | โ |
| insights-get-all ~29 tok | ๐ข Read | List PostHog insights. | โ |
| insight-get ~29 tok | ๐ข Read | Get details of an insight. | โ |
| insight-create-from-query ~33 tok | ๐ Write | Create an insight from a query. | โ |
| insight-update ~30 tok | ๐ Write | Update an existing insight. | โ |
| insight-delete ~27 tok | ๐ด Destructive | Delete an insight. | โ |
| insight-query ~32 tok | ๐ข Read | Run an insight query and get results. | โ |
| experiments-get-all ~31 tok | ๐ข Read | List A/B test experiments. | โ |
| experiment-get ~30 tok | ๐ข Read | Get details of an experiment. | โ |
| experiment-create ~29 tok | ๐ Write | Create an experiment. | โ |
| experiment-update ~29 tok | ๐ Write | Update an experiment. | โ |
| experiment-delete ~29 tok | ๐ด Destructive | Delete an experiment. | โ |
| experiment-results-get ~35 tok | ๐ข Read | Get statistical results of an experiment. | โ |
| feature-flag-get-all ~29 tok | ๐ข Read | List feature flags. | โ |
| feature-flag-get-definition ~34 tok | ๐ข Read | Get a feature flag definition. | โ |
| feature-flag-create ~30 tok | ๐ Write | Create a feature flag. | โ |
| feature-flag-update ~30 tok | ๐ Write | Update a feature flag. | โ |
| feature-flag-delete ~30 tok | ๐ด Destructive | Delete a feature flag. | โ |
| surveys-get-all ~28 tok | ๐ข Read | List PostHog surveys. | โ |
| survey-create ~27 tok | ๐ Write | Create a survey. | โ |
| survey-update ~27 tok | ๐ Write | Update a survey. | โ |
| survey-delete ~27 tok | ๐ด Destructive | Delete a survey. | โ |
| llm-get-costs ~31 tok | ๐ข Read | Get LLM observability cost metrics. | โ |
| cohorts-get-all ~26 tok | ๐ข Read | List cohorts. | โ |
| cohort-get ~28 tok | ๐ข Read | Get details of a cohort. | โ |
| cohort-create ~27 tok | ๐ Write | Create a cohort. | โ |
๐ก๏ธ Security, Quality & Context Token Audit
Every tool definition (name + description + input schema) is injected into your LLMโs context on every request โ Estimate per-call LLM token cost โ
- No prompt-injection or hidden-character anomalies detected in tool descriptions
- Streamable HTTP primary endpoint (current 2025-03-26 transport)
- Static credential (Bearer token / API key) โ protect it in client config
- Official first-party endpoint operated by the vendor
- Manually verified by RemoteMCP.net
๐ OAuth 2.1 & Security
- Auth type
- Bearer Token
- Dynamic Client Registration
- โ
- PKCE S256
- โ
- Protected resource metadata
- https://mcp.posthog.com/.well-known/oauth-protected-resource (expected location)
๐งฉ Recommended Agent Skills
๐ PostHog Analytics MCP Endpoint Overview & Security Guide
PostHog Analytics MCP โ Remote MCP Server
PostHog's remote MCP is one of the most-used product-analytics endpoints โ agents can list and run insights, execute HogQL over event tables, check feature flag state and pull error-tracking summaries with a single API key.
Official PostHog Analytics MCP Endpoint & Transport Architecture
- Endpoint URL:
https://mcp.posthog.com/mcp - Transport: Streamable HTTP
Streamable HTTP is the current MCP transport (2025-03-26 spec): a single URL accepts JSON-RPC POSTs and may stream responses over SSE, so one endpoint serves both simple and streaming workloads. PostHog Analytics MCP does not publish a separate legacy SSE endpoint, so your client must speak Streamable HTTP.
Authentication, Scopes & Permission Boundaries
PostHog Analytics MCP uses bearer-token authentication. Create an access token in your PostHog account settings, then send it as Authorization: Bearer <token>. No OAuth redirect flow is involved.
Of the 6 cataloged tools, 5 are read-only and 1 can write or mutate state (create resources, run SQL, post messages). Grant access only to the accounts and projects you intend agents to act on, and prefer scoped credentials or a dedicated workspace where the provider supports them.
Common Troubleshooting & Connection Tips
- 401/403 responses โ your credential is missing or rejected. Regenerate the key/token and make sure it is sent as an
Authorization: Bearerheader on every request, including theinitializecall. - "Session expired" / stale
Mcp-Session-Idโ just re-sendinitialize; stateless clients can ignore session headers entirely. - Use a personal API key from PostHog Settings โ Personal API Keys.
- HogQL access means the agent can read any event data in the project โ use a scoped key.
๐ How to Connect
- Copy the PostHog Analytics MCP endpoint URLThe remote endpoint is https://mcp.posthog.com/mcp.
- Add it to your MCP clientClaude Code:
claude mcp add --transport http posthog https://mcp.posthog.com/mcp. Cursor: add"posthog": { "url": "https://mcp.posthog.com/mcp" }undermcpServersin ~/.cursor/mcp.json. Other clients work similarly. - Configure your credentialGenerate an access token at https://posthog.com/docs/api and add an
Authorization: Bearer <token>header to the server's config (supported by Cursor, VS Code, Windsurf and mcp-remote --header). - Verify with the online inspectorPaste https://mcp.posthog.com/mcp into remotemcp.net/inspector, run initialize and tools/list, and confirm PostHog Analytics MCP's 6 tools respond.
โ FAQ
What is the PostHog Analytics MCP remote MCP endpoint?
The primary endpoint is https://mcp.posthog.com/mcp. It is an official first-party server operated by PostHog, speaking the Streamable HTTP transport.
How do I authenticate with PostHog Analytics MCP?
PostHog Analytics MCP expects a credential sent as an Authorization: Bearer header. Generate the token in your PostHog account and add it to your client's headers.
I'm getting a 401 Unauthorized from PostHog Analytics MCP โ what's wrong?
Your Bearer credential is missing, malformed or expired. Confirm it is attached to every request โ including initialize โ and that no proxy is stripping the Authorization header.
Which MCP clients work with PostHog Analytics MCP?
Any client that supports remote MCP servers: Cursor, Claude Code (`claude mcp add --transport http posthog https://mcp.posthog.com/mcp`), VS Code Copilot, ChatGPT connectors, Windsurf, Kiro (`~/.kiro/settings/mcp.json`), and Claude Desktop via the `mcp-remote` bridge.
What tools does PostHog Analytics MCP expose?
6 tools are cataloged in this directory โ including `list_insights`, `get_insight_data`, `query_hogql` and more. Use our online inspector to fetch the live tool list straight from the endpoint.
๐ Connect Guides
๐ Embed Status Badge in README
Related Servers
GitHub's official remote MCP server hosted at api.githubcopilot.com. Gives AI agents first-party access to repositories, issues, pull requests and code search.
Linear's official remote MCP server. Agents can search, create and update issues and query your team's workflow over Streamable HTTP or SSE.
Claude Skills's hosted remote MCP server. ClaudeSkills.club's public MCP lets agents search and pull from a catalog of 90,000+ Agent Skills (SKILL.md) โ workflow specs, safety scores and one-line install instructions. It is public and unauthenticated โ connect and call tools immediately.
GitLab's hosted remote MCP server. GitLab's official MCP server gives agents first-party access to repositories, merge requests, issues, pipelines and code search across gitlab.com and self-managed instances. It is protected by OAuth 2.1; compliant clients complete a browser consent flow with PKCE.