Expand description
Downstream MCP client (#210).
A real MCP client built on the official rmcp SDK — no bespoke JSON-RPC.
Each operation opens a fresh connection (performs the initialize
handshake), does its work, and shuts the connection down. This keeps the
gateway stateless and robust (no stale child processes / sessions); the
expensive part — listing the full catalog — is amortized by the TTL cache in
super::catalog.
Functions§
- call_
tool_ on - Call a tool on an already-connected session (bounded by
timeout). - fetch_
tools - List a downstream server’s tools (connect →
tools/list→ disconnect). - list_
tools_ on - List tools on an already-connected session (bounded by
timeout). - open
- Open a connection to a downstream MCP server (runs the MCP
initializehandshake). The whole connect is bounded bytimeout. - proxy_
call - Proxy a single tool call to a downstream server (connect →
tools/call→ disconnect). - result_
to_ text - Flatten a downstream
CallToolResultinto plain text. Text blocks are concatenated; non-text blocks (images/resources) are summarized so the proxy never returns binary blobs into the model context.
Type Aliases§
- Client
Service - A connected downstream MCP client session. Transport-erased: stdio, HTTP, and (in tests) in-process duplex all collapse to this one type.