Skip to main content

telos_agent/integrations/mcp/
mod.rs

1//! MCP (Model Context Protocol) client -- stdio transport.
2//!
3//! Provides a self-implemented JSON-RPC 2.0 client that spawns an MCP server
4//! as a child process and communicates over stdin/stdout.
5//!
6//! # Quick start
7//!
8//! ```rust,no_run
9//! use telos_agent::mcp::{McpClient, McpServerConfig};
10//!
11//! # async fn example() -> Result<(), telos_agent::AgentError> {
12//! let config = McpServerConfig::new("npx", vec![
13//!     "-y".into(),
14//!     "@modelcontextprotocol/server-filesystem".into(),
15//!     "/some/path".into(),
16//! ]);
17//! let client = McpClient::new(config);
18//! client.connect().await?;
19//! for tool in client.tools() {
20//!     println!("  {} -- {}", tool.name, tool.description);
21//! }
22//! # Ok(())
23//! # }
24//! ```
25
26pub mod bridge;
27pub mod client;
28pub mod config;
29pub mod manager;
30pub use bridge::McpToolBridge;
31pub use client::{McpClient, McpTool};
32pub use config::McpServerConfig;
33pub use manager::McpManager;