You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/rust-mcp-sdk/README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@
4
4
5
5
# Rust MCP SDK
6
6
7
-
A high-performance, asynchronous toolkit for building MCP servers and clients.
7
+
A high-performance, asynchronous toolkit for building MCP servers and clients.
8
8
Focus on your app's logic while **rust-mcp-sdk** takes care of the rest!
9
9
10
-
**rust-mcp-sdk** provides the necessary components for developing both servers and clients in the MCP ecosystem.
10
+
**rust-mcp-sdk** provides the necessary components for developing both servers and clients in the MCP ecosystem.
11
11
Leveraging the [rust-mcp-schema](https://github.com/rust-mcp-stack/rust-mcp-schema) crate for type safe MCP schema objects and MCP type utilities simplifies the process of building robust and reliable MCP servers and clients, ensuring consistency and minimizing errors in data handling and message processing.
12
12
13
13
**⚠️WARNING**: This project only supports Standard Input/Output (stdio) transport at this time, with support for SSE (Server-Sent Events) transport still in progress and not yet available. Project is currently under development and should be used at your own risk.
@@ -70,18 +70,18 @@ pub struct MyServerHandler;
70
70
#[async_trait]
71
71
implServerHandlerforMyServerHandler {
72
72
// Handle ListToolsRequest, return list of available tools as ListToolsResult
println!("List of tools for {}@{}", server_version.name, server_version.version);
@@ -195,10 +195,10 @@ If you are looking for a step-by-step tutorial on how to get started with `rust-
195
195
196
196
[rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) provides two type of handler traits that you can chose from:
197
197
198
-
-**mcp_server_handler**: This is the recommended trait for your MCP project, offering a default implementation for all types of MCP messages. It includes predefined implementations within the trait, such as handling initialization or responding to ping requests, so you only need to override and customize the handler functions relevant to your specific needs.
198
+
-**mcp_server_handler**: This is the recommended trait for your MCP project, offering a default implementation for all types of MCP messages. It includes predefined implementations within the trait, such as handling initialization or responding to ping requests, so you only need to override and customize the handler functions relevant to your specific needs.
199
199
Refer to [examples/hello-world-mcp-server/src/handler.rs](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/examples/hello-world-mcp-server/src/handler.rs) for an example.
200
200
201
-
-**mcp_server_handler_core**: If you need more control over MCP messages, consider using `mcp_server_handler_core`. It offers three primary methods to manage the three MCP message types: `request`, `notification`, and `error`. While still providing type-safe objects in these methods, it allows you to determine how to handle each message based on its type and parameters.
201
+
-**mcp_server_handler_core**: If you need more control over MCP messages, consider using `mcp_server_handler_core`. It offers three primary methods to manage the three MCP message types: `request`, `notification`, and `error`. While still providing type-safe objects in these methods, it allows you to determine how to handle each message based on its type and parameters.
202
202
Refer to [examples/hello-world-mcp-server-core/src/handler.rs](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/examples/hello-world-mcp-server-core/src/handler.rs) for an example.
203
203
204
204
---
@@ -209,8 +209,8 @@ If you are looking for a step-by-step tutorial on how to get started with `rust-
209
209
210
210
### Choosing Between `mcp_client_handler` and `mcp_client_handler_core`
211
211
212
-
The same principles outlined above apply to the client-side handlers, `mcp_client_handler` and `mcp_client_handler_core`.
213
-
Use `client_runtime::create_client()` or `client_runtime_core::create_client()` , respectively.
212
+
The same principles outlined above apply to the client-side handlers, `mcp_client_handler` and `mcp_client_handler_core`.
213
+
Use `client_runtime::create_client()` or `client_runtime_core::create_client()` , respectively.
214
214
Check out the corresponding examples at: [examples/simple-mcp-client](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/examples/simple-mcp-client) and [examples/simple-mcp-client-core](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/examples/simple-mcp-client-core).
0 commit comments