stand-in 0.1.0

A stand-in for your MCP server boilerplate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Transport trait — abstracts the communication layer between client and server.

use async_trait::async_trait;

use crate::error::Result;
use crate::server::RequestHandler;

/// Abstracts the communication layer between an MCP client and server.
#[async_trait]
pub trait Transport: Send + Sync {
    /// Run the transport, reading requests and writing responses until shutdown.
    async fn run(&self, handler: RequestHandler) -> Result<()>;
}