You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mcp): register the object tools on the stdio transport (#8034) (#8084)
The long-lived stdio server advertised `capabilities.tools` and answered
-32601 to every tools/list and tools/call: registerObjectTools /
registerActionTools were called only from handleHttpRequest()'s
per-request server, so stdio's whole tool surface was the AI service's
function-calling ToolRegistry — a different surface, empty on any app
that registers no AI tools.
Both transports now register through one composition (wireBridgeTools),
and the stdio host builds a principal-bound McpDataBridge over the
ObjectQL engine with the OS_MCP_STDIO_API_KEY identity re-resolved per
call (ADR-0101 D1). The tools/resources/prompts capabilities are derived
by the SDK from real registration instead of being hand-declared, so the
advertised set and the served set cannot disagree (ADR-0076 D12, #2462).
Claude-Session: https://claude.ai/code/session_01B3Kurx8qufrDzNjk4rag7V
Co-authored-by: Claude <noreply@anthropic.com>
Serve the object tools over the stdio MCP transport instead of only advertising them
6
+
7
+
The stdio MCP server advertised `capabilities.tools` in its `initialize` result and then answered `-32601 Method not found` to every `tools/list` and `tools/call`, so an MCP client that connected successfully could not query or mutate a single object. The same process answered the same requests correctly over HTTP (`POST /api/v1/mcp`), which is what made the cause visible: `registerObjectTools` / `registerActionTools` were reachable only from `handleHttpRequest()`'s throwaway per-request server, and the long-lived server behind stdio received only the AI service's function-calling `ToolRegistry` — a different surface, empty on any app that registers no AI tools.
8
+
9
+
Both transports now register through one composition (`wireBridgeTools`), and the stdio host builds a principal-bound data bridge from the `OS_MCP_STDIO_API_KEY` identity, re-resolved per call so a revoked key stops working on the next tool call (ADR-0101 D1). Permissions, RLS and FLS apply exactly as they do to the same identity over REST.
10
+
11
+
The `tools`, `resources` and `prompts` capabilities are no longer hand-declared at construction: the MCP SDK declares each one when something is actually registered, so what a server advertises and what it serves can no longer disagree (ADR-0076 D12). A deployment with no principal to bind — or no metadata service — now advertises no tool capability instead of advertising an empty one, and says so in the boot log.
0 commit comments