#traits #mcp #transport

turbomcp-transport-traits

Core transport traits and types for TurboMCP - foundation for all transport implementations

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

Download history 1/week @ 2026-01-11 29/week @ 2026-01-18 21/week @ 2026-01-25 28/week @ 2026-02-01 10/week @ 2026-02-08 24/week @ 2026-02-15 37/week @ 2026-02-22 66/week @ 2026-03-01 88/week @ 2026-03-08 73/week @ 2026-03-15 84/week @ 2026-03-22 218/week @ 2026-03-29 159/week @ 2026-04-05

534 downloads per month
Used in 20 crates (7 directly)

MIT license

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