Skip to content

Commit 57f2ba2

Browse files
authored
Add Claude desktop quick start and update Cargo.toml of examples/servers, examples/clients (#94)
* feat(readme): add Claude Desktop quick start guide * fix(readme): correct typo in Claude Desktop instructions
1 parent 2744cde commit 57f2ba2

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

examples/README.md

+31
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# Quick Start With Claude Desktop
2+
3+
1. **Build the Server (Counter Example)**
4+
```sh
5+
cargo build --release --example servers_std_io
6+
```
7+
This builds a standard input/output MCP server binary.
8+
9+
2. **Add or update this section in your** `~/.config/claude-desktop/config.toml`
10+
```json
11+
{
12+
"mcpServers": {
13+
"counter": {
14+
"command": "PATH-TO/rust-sdk/target/release/examples/servers_std_io.exe",
15+
"args": []
16+
}
17+
}
18+
}
19+
```
20+
21+
3. **Once Claude Desktop is running, try chatting:**
22+
```text
23+
counter.say_hello
24+
```
25+
Or test other tools like:
26+
```text
27+
counter.increment
28+
counter.get_value
29+
counter.sum {"a": 3, "b": 4}
30+
```
31+
132
# Client Examples
233

334
- [Client SSE](clients/src/sse.rs), using reqwest and eventsource-client.

examples/clients/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ anyhow = "1.0"
2525
tower = "0.5"
2626

2727
[[example]]
28-
name = "sse"
28+
name = "clients_sse"
2929
path = "src/sse.rs"
3030

3131
[[example]]
32-
name = "std_io"
32+
name = "clients_std_io"
3333
path = "src/std_io.rs"
3434

3535
[[example]]
36-
name = "everything_stdio"
36+
name = "clients_everything_stdio"
3737
path = "src/everything_stdio.rs"
3838

3939
[[example]]
40-
name = "collection"
40+
name = "clients_collection"
4141
path = "src/collection.rs"
4242

examples/servers/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ tokio-stream = { version = "0.1" }
3030
tokio-util = { version = "0.7", features = ["codec"] }
3131

3232
[[example]]
33-
name = "std_io"
33+
name = "servers_std_io"
3434
path = "src/std_io.rs"
3535

3636
[[example]]
37-
name = "axum"
37+
name = "servers_axum"
3838
path = "src/axum.rs"
3939

4040
[[example]]
41-
name = "axum_router"
41+
name = "servers_axum_router"
4242
path = "src/axum_router.rs"

0 commit comments

Comments
 (0)