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
//! Axum integration for the Rust MCP SDK.
//!
//! This crate provides integration between the MCP SDK and the Axum 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
//!
//! # Example
//!
//! ```ignore
//! use mcpkit_axum::{McpRouter, McpState};
//! use mcpkit_server::ServerHandler;
//! use axum::Router;
//!
//! // Your MCP server handler (must implement ServerHandler)
//! struct MyServer;
//!
//! #[tokio::main]
//! async fn main() {
//! // Create MCP router with your handler
//! let mcp_router = McpRouter::new(MyServer);
//!
//! // Build the full application
//! let app = Router::new()
//! .nest("/mcp", mcp_router.into_router());
//!
//! // Run the server
//! let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
//! axum::serve(listener, app).await.unwrap();
//! }
//! ```
pub use ExtensionError;
pub use ;
pub use McpRouter;
pub use ;
pub use McpState;
/// Protocol versions supported by this extension.
pub const SUPPORTED_VERSIONS: & = &;
/// Check if a protocol version is supported.