PostHog MCP v0.4.0 brings custom dispatchers up to parity with instrument()
@posthog/mcp@0.4.0
8 features1 enhancementThis release8 featuresNew capabilities1 enhancementImprovements to existing featuresAI-tallied from the release notes
0.4.0
Minor Changes
- #3883
ddd9e7eThanks @lucasheriques! - Bring thePostHogMCPcustom-dispatcher path up to the same$mcp_*events asinstrument()for intent, theget_more_toolsvirtual tool, and tool listings. Custom MCP servers (hono, edge, any setup without aServer/McpServerto wrap) can now emit those events too. (instrument()'s server-sideintentFallbackandenableConversationIdcallbacks aren't mirrored — a custom dispatcher owns its request loop and can do both inline.)prepareToolList(tools, { context, reportMissing })injects thecontextargument into tool input schemas and optionally appends theget_more_toolstool.prepareToolCall(name, args)returns{ intent, intentSource, args, isMissingCapability }— pulls the agent-supplied intent, strips the injectedcontextargument before your handler runs, and flagsget_more_toolscalls.captureToolCallnow acceptsintent/intentSource, emitting$mcp_intentand$mcp_intent_source.captureMissingCapability(...)emits$mcp_missing_capability, plus a standalonegetMoreToolsResult()for the canned response.captureToolsList(...)emits$mcp_tools_listwith the advertised tool names.setLoggeris now exported so custom servers can surface the SDK's internal warnings.- The missing-capability (
get_more_tools) tool name is now customizable viamissingCapabilityToolName(defaults toget_more_tools) on both paths: thePostHogMCPconstructor option and theinstrument()MCPAnalyticsOptions. Set once, it's used for both advertising the tool and detecting calls to it, so the name can't drift between injection and detection. (2026-06-18)
Fetched June 18, 2026


