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
//! `TurboMCP` gRPC Transport
//!
//! High-performance gRPC transport for the Model Context Protocol (MCP).
//! Built on [tonic](https://github.com/hyperium/tonic) for async/await support
//! and full HTTP/2 capabilities.
//!
//! # Features
//!
//! - **Server**: gRPC server implementation with streaming notifications
//! - **Client**: gRPC client with automatic reconnection
//! - **Tower Integration**: Composable middleware via Tower
//! - **TLS**: Optional TLS 1.3 support via rustls
//!
//! # Quick Start
//!
//! ## Server
//!
//! ```ignore
//! use turbomcp_grpc::server::McpGrpcServer;
//! use turbomcp_types::Tool;
//!
//! let server = McpGrpcServer::builder()
//! .add_tool(Tool { name: "hello".into(), ..Default::default() })
//! // .tool_handler(MyHandler) // implements ToolHandler
//! .build();
//!
//! tonic::transport::Server::builder()
//! .add_service(server.into_service())
//! .serve("[::1]:50051".parse()?)
//! .await?;
//! ```
//!
//! ## Client
//!
//! ```ignore
//! use turbomcp_grpc::client::McpGrpcClient;
//!
//! let mut client = McpGrpcClient::connect("http://[::1]:50051").await?;
//! client.initialize().await?;
//! let result = client
//! .call_tool("hello", Some(serde_json::json!({"name": "World"})))
//! .await?;
//! ```
/// Generated protobuf types for MCP
// Re-exports for convenience
pub use ;
pub use McpGrpcServer;
pub use McpGrpcClient;
pub use McpGrpcLayer;