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
//! Warp integration for the Rust MCP SDK.
//!
//! This crate provides integration between the MCP SDK and the Warp web framework,
//! making it easy to expose MCP servers over HTTP.
//!
//! # Features
//!
//! - HTTP POST endpoint for JSON-RPC messages
//! - Server-Sent Events (SSE) streaming for notifications
//! - Session management with automatic cleanup
//! - Protocol version validation
//! - CORS support via Warp filters
//!
//! # Quick Start
//!
//! ```ignore
//! use mcpkit::prelude::*;
//! use mcpkit_warp::McpRouter;
//!
//! // Your MCP server handler (use #[mcp_server] macro)
//! #[mcp_server(name = "my-server", version = "1.0.0")]
//! impl MyServer {
//! #[tool(description = "Say hello")]
//! async fn hello(&self, name: String) -> ToolOutput {
//! ToolOutput::text(format!("Hello, {name}!"))
//! }
//! }
//!
//! #[tokio::main]
//! async fn main() {
//! McpRouter::new(MyServer::new())
//! .serve(([0, 0, 0, 0], 3000))
//! .await;
//! }
//! ```
/// Handler module for MCP request processing.
pub use WarpError;
pub use ;
pub use McpRouter;
pub use ;
pub use McpState;
/// Prelude module for convenient imports.
/// Protocol versions supported by this extension.
pub const SUPPORTED_VERSIONS: & = &;
/// Check if a protocol version is supported.