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
This commit is contained in:
parent
2744cde0d9
commit
57f2ba265f
3 changed files with 38 additions and 7 deletions
|
|
@ -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 Examples
|
||||||
|
|
||||||
- [Client SSE](clients/src/sse.rs), using reqwest and eventsource-client.
|
- [Client SSE](clients/src/sse.rs), using reqwest and eventsource-client.
|
||||||
|
|
|
||||||
|
|
@ -25,18 +25,18 @@ anyhow = "1.0"
|
||||||
tower = "0.5"
|
tower = "0.5"
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "sse"
|
name = "clients_sse"
|
||||||
path = "src/sse.rs"
|
path = "src/sse.rs"
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "std_io"
|
name = "clients_std_io"
|
||||||
path = "src/std_io.rs"
|
path = "src/std_io.rs"
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "everything_stdio"
|
name = "clients_everything_stdio"
|
||||||
path = "src/everything_stdio.rs"
|
path = "src/everything_stdio.rs"
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "collection"
|
name = "clients_collection"
|
||||||
path = "src/collection.rs"
|
path = "src/collection.rs"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,13 @@ tokio-stream = { version = "0.1" }
|
||||||
tokio-util = { version = "0.7", features = ["codec"] }
|
tokio-util = { version = "0.7", features = ["codec"] }
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "std_io"
|
name = "servers_std_io"
|
||||||
path = "src/std_io.rs"
|
path = "src/std_io.rs"
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "axum"
|
name = "servers_axum"
|
||||||
path = "src/axum.rs"
|
path = "src/axum.rs"
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "axum_router"
|
name = "servers_axum_router"
|
||||||
path = "src/axum_router.rs"
|
path = "src/axum_router.rs"
|
||||||
Loading…
Reference in a new issue