mcp_rs_sdk/
lib.rs

1//! A Rust SDK for building agents for the Model Context Protocol (MCP).
2
3// Core modules
4pub mod agent;
5pub mod error;
6pub mod helpers;
7pub mod types;
8
9// Re-export the main agent runners for convenience.
10pub use agent::run_agent;
11#[cfg(feature = "streaming")]
12pub use agent::run_streaming_agent;
13
14// Re-export all public types for easy access by library users.
15pub use types::{
16    FunctionCall, FunctionDefinition, GetContextRequest, GetContextResponse, Message,
17    PartialResponse, Response, Role, Tool, ToolCall, ToolInputSchema, ToolResult, UserInfo,
18};
19
20// Re-export all helper functions.
21pub use helpers::{
22    create_content_response, create_error_response, create_function_response,
23    parse_function_args,
24};
25
26#[cfg(feature = "streaming")]
27pub use helpers::{
28    create_streaming_content_chunk, create_streaming_error_chunk,
29    create_streaming_tool_result_chunk,
30};