1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// Copyright (c) 2025 MCP Rust Contributors
// SPDX-License-Identifier: MIT
//! # MCP Rust SDK (2025-06-18)
//!
//! A comprehensive Rust SDK for the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)
//! version 2025-06-18, providing both server and client implementations with full MCP specification
//! compliance including audio content, annotations, and enhanced capabilities.
//!
//! ## Features
//!
//! - 🚀 **High Performance**: Built with Rust's zero-cost abstractions and async/await
//! - 🛡️ **Type Safety**: Leverages Rust's type system to prevent runtime errors
//! - 🔌 **Multiple Transports**: Support for STDIO, HTTP/SSE, and WebSocket transports
//! - 🎯 **Full MCP 2025-06-18 Compliance**: Complete implementation of the latest MCP specification
//! - 📚 **Rich Ecosystem**: Tools, resources, prompts, and sampling support
//! - 🎵 **Audio Support**: NEW in 2025-06-18 - Audio content support for multimodal interactions
//! - 🏷️ **Annotations**: NEW in 2025-06-18 - Tool and content annotations for enhanced metadata
//! - 🔧 **Autocompletion**: NEW in 2025-06-18 - Argument autocompletion capabilities
//! - 📁 **Roots Support**: NEW in 2025-06-18 - File system roots for enhanced resource access
//!
//! ## Quick Start
//!
//! ### Server Example
//!
//! ```rust,no_run
//! use mcp_protocol_sdk::{
//! server::McpServer,
//! core::{tool::ToolHandler, error::McpResult},
//! protocol::types::{Content, CallToolResult},
//! };
//! use async_trait::async_trait;
//! use std::collections::HashMap;
//! use serde_json::Value;
//!
//! struct EchoHandler;
//!
//! #[async_trait]
//! impl ToolHandler for EchoHandler {
//! async fn call(&self, arguments: HashMap<String, Value>) -> McpResult<CallToolResult> {
//! let message = arguments.get("message")
//! .and_then(|v| v.as_str())
//! .unwrap_or("Hello, World!");
//!
//! Ok(CallToolResult {
//! content: vec![Content::text(message)],
//! is_error: Some(false),
//! structured_content: None,
//! meta: None,
//! })
//! }
//! }
//!
//! #[tokio::main]
//! async fn main() -> McpResult<()> {
//! let mut server = McpServer::new("echo-server".to_string(), "1.0.0".to_string());
//!
//! server.add_tool(
//! "echo".to_string(),
//! Some("Echo a message".to_string()),
//! serde_json::json!({
//! "type": "object",
//! "properties": {
//! "message": { "type": "string" }
//! }
//! }),
//! EchoHandler,
//! ).await?;
//!
//! Ok(())
//! }
//! ```
//!
//! ## Module Organization
//!
//! - [`core`]: Core abstractions for resources, tools, prompts, and errors
//! - [`protocol`]: MCP protocol types and message definitions (2025-06-18)
//! - [`transport`]: Transport layer implementations (STDIO, HTTP, WebSocket)
//! - [`server`]: MCP server implementation and lifecycle management
//! - [`client`]: MCP client implementation and session management
//! - [`utils`]: Utility functions and helpers
// Re-export commonly used types for convenience
pub use ;
pub use *;
/// Prelude module for convenient imports (2025-06-18)