From 01ae4991117b5abbf0c08c43185d6aca9836e671 Mon Sep 17 00:00:00 2001 From: "DESKTOP-4GPR761\\HashTable" Date: Fri, 4 Apr 2025 23:31:31 +0700 Subject: [PATCH 1/2] feat(readme): add Claude Desktop quick start guide --- examples/README.md | 31 +++++++++++++++++++++++++++++++ examples/clients/Cargo.toml | 8 ++++---- examples/servers/Cargo.toml | 6 +++--- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/examples/README.md b/examples/README.md index 2f2346112..21cca824a 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,3 +1,34 @@ +# Quick Start With Cluade 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 From da2f8bb13ed0332cb866652f0cc35312a3b0f8b2 Mon Sep 17 00:00:00 2001 From: "DESKTOP-4GPR761\\HashTable" Date: Sat, 5 Apr 2025 00:56:36 +0700 Subject: [PATCH 2/2] fix(readme): correct typo in Claude Desktop instructions --- examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index 21cca824a..8e04920d2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,4 +1,4 @@ -# Quick Start With Cluade Desktop +# Quick Start With Claude Desktop 1. **Build the Server (Counter Example)** ```sh