Function start_stdio

Source
pub async fn start_stdio() -> SdkResult<()>
Expand description

Starts the MCP server in stdio mode.

Reads framed MCP requests from stdin and writes framed responses to stdout.

§Errors

Returns an SdkResult error if initialization or transport setup fails.

§Example

use mcp_rust_server::start_stdio;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    start_stdio().await?;
    Ok(())
}