Resources
PostHog
Query, analyze, and manage your PostHog insights
Research notes
The PostHog MCP is very cool.
It’s got 1 tool — exec — that takes 2 args, command and context. The exec tool has a pretty long description that tells the agent how to use command and context to do nearly everything you can do in the PostHog UI.
command is a string that looks an awful lot like a set of CLIs:
posthog:exec({ "command": "search <regex>" })
posthog:exec({ "command": "tools" })
And the big one:
posthog:exec({ "command": "call <tool_name> <json_input>" })
Instead of exposing a long list of tools (with descriptions, instructions, etc. for each tool), it wraps them all in a call subcommand, and the description of the exec tool gives the agent enough context to figure out which sub-tool to call. If you’ve been following along with the zeitgeist you’ll remember when everyone threw away their MCPs and replaced them with CLIs to save on tokens. It kinda looks like that’s what PostHog did, just behind the scenes.
I asked the MCP to give me a trendline of Argus downloads (vanity metrics gonna vain) and it did the following:
call read-data-schema {kind: events}— fetched the events schema scoped to our accountcall read-data-schema {kind: event_properties, event_name: argus_download_requested}— event schema for Argus downloadsinfo execute-sql— fetched docs for how to build the necessary queries- 4×
call execute-sql {...}— ran the queries for the actual data call read-data-schema {kind: event_properties, event_name: download_clicked}— checked the schema for another event
It’s really cool how they did this, and it ended up being pretty cheap — about 1/6th the price of running /doctor.