Expand description
MCP (Model Context Protocol) integration — JSON-RPC client, tool bridging, lazy loading.
Structs§
- McpConfig
- MCP config file format: { “mcpServers”: { “name”: { command, args, env } } }
- McpConnect
Tool - A tool that lazily connects to MCP servers on demand. Instead of spawning all servers at startup (burning tokens on 65 tool schemas), this registers ONE tool that the model calls to activate a specific server.
- McpServer
Config - MCP server configuration — matches claude-code/gemini-cli format.
- McpTool
- A dynamic tool backed by an MCP server connection. The connection is shared (Arc<Mutex<>>) across all tools from the same server.
Functions§
- connect_
mcp_ servers - Connect to all configured MCP servers and register their tools. Returns the number of tools registered.
- load_
mcp_ config - Load MCP config from ~/.synaps-cli/mcp.json (or profile variant).
- setup_
lazy_ mcp - Set up lazy MCP loading: parse config, register the connect_mcp_server gateway tool. Returns the number of available (but not yet connected) servers.