rust-sdk/examples
adam jones 94428d543f
docs: mark SSE transport examples as deprecated (#561)
SSE transport has been removed from newer versions of the MCP spec.
Streamable HTTP is preferred as it is more reliable.

Moves SSE examples to a collapsed details section at the bottom of
the example list and removes them from the 'How to Run' section.
2025-11-25 10:34:59 -05:00
..
clients feat: allow clients to override client_name (#469) 2025-10-03 21:03:31 -04:00
rig-integration fix: client name mismatch (#503) 2025-10-29 17:47:37 +08:00
servers docs: mark SSE transport examples as deprecated (#561) 2025-11-25 10:34:59 -05:00
simple-chat-client feat(SEP-973): following change Icon.sizes from string to string array (#479) 2025-10-10 19:23:04 +08:00
transport chore(deps): update tokio-tungstenite requirement from 0.27.0 to 0.28.0 (#462) 2025-10-14 09:43:30 +08:00
wasi feat: Add prompt support (#351) 2025-08-21 11:22:19 +08:00
README.md docs: fix broken links in example readme (#273) 2025-06-20 09:42:48 +08:00

Quick Start With Claude Desktop

  1. Build the Server (Counter Example)

    cargo build --release --example servers_counter_stdio
    

    This builds a standard input/output MCP server binary.

  2. Add or update this section in your PATH-TO/claude_desktop_config.json

    Windows

    {
      "mcpServers": {
        "counter": {
          "command": "PATH-TO/rust-sdk/target/release/examples/servers_counter_stdio.exe",
          "args": []
        }
      }
    }
    

    MacOS/Linux

    {
      "mcpServers": {
        "counter": {
          "command": "PATH-TO/rust-sdk/target/release/examples/servers_counter_stdio",
          "args": []
        }
      }
    }
    
  3. Ensure that the MCP UI elements appear in Claude Desktop The MCP UI elements will only show up in Claude for Desktop if at least one server is properly configured. It may require to restart Claude for Desktop.

  4. Once Claude Desktop is running, try chatting:

    counter.say_hello
    

    Or test other tools like:

    counter.increment
    counter.get_value
    counter.sum {"a": 3, "b": 4}
    

Client Examples

see clients/README.md

Server Examples

see servers/README.md

Transport Examples

Integration

  • Rig A stream chatbot with rig
  • Simple Chat Client A simple chat client implementation using the Model Context Protocol (MCP) SDK.

WASI

Use Mcp Inspector

npx @modelcontextprotocol/inspector