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: README.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -98,11 +98,11 @@ impl ServerHandler for MyServerHandler {
98
98
99
99
---
100
100
101
-
👉 For a more detailed example of a [Hello World MCP](../../examples/hello-world-mcp-server) Server that supports multiple tools and provides more type-safe handling of `CallToolRequest`, check out: **[examples/hello-world-mcp-server](../../examples/hello-world-mcp-server)**
101
+
👉 For a more detailed example of a [Hello World MCP](examples/hello-world-mcp-server) Server that supports multiple tools and provides more type-safe handling of `CallToolRequest`, check out: **[examples/hello-world-mcp-server](examples/hello-world-mcp-server)**
102
102
103
103
See hello-world-mcp-server example running in [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) :
104
104
105
-

105
+

> your results may vary slightly depending on the version of the MCP Server in use when you run it.
189
189
@@ -192,10 +192,10 @@ Here is the output :
192
192
[rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) provides two type of handler traits that you can chose from:
193
193
194
194
-**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.
195
-
Refer to [examples/hello-world-mcp-server/src/handler.rs](../../examples/hello-world-mcp-server/src/handler.rs) for an example.
195
+
Refer to [examples/hello-world-mcp-server/src/handler.rs](examples/hello-world-mcp-server/src/handler.rs) for an example.
196
196
197
197
-**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.
198
-
Refer to [examples/hello-world-mcp-server-core/src/handler.rs](../../examples/hello-world-mcp-server-core/src/handler.rs) for an example.
198
+
Refer to [examples/hello-world-mcp-server-core/src/handler.rs](examples/hello-world-mcp-server-core/src/handler.rs) for an example.
199
199
200
200
---
201
201
@@ -207,7 +207,7 @@ Here is the output :
207
207
208
208
The same principles outlined above apply to the client-side handlers, `mcp_client_handler` and `mcp_client_handler_core`.
209
209
Use `client_runtime::create_client()` or `client_runtime_core::create_client()` , respectively.
210
-
Check out the corresponding examples at: [examples/simple-mcp-client](../../examples/simple-mcp-client) and [examples/hello-world-mcp-server-core](../../examples/hello-world-mcp-server-core).
210
+
Check out the corresponding examples at: [examples/simple-mcp-client](examples/simple-mcp-client) and [examples/hello-world-mcp-server-core](examples/hello-world-mcp-server-core).
0 commit comments