Hello World Server (Stdio)
Location: crates/rust-mcp-sdk/examples/hello-world-mcp-server-stdio.rs
This example creates a stdio MCP server with a say_hello tool using ServerHandler. It demonstrates the minimal code needed for a working MCP server.
cargo run --example hello-world-mcp-server-stdio -p rust-mcp-sdk
Connect with MCP Inspector:
npx @modelcontextprotocol/inspector node ./target/debug/examples/hello-world-mcp-server-stdio