Skip to main content

Module mcp_client

Module mcp_client 

Source
Expand description

§MCP Client Pool

Connects to one or more downstream MCP tool servers (configured via [[mcp_servers]]) as an MCP client over stdio, using the official rmcp SDK. On connection it discovers each server’s tools and builds a routing table from tool name to owning server.

The pool implements embacle::McpToolExecutor, so it can be handed to the text-based tool loop (embacle::mcp_tool_bridge) / embacle::agent::AgentExecutor to power server-side tool execution on /v1/chat/completions.

Tool name collisions across servers are resolved first-wins, with a warning logged for every dropped tool so coverage is never silently reduced.

Structs§

McpClientPool
A pool of MCP stdio clients exposing their union of tools as a single executor.