synwire-mcp-adapters
High-level MCP adapters for Synwire. Connects to multiple MCP servers simultaneously, aggregates their tools under a unified interface, and provides transport, validation, interceptors, and pagination out of the box.
What this crate provides
MultiServerMcpClient-- connects to N named MCP servers and routes tool calls to the correct serverConnection-- transport configuration enum (Stdio, SSE,StreamableHttp, WebSocket)WebSocketMcpTransport-- WebSocket transport implementingMcpTransportMcpClientSession-- RAII session guard with drop-time cleanupMcpToolProvider--ToolProviderbacked byMultiServerMcpClientToolCallInterceptor-- onion-ordered middleware for tool call logging, rate limiting, or mutationvalidate_tool_arguments-- client-side JSON Schema validation before sending tool callsPaginationCursor-- cursor-based pagination with a 1000-page capMcpCallbacks-- logging, progress, and elicitation callback bundle- Bidirectional conversion -- MCP tools to Synwire tools and back (
convertmodule) - Zero unsafe code --
#![forbid(unsafe_code)]
Quick start
[]
= "0.1"
Connect to two MCP servers and list aggregated tools:
use ;
use HashMap;
async