Skip to main content

Module mcp

Module mcp 

Source
Expand description

MCP (Model Context Protocol) client – stdio transport.

Provides a self-implemented JSON-RPC 2.0 client that spawns an MCP server as a child process and communicates over stdin/stdout.

§Quick start

use telos_agent::mcp::{McpClient, McpServerConfig};

let config = McpServerConfig::new("npx", vec![
    "-y".into(),
    "@modelcontextprotocol/server-filesystem".into(),
    "/some/path".into(),
]);
let client = McpClient::new(config);
client.connect().await?;
for tool in client.tools() {
    println!("  {} -- {}", tool.name, tool.description);
}

Re-exports§

pub use bridge::McpToolBridge;
pub use client::McpClient;
pub use client::McpTool;
pub use config::McpServerConfig;
pub use manager::McpManager;

Modules§

bridge
client
config
manager