Skip to content

Add Claude desktop quick start and update Cargo.toml of examples/servers, examples/clients #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 4 additions & 4 deletions examples/clients/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

6 changes: 3 additions & 3 deletions examples/servers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Loading