PostHog MCP server
PostHog in any MCP client, through Memtro: PostHog does not publish this server. Memtro's PostHog connector reads PostHog through its API with the credentials you connect, and one endpoint hands those tools, every other system you connect and Memtro's memory tools to Claude Code, Cursor, Claude Desktop or anything else that speaks Streamable HTTP, as you.
What the model can do
PostHog product analytics: HogQL queries over events, persons and sessions, trends, saved insights, person lookups with recent events and session recordings, feature flags, experiments and surveys (PostHog allows 240 analytics requests per minute (1,200 per hour) and 2,400 query requests per hour per organisation.); can also add an annotation to the charts, create a feature flag, switch one on or off, change its rollout, roll it out to everyone or archive it, launch, pause, resume, end or ship a variant of an experiment, create a dashboard or add an insight to one, or set a property on a person when you ask.
Reads
posthog_queryRun a read-only HogQL (ClickHouse-flavoured SQL) query against the project.posthog_trendsEvent counts over time (a PostHog Trends insight): one or more events, a date range (default -7d → now) and a bucket interval…posthog_insightsSaved insights (the charts people built in PostHog).posthog_personFind people by email, name or distinct id and return their person properties, identifiers, first/last seen, plus…posthog_feature_flagsFeature flags: key, description, enabled, rollout per condition group (percentage and property filters), variants for multivariate flags…posthog_experimentsA/B experiments and surveys.
Acts, when you ask
These change something in PostHog. The model is told to use them only when you ask for exactly that, and each one is granted by name: per team on a shared connection, by the owner on a personal one.
posthog_create_annotationAdds an annotation to PostHog — a dated note ("v2.3 released", "pricing page changed"…posthog_toggle_feature_flagSwitches a PostHog feature flag on or off.posthog_create_feature_flagCreates a PostHog feature flag with one release condition covering rollout_percentage of all users, and optional variants for a multivariate flag…posthog_roll_out_flag_to_everyoneServes a PostHog feature flag to every user by putting a 100% release condition above its existing ones…posthog_set_flag_rolloutSets the percentage of users one release condition of a PostHog feature flag is served to (condition 0 is the first…posthog_archive_feature_flagArchives a PostHog feature flag: it is hidden from the flag list and switched off, so every user loses it the next time flags are evaluated.posthog_launch_experimentLaunches a draft PostHog experiment: its feature flag is switched on and users start being bucketed into variants from now.posthog_pause_experimentPauses a running PostHog experiment by switching its flag off, so users fall back to the default experience and no exposures are recorded…posthog_end_experimentEnds a running PostHog experiment without shipping a variant: its results window is frozen at now and it cannot be restarted…posthog_ship_experiment_variantShips one variant of a PostHog experiment: the flag gives that variant 100% of its split, and a running experiment is ended.posthog_create_dashboardCreates an empty PostHog dashboard with a name, description and tags; posthog_add_insight_to_dashboard fills it.posthog_add_insight_to_dashboardPlaces an existing saved insight on a PostHog dashboard as a tile (an insight already there is left as it is).posthog_set_person_propertySets one property on a PostHog person — a plan, an account manager, a note about them.
Connect it
First connect PostHog on Dashboard → Connections, then add Memtro to your client once. The PostHog tools appear alongside the tools of everything else you have connected; nothing is configured per connector.
Claude Code
The Memtro plugin registers the server and a skill for when to use it; the tools are then available in every session.
claude plugin marketplace add memtro-org/claude-memtro
claude plugin install memtro@memtro --config api_key=sk-memtro-...Cursor
Add the server to .cursor/mcp.json in the project, or to the global file under ~/.cursor/.
{
"mcpServers": {
"memtro": {
"url": "https://platform.memtro.com/api/mcp",
"headers": {
"Authorization": "Bearer sk-memtro-..."
}
}
}
}Claude Desktop
Create a personal API key on Dashboard → Profile → API keys. In Claude Desktop add an MCP server of type HTTP with URL https://platform.memtro.com/api/mcp and the header Authorization: Bearer sk-memtro-…
OpenCode
A remote server in opencode.json.
{
"mcp": {
"memtro": {
"type": "remote",
"url": "https://platform.memtro.com/api/mcp",
"headers": {
"Authorization": "Bearer sk-memtro-..."
}
}
}
}Pi
One command: pi mcp add memtro --url https://platform.memtro.com/api/mcp --bearer-token-env-var MEMTRO_API_KEY. Tools arrive as mcp__memtro__*. The pi-memtro extension registers it for you, alongside Memtro as the model.
Any other client
Add an MCP server of type HTTP (Streamable HTTP, stateless) at https://platform.memtro.com/api/mcp with the header Authorization: Bearer sk-memtro-.... Codex, Zed, Windsurf, Cline and the SDKs all take a remote server this way.
Who may use it
The key identifies the person, and the server offers that person the tools they may use everywhere else in Memtro. A shared PostHog connection is used by the teams an administrator granted it to, tool by tool, on the Permissions page; a personal connection is used by its owner alone, and its tools that act stay off until the owner allows them. See Teams and permissions and Connectors.
Ask it like this
- › How many unique users viewed pricing each day this week?
- › What is the current result of our 'Activation funnel' insight?
- › What has jane@acme.com done recently, and are there session recordings?
- › Which feature flags are enabled for enterprise customers?
- › Turn off the new-checkout flag
Questions
- Is this an official PostHog MCP server?
- No. It is Memtro's MCP server with Memtro's PostHog connector behind it: the connector reads PostHog through its API with the credentials you connect on Dashboard → Connections, and PostHog publishes nothing here. The same endpoint carries every other system you connect and Memtro's memory tools.
- What does it cost?
- Nothing on top of Memtro. One price per organisation by its number of users, from $50 a month for up to 10 users after a 7-day free trial, with every connector, the MCP server, jobs and memory included. You bring your own model keys.
- Can it change anything in PostHog?
- Only when you ask, and only what it has been granted: add a dated annotation to the project's charts, or to one insight or dashboard; switch a feature flag on or off; set a property on a person; create a feature flag with a rollout percentage and optional variants; roll a feature flag out to everyone, or set the percentage of one of its release conditions; archive a feature flag, which also switches it off; launch, pause or resume an experiment; end an experiment, or ship one variant to 100% of its flag and end it; create a dashboard, or place a saved insight on one. Every other tool reads, searches or lists. An administrator grants each acting tool by name per team, and a personal connection acts only after its owner allows it.
- Which clients work?
- Any MCP client that speaks Streamable HTTP: Claude Code, Cursor, Claude Desktop, OpenCode, Codex, Zed, Windsurf, Cline and the Anthropic and OpenAI SDKs. There is no local process to run; the server is remote and authenticated with your key.