21 releases (13 stable)
Uses new Rust 2024
| new 3.0.12 | Apr 14, 2026 |
|---|---|
| 3.0.11 | Apr 7, 2026 |
| 3.0.10 | Mar 27, 2026 |
| 3.0.0-exp.2 | Jan 13, 2026 |
| 3.0.0-beta.5 | Feb 24, 2026 |
#49 in #transport
534 downloads per month
Used in 20 crates
(7 directly)
1MB
18K
SLoC
turbomcp-transport-traits
Core transport traits and types for the TurboMCP Model Context Protocol SDK.
Overview
This crate provides the foundational abstractions that all transport implementations depend on:
- Traits:
Transport,BidirectionalTransport,StreamingTransport,TransportFactory - Types:
TransportType,TransportState,TransportCapabilities,TransportMessage - Errors:
TransportError,TransportResult - Config:
LimitsConfig,TimeoutConfig,TlsConfig - Metrics:
TransportMetrics,AtomicMetrics
Usage
Transport implementations should depend on this crate and implement the Transport trait:
use turbomcp_transport_traits::{Transport, TransportResult, TransportMessage};
use async_trait::async_trait;
struct MyTransport { /* ... */ }
#[async_trait]
impl Transport for MyTransport {
fn transport_type(&self) -> TransportType { /* ... */ }
// ... other trait methods
}
Part of TurboMCP v3
This crate is part of the TurboMCP v3.0 restructuring effort to provide:
- Lean core: Only trait definitions and types (~800 LOC)
- No transport implementations: Implementations live in separate crates
- Foundation for all transports: STDIO, HTTP, WebSocket, TCP, Unix, gRPC
License
MIT
Dependencies
~17–26MB
~368K SLoC