The deployed MCP endpoint hand-rolls its JSON-RPC. Both documented reasons have expired:
@modelcontextprotocol/sdk@1.30 ships server/webStandardStreamableHttp — a Streamable HTTP transport speaking Web Request/Response, which is what a Next route handler has.
- MCP Apps'
_meta.ui flows through server.registerTool fine — mcp/app.mjs already does it.
Shape: one shared tool-definition module (definitions + handlers) consumed by three thin transports — the route (webStandardStreamableHttp, stateless mode), stdio (mcp/server.mjs), local HTTP (mcp/server-http.mjs). Deletes ~200 lines of hand-written JSON-RPC and makes tool drift between the deployed and local servers impossible (today app.mjs already lags: 14 kinds described, no find_activity/build_pathway).
Sequencing: strictly after #75 and #76 merge — both edit api/mcp/route.ts, and this migration rewrites it. Wire behavior is unchanged (same protocol, same tools), so no contract implications; verify with the Claude Desktop QA plan's Pass 1–2 after migration.
🤖 Generated with Claude Code
The deployed MCP endpoint hand-rolls its JSON-RPC. Both documented reasons have expired:
@modelcontextprotocol/sdk@1.30shipsserver/webStandardStreamableHttp— a Streamable HTTP transport speaking WebRequest/Response, which is what a Next route handler has._meta.uiflows throughserver.registerToolfine —mcp/app.mjsalready does it.Shape: one shared tool-definition module (definitions + handlers) consumed by three thin transports — the route (webStandardStreamableHttp, stateless mode), stdio (
mcp/server.mjs), local HTTP (mcp/server-http.mjs). Deletes ~200 lines of hand-written JSON-RPC and makes tool drift between the deployed and local servers impossible (todayapp.mjsalready lags: 14 kinds described, nofind_activity/build_pathway).Sequencing: strictly after #75 and #76 merge — both edit
api/mcp/route.ts, and this migration rewrites it. Wire behavior is unchanged (same protocol, same tools), so no contract implications; verify with the Claude Desktop QA plan's Pass 1–2 after migration.🤖 Generated with Claude Code