diff --git a/examples/README.md b/examples/README.md index 2f2346112..8e04920d2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,3 +1,34 @@ +# Quick Start With Claude Desktop + +1. **Build the Server (Counter Example)** + ```sh + cargo build --release --example servers_std_io + ``` + This builds a standard input/output MCP server binary. + +2. **Add or update this section in your** `~/.config/claude-desktop/config.toml` + ```json + { + "mcpServers": { + "counter": { + "command": "PATH-TO/rust-sdk/target/release/examples/servers_std_io.exe", + "args": [] + } + } + } + ``` + +3. **Once Claude Desktop is running, try chatting:** + ```text + counter.say_hello + ``` + Or test other tools like: + ```text + counter.increment + counter.get_value + counter.sum {"a": 3, "b": 4} + ``` + # Client Examples - [Client SSE](clients/src/sse.rs), using reqwest and eventsource-client. diff --git a/examples/clients/Cargo.toml b/examples/clients/Cargo.toml index 1cec3a2b8..52226ed47 100644 --- a/examples/clients/Cargo.toml +++ b/examples/clients/Cargo.toml @@ -25,18 +25,18 @@ anyhow = "1.0" tower = "0.5" [[example]] -name = "sse" +name = "clients_sse" path = "src/sse.rs" [[example]] -name = "std_io" +name = "clients_std_io" path = "src/std_io.rs" [[example]] -name = "everything_stdio" +name = "clients_everything_stdio" path = "src/everything_stdio.rs" [[example]] -name = "collection" +name = "clients_collection" path = "src/collection.rs" diff --git a/examples/servers/Cargo.toml b/examples/servers/Cargo.toml index 01569b88c..abc892446 100644 --- a/examples/servers/Cargo.toml +++ b/examples/servers/Cargo.toml @@ -30,13 +30,13 @@ tokio-stream = { version = "0.1" } tokio-util = { version = "0.7", features = ["codec"] } [[example]] -name = "std_io" +name = "servers_std_io" path = "src/std_io.rs" [[example]] -name = "axum" +name = "servers_axum" path = "src/axum.rs" [[example]] -name = "axum_router" +name = "servers_axum_router" path = "src/axum_router.rs" \ No newline at end of file