Skip to content
预计 1 分钟右侧目录可快速定位

MCP Adapter ​

精确调用链 ​

text
HTTP POST /mcp/<secret>
  ↓
JSON-RPC method
  ├─ initialize
  ├─ tools/list
  │    ↓
  │  deps.listTools()
  │    ↓
  │  validate internal identity
  │    ↓
  │  cache Map<name, Tool>
  │    ↓
  │  project inputSchema + annotations
  │
  └─ tools/call
       ↓
     Map lookup
       ↓
     deps.callTool({ identity, args, toolCallId })
       ↓
     mcpResult()
       ↓
     JSON-RPC result

Symbol 边界 ​

Symbol负责什么不负责什么
createRoutedMcpBridge()transport/protocol adaptationAgent Loop
isReadOnly()annotation heuristicauthorization
tools Mapdiscovery→call identity continuitydurable registry
tools/listschema projectiontool execution
tools/calllookup + internal dispatchsemantic task success
mcpResult()result shape normalizationbusiness reconciliation
deps.callTool()internal executor injection pointMCP protocol semantics

源码还限制 request body 大小、绑定 localhost、用随机 secret path。这些属于 bridge transport hardening,不等于 MCP 的全部安全模型。

本地定位 ​

bash
rg -n "createRoutedMcpBridge|isReadOnly|mcpResult|notifications/initialized|tools/list|tools/call|callTool" source/node-agent-coordinator/routed-mcp-bridge.ts

固定源码 ​

关联知识文章 ​

AI Engineering · Agent · Harness · Backend Systems