|
1 | | -# Simple MCP Client Core (SSE) |
| 1 | +# Simple MCP Client Core (Streamable HTTP) |
2 | 2 |
|
3 | | -This is a simple MCP (Model Context Protocol) client implemented with the rust-mcp-sdk, dmeonstrating SSE transport, showcasing fundamental MCP client operations like fetching the MCP server's capabilities and executing a tool call. |
| 3 | +This is a simple MCP (Model Context Protocol) client implemented with the rust-mcp-sdk, dmeonstrating Streamable HTTP transport, showcasing fundamental MCP client operations like fetching the MCP server's capabilities and executing a tool call. |
4 | 4 |
|
5 | 5 | ## Overview |
6 | 6 |
|
7 | 7 | This project demonstrates a basic MCP client implementation, showcasing the features of the [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk). |
8 | 8 |
|
9 | | -This example connects to a running instance of the [@modelcontextprotocol/server-everything](https://www.npmjs.com/package/@modelcontextprotocol/server-everything) server, which has already been started with the sse flag. |
| 9 | +This example connects to a running instance of the [@modelcontextprotocol/server-everything](https://www.npmjs.com/package/@modelcontextprotocol/server-everything) server, which has already been started with the `streamableHttp` argument. |
10 | 10 |
|
11 | 11 | It displays the server name and version, outlines the server's capabilities, and provides a list of available tools, prompts, templates, resources, and more offered by the server. Additionally, it will execute a tool call by utilizing the add tool from the server-everything package to sum two numbers and output the result. |
12 | 12 |
|
|
21 | 21 | cd rust-mcp-sdk |
22 | 22 | ``` |
23 | 23 |
|
24 | | -2- Start `@modelcontextprotocol/server-everything` with SSE argument: |
| 24 | +2- Start `@modelcontextprotocol/server-everything` with `streamableHttp` argument: |
25 | 25 |
|
26 | 26 | ```bash |
27 | | -npx @modelcontextprotocol/server-everything sse |
| 27 | +npx @modelcontextprotocol/server-everything streamableHttp |
28 | 28 | ``` |
29 | 29 |
|
30 | | -> It launches the server, making everything accessible via the SSE transport at http://localhost:3001/sse. |
| 30 | +> It launches the server, making everything accessible via the streamableHttp transport at http://localhost:3001/mcp. |
31 | 31 |
|
32 | 32 | 2. Open a new terminal and run the project with: |
33 | 33 |
|
34 | 34 | ```bash |
35 | | -cargo run -p simple-mcp-client-sse-core |
| 35 | +cargo run -p simple-mcp-client-streamable-http-core |
36 | 36 | ``` |
37 | 37 |
|
38 | 38 | You can observe a sample output of the project; however, your results may vary slightly depending on the version of the MCP Server in use when you run it. |
39 | 39 |
|
40 | | -<img src="../../assets/examples/simple-mcp-client-sse.png" width="640"/> |
| 40 | +<img src="../../assets/examples/simple-mcp-client-streamable-http" width="640"/> |
0 commit comments