How to Connect PostHog Analytics Remote MCP to Claude
Add PostHog's remote MCP server to Claude in about a minute.
Step-by-step
- Open connector settingsClaude.ai โ Settings โ Connectors (Integrations) โ Add Custom Connector (paid plans).
- Paste the endpointURL:
https://mcp.posthog.com/mcp. Add anAuthorization: Bearer <your-key>header in the server's config โ get the credential from https://posthog.com/docs/api. - Claude Desktop alternativeStdio clients can bridge via
npx -y mcp-remotehttps://mcp.posthog.com/mcp`inclaude_desktop_config.json`.
Troubleshooting OAuth / 401
- A
401 Unauthorizedon first connect is normal โ the endpoint is OAuth-protected; let Claude finish the browser consent flow. - If the consent window never opens, remove and re-add the server, then retry.
- Check the exact challenge at our OAuth debugger.
- Run the live endpoint through the online inspector to see the raw JSON-RPC exchange.
๐ 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"
}
}
}
}Tools exposed by PostHog Analytics MCP (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. | โ |
Connect PostHog Analytics MCP to another client
Other servers for Claude
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.
Notion's official hosted MCP server. Agents can search your workspace, read and create pages, and query databases over Streamable HTTP or SSE.
Linear's official remote MCP server. Agents can search, create and update issues and query your team's workflow over Streamable HTTP or SSE.
Figma's official remote MCP server. Agents can pull design context, variables, Code Connect mappings and screenshots from your Figma files.
AWS Knowledge's hosted remote MCP server. AWS's fully-managed public knowledge MCP gives agents access to the latest AWS documentation, API references, What's New posts and architectural guidance across all AWS services. It is public and unauthenticated โ connect and call tools immediately.
Stripe's official remote MCP server at mcp.stripe.com. Agents can query customers, payment intents and subscriptions and invoke Stripe API operations with OAuth.