1.6 KiB
1.6 KiB
Quick Start With Claude Desktop
-
Build the Server (Counter Example)
cargo build --release --example servers_std_ioThis builds a standard input/output MCP server binary.
-
Add or update this section in your
~/.config/claude-desktop/config.toml{ "mcpServers": { "counter": { "command": "PATH-TO/rust-sdk/target/release/examples/servers_std_io.exe", "args": [] } } } -
Once Claude Desktop is running, try chatting:
counter.say_helloOr test other tools like:
counter.increment counter.get_value counter.sum {"a": 3, "b": 4}
Client Examples
- Client SSE, using reqwest and eventsource-client.
- Client stdio, using tokio to spawn child process.
- Everything, test with
@modelcontextprotocol/server-everything - Collection, How to transpose service into dynamic object, so they will have a same type.
Server Examples
- Server SSE, using axum as web server.
- Server stdio, using tokio async io.
Transport Examples
Integration
- Rig A stream chatbot with rig
WASI
- WASI-P2 runtime How it works with wasip2
Use Mcp Inspector
npx @modelcontextprotocol/inspector