mcps-transport

Crates.iomcps-transport
lib.rsmcps-transport
version0.1.0
created_at2025-06-15 09:19:19.096434+00
updated_at2025-06-15 09:19:19.096434+00
descriptionTransport layer for MCPS secure communications
homepagehttps://github.com/SamDuchaine/mpcs
repositoryhttps://github.com/SamDuchaine/mpcs
max_upload_size
id1713100
size22,247
SamDuchaine (SamDuchaine)

documentation

README

MCPS Transport

Transport layer for MCPS secure communications

Crates.io Documentation License

MCPS (Model Context Protocol Secure) is "The HTTPS of MCP" - providing enterprise-grade security, encryption, and authentication for Model Context Protocol communications.

Overview

The mcps-transport crate provides the transport layer abstraction for MCPS, including:

  • 🔒 Secure Transports - TLS, WebSocket, and custom secure protocols
  • 📦 Message Framing - Efficient binary protocol with compression
  • 🛡️ Connection Management - Automatic reconnection and health monitoring
  • 🔐 Transport Security - Certificate validation and cipher suite management
  • 📊 Protocol Negotiation - Automatic transport selection and fallback

Features

  • Multi-Protocol Support: TLS, WebSocket, TCP, and custom transports
  • Zero-Copy Operations: Efficient message handling with minimal allocations
  • Automatic Fallback: Graceful degradation to supported protocols
  • Connection Pooling: Efficient connection reuse and management
  • Monitoring: Built-in metrics and health checking

Quick Start

use mcps_transport::{Transport, Config, TlsTransport};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Configure secure transport
    let config = Config::builder()
        .endpoint("mcps://server:8443")
        .tls_ca_file("ca.pem")
        .build()?;
    
    // Create transport
    let transport = TlsTransport::new(config);
    
    // Connect and send message
    let mut connection = transport.connect().await?;
    connection.send(b"Hello, MCPS!").await?;
    
    let response = connection.receive().await?;
    println!("Received: {:?}", response);
    
    Ok(())
}

Supported Transports

  • TLS: Secure TCP with TLS 1.3 encryption
  • WebSocket: Secure WebSocket connections
  • TCP: Plain TCP (development only)
  • Unix Socket: Local IPC transport
  • Custom: Pluggable transport implementations

Documentation

Related Crates

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

Security

For security vulnerabilities, please see our Security Policy and report issues to security@kindly.dev.

Commit count: 0

cargo fmt