Expand description
MCP (Model Context Protocol) client for the TraitClaw AI agent framework.
Connects to MCP servers over stdio or SSE transport, discovers tools via
tools/list, and routes tool calls via tools/call. MCP tools implement
ErasedTool so they work seamlessly alongside native tools.
§Quick Start
use traitclaw_mcp::McpServer;
let server = McpServer::stdio("npx", &["@modelcontextprotocol/server-filesystem"]).await?;
let tools = server.tools(); // Vec<Arc<dyn ErasedTool>>Modules§
- prelude
- Prelude re-exports for convenient use.
Structs§
- McpServer
- A connection to an MCP server process.
- McpTool
- A tool discovered from an MCP server.
- McpTool
Registry - A
ToolRegistrybacked by an MCP server connection. - Multi
Server McpRegistry - A
ToolRegistrythat aggregates tools from multiple MCP servers. - Multi
Server McpRegistry Builder - Builder for
MultiServerMcpRegistry.