# How to connect PostHog MCP to Claude

```json
{
  "title": "How to connect PostHog MCP to Claude",
  "toolkit": "PostHog MCP",
  "toolkit_slug": "posthog_mcp",
  "framework": "Claude Cowork",
  "framework_slug": "claude-cowork",
  "url": "https://composio.dev/toolkits/posthog_mcp/framework/claude-cowork",
  "markdown_url": "https://composio.dev/toolkits/posthog_mcp/framework/claude-cowork.md",
  "updated_at": "2026-08-25T05:32:36.332Z"
}
```

## Introduction

Claude is Anthropic's AI assistant, available on the web, in the desktop app, and on mobile. Cowork is its agent for knowledge work, and it runs on all of those surfaces too. Connected to your apps, Claude can work with your files and services to accomplish complex tasks on your behalf.
This guide walks you through the easiest and most secure way to connect your PostHog account to Claude via Composio Connect, enabling it to list active feature flags and their rollout, summarize experiment results for signup flow, get recent error events with stack traces, and more such actions on your behalf without compromising your account security.
Setup is the same on Claude Web, Desktop, and Cowork, and you only need to do it once. The connector is tied to your account, so it's available in all three.

## Also integrate PostHog MCP with

- [ChatGPT](https://composio.dev/toolkits/posthog_mcp/framework/chatgpt)
- [Hermes](https://composio.dev/toolkits/posthog_mcp/framework/hermes-agent)

## Connect PostHog MCP to Claude Cowork

### Connecting PostHog to Claude Web, Desktop, and Cowork
Two ways to add the Composio connector. Pick whichever you prefer.
### 1. Add with one click
Click the button. Claude opens with the Composio connector filled in. Click Add, then go to step 2.
[Add to Claude](https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Composio&connectorUrl=https%3A%2F%2Fconnect.composio.dev%2Fmcp)
### Add manually
In Claude Desktop, click Customize in the left sidebar, then select Connectors and click the + icon at the top.
Click Add custom connector and paste in the Composio MCP server URL:

```bash
https://connect.composio.dev/mcp
```

## What is the PostHog MCP server, and what's possible with it?

The PostHog MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your PostHog account. It provides structured and secure access so your agent can perform PostHog operations on your behalf.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `POSTHOG_MCP_EXEC` | Exec | ### Using the `posthog` tool PostHog makes your product self-driving: it reads your data and ships changes with you, never without you. Spans analytics, experiments, flags, replay, and more. Pass CLI-style commands in the `command` parameter for all PostHog interactions. **Requirements** 1. Find unknown tools with `search` or `tools`. 2. Run `info ` once if its schema is not in context. Reuse it unless the tool changes or a schema error occurs. Never guess a schema or run `info` before every call. **Commands (in order):** ```text # 1. Find unknown tools posthog:exec({ "command": "search " }) posthog:exec({ "command": "tools" }) # fallback: list all # 2. Inspect once if the schema is missing posthog:exec({ "command": "info " }) # 3. Drill into complex fields — REQUIRED for any field with a `hint` posthog:exec({ "command": "schema " }) # 4. Call; reuse the schema posthog:exec({ "command": "call " }) posthog:exec({ "command": "call --json " }) ``` **Schema drill-down:** - `info` returns the full schema if it fits the token budget; otherwise it auto-summarizes (names, types, required, enums, defaults) and attaches `hint` entries pointing to `schema ` for complex fields. - `schema ` (no path) returns the summarized top-level schema. - `schema ` resolves a dot path, descending through: - object `properties` (e.g. `query.source`) - array `items` — numeric segments step into items (`events.0.properties`), or jump to a property on the item type (`events.id`) - `anyOf`/`oneOf` — numeric segment picks a variant by index, or a property name matches any object variant defining it - Oversized sub-schemas are also summarized with a `note` to drill further. - Unknown paths return an error listing available child paths. **Not supported:** - `search` matches tool metadata only, not input schemas. - No pattern-based field projection — drill one path at a time. |

## Supported Triggers

None listed.

## Troubleshooting

### 1. Why does Claude not use the Composio connector for PostHog?

The connector can show as connected, but Claude must use it in each PostHog conversation.
- Click + at the lower left of the chat, or type /.
- Hover Connectors.
- Turn on Composio.
- Ask Claude to connect to PostHog again.

### 2. Why does Claude show an MCP server error before PostHog connects?

Claude can show Couldn't reach the MCP server or Authorization with the MCP server failed when you add the connector for PostHog.
- Check that the connector URL is https://connect.composio.dev/mcp.
- Connectors run from Anthropic's cloud, so your device network is usually not the problem.
- Add the connector again from Customize > Connectors, then ask Claude to connect PostHog.
- If it fails again, send the error and the ofid_ reference id to support@composio.dev.

### 3. Why does the PostHog authorization link not work?

The Composio connector is one server. Your PostHog account connects separately when Claude asks for it.
- If the browser does not open, or the link expires, ask Claude to retry the PostHog connection.
- Composio creates a fresh PostHog authorization link.
- Open that link in your browser and finish the PostHog sign-in.

### 4. Why do PostHog actions fail after they worked before?

The PostHog connection can expire or lose permission.
- Ask Claude to inspect the PostHog connection.
- If the connection is unhealthy, disconnect it when Claude prompts you.
- Reconnect the PostHog account and retry the action.
- If Claude shows a permission prompt, approve it before Claude changes data in PostHog.
- If the action still fails with a permission error, check that the connected account has that permission in PostHog itself.

### 5. How do I switch to a different PostHog account?

Claude can manage the PostHog connection for you.
- Ask Claude to disconnect or delete the current PostHog account.
- Ask Claude to connect PostHog again.
- Open the new Composio authorization link for PostHog.
- Sign in with the other PostHog account in the browser.
- After the account connects, ask Claude to retry the PostHog task.

### 6. Why is my PostHog connection missing in Claude Desktop or on a Team plan?

The connector belongs to your Claude account, so your PostHog connection works in Claude Web, Desktop, and Cowork.
- In Claude Desktop, open Customize > Connectors.
- Next to Composio, click ⋮ and click Clear cache.
- If PostHog tools still do not appear, click ⋮, disconnect, remove the connector, and add it again.
- On Team or Enterprise, an Owner or Primary Owner must enable the connector before you can connect PostHog.

## Creating MCP Server - Stand-alone vs Composio SDK

The PostHog MCP server connects Claude Web, Desktop, and Cowork to your PostHog account through Composio. Once connected, Claude can use the available PostHog tools and triggers to complete tasks on your behalf.

## Complete Code

None listed.

## How to build PostHog MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/posthog_mcp/framework/chatgpt)
- [Hermes](https://composio.dev/toolkits/posthog_mcp/framework/hermes-agent)

## Related Toolkits

- [Firecrawl](https://composio.dev/toolkits/firecrawl) - Firecrawl automates large-scale web crawling and data extraction. It helps organizations efficiently gather, index, and analyze content from online sources.
- [Tavily](https://composio.dev/toolkits/tavily) - Tavily offers powerful search and data retrieval from documents, databases, and the web. It helps teams locate and filter information instantly, saving hours on research.
- [Exa](https://composio.dev/toolkits/exa) - Exa is a data extraction and search platform for gathering and analyzing information from websites, APIs, or databases. It helps teams quickly surface insights and automate data-driven workflows.
- [Serpapi](https://composio.dev/toolkits/serpapi) - SerpApi is a real-time API for structured search engine results. It lets you automate SERP data collection, parsing, and analysis for SEO and research.
- [Peopledatalabs](https://composio.dev/toolkits/peopledatalabs) - Peopledatalabs delivers B2B data enrichment and identity resolution APIs. Supercharge your apps with accurate, up-to-date business and contact data.
- [Snowflake](https://composio.dev/toolkits/snowflake) - Snowflake is a cloud data warehouse built for elastic scaling, secure data sharing, and fast SQL analytics across major clouds.
- [Posthog](https://composio.dev/toolkits/posthog) - PostHog is an open-source analytics platform for tracking user interactions and product metrics. It helps teams refine features, analyze funnels, and reduce churn with actionable insights.
- [Ahrefs MCP](https://composio.dev/toolkits/ahrefs_mcp) - Ahrefs MCP is Ahrefs' hosted MCP server for SEO data and insights. Use it to access backlinks, organic metrics, keyword research, and competitor analysis.
- [Akta](https://composio.dev/toolkits/akta) - Akta is a company intelligence platform providing enrichment, news, and alternative business signals. It helps teams build targeted company lists and enrich data-driven workflows.
- [Amplitude](https://composio.dev/toolkits/amplitude) - Amplitude is a digital analytics platform for product and behavioral data insights. It helps teams analyze user journeys and make data-driven decisions quickly.
- [Amplitude MCP](https://composio.dev/toolkits/amplitude_mcp) - Amplitude MCP is Amplitude's product analytics service for tracking user behavior and product metrics. Use it to centralize product data and manage charts, dashboards, cohorts, experiments, and taxonomy.
- [Audioscrape MCP](https://composio.dev/toolkits/audioscrape_mcp) - Audioscrape MCP lets agents search and retrieve speaker-attributed audio, transcripts, entities, and citations from public and workspace content. Use it to surface searchable, speaker-labeled audio and rich metadata for research, meetings, and content discovery.
- [Baremetrics](https://composio.dev/toolkits/baremetrics) - Baremetrics is a subscription analytics platform for recurring-revenue businesses. It helps teams track MRR, churn, customers, and revenue trends in one place.
- [Bing Webmaster Tools](https://composio.dev/toolkits/bing_webmaster_tools) - Bing Webmaster Tools is Microsoft's search console for site performance, crawling, indexing, URL submission, and verified site management. It helps site owners understand Bing Search visibility and fix issues that affect organic traffic.
- [Bread & Butter](https://composio.dev/toolkits/bread_butter) - Bread & Butter is a lead-intelligence and identity platform for website visitor tracking, user profiles, attribution, authentication, and conversion workflows. It helps teams understand who is visiting, where leads come from, and how users convert.
- [Bright Data MCP](https://composio.dev/toolkits/brightdata_mcp) - Bright Data MCP is an AI-powered web scraping and data collection platform. Instantly access public web data in real time with advanced scraping tools.
- [Browseai](https://composio.dev/toolkits/browseai) - Browseai is a web automation and data extraction platform that turns any website into an API. It's perfect for monitoring websites and retrieving structured data without manual scraping.
- [BSC Designer](https://composio.dev/toolkits/bsc_designer) - BSC Designer is a strategy execution platform for balanced scorecards, KPIs, dashboards, and strategy maps. It helps teams turn goals into measurable performance plans they can track over time.
- [Chameleon](https://composio.dev/toolkits/chameleon) - Chameleon is a product adoption platform for building in-app experiences, managing customer data, and analyzing user engagement. It helps teams improve onboarding, feature discovery, and product adoption with targeted user experiences.
- [Chartly](https://composio.dev/toolkits/chartly) - Chartly renders Chart.js configurations as PNG or SVG images and creates permanent chart URLs for sharing and embedding. Share and embed charts easily with stable image URLs and downloadable vector graphics.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and PostHog MCP?

With a standalone PostHog MCP server, the agents and LLMs can only access a fixed set of PostHog tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from PostHog and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Claude Cowork?

Yes, you can. Claude Cowork fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right PostHog tools.

### Can I manage the permissions and scopes for PostHog while using Tool Router?

Yes, absolutely. You can configure which PostHog scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your PostHog data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
