| Filename | Latest commit message | Latest commit date |
|---|---|---|
* feat: add type-safe elicitation schema support (#465) Implement type-safe schema definitions for MCP elicitation requests, replacing generic `JsonObject` with strongly-typed primitive schemas per the [MCP 2025-06-18 specification](https://spec.modelcontextprotocol.io/specification/2025-06-18/server/elicitation/). Features: - Type-safe schema hierarchy (`StringSchema`, `NumberSchema`, `IntegerSchema`, `BooleanSchema`) - Builder pattern with fluent API and 20+ convenience methods - Build-time validation ensuring required fields exist in properties - Private fields enforcing invariants through validated constructors - Comprehensive validation support (range, length, format, enums) - Typed property methods for cleaner schema construction Benefits: - Compile-time type safety prevents invalid schema construction - 60-70% reduction in boilerplate through convenience methods - Enforces MCP specification requirement for primitive-only properties - Better IDE autocomplete and type inference - Runtime validation catches schema errors early Breaking changes: - `CreateElicitationRequestParam.requested_schema` changed from `JsonObject` to `ElicitationSchema` - `ElicitationSchemaBuilder::build()` now returns `Result` instead of direct value Fixes #465 * fix: fix RMCP compliance * feat: add conversion methods to ElicitationSchema Add from_json_schema() and from_type() methods to ElicitationSchema for easier type-to-schema conversion. This addresses feedback about improving ergonomics when working with generated schemas. Also make all struct fields public for better flexibility. * chore: change `StringFormat` to enum |
||
| .. | ||
| clients | ||
| rig-integration | ||
| servers | ||
| simple-chat-client | ||
| transport | ||
| wasi | ||
| README.md | ||
Quick Start With Claude Desktop
-
Build the Server (Counter Example)
cargo build --release --example servers_counter_stdioThis builds a standard input/output MCP server binary.
-
Add or update this section in your
PATH-TO/claude_desktop_config.jsonWindows
{ "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": [] } } } -
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.
-
Once Claude Desktop is running, try chatting:
counter.say_helloOr test other tools like:
counter.increment counter.get_value counter.sum {"a": 3, "b": 4}
Client Examples
Server Examples
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
- WASI-P2 runtime How it works with wasip2
Use Mcp Inspector
npx @modelcontextprotocol/inspector