rust-sdk/examples/simple-chat-client
Julián Montes de Oca 7f20a87825
feat: include reqwest in transport-streamble-http-client feature (#376)
* fix: add reqwest dependency to transport-streamable-http-client feature

- Fix compilation error when using transport-streamable-http-client feature due to missing dependency
- Move From<reqwest::Error> implementation to reqwest module

* feat(rmcp): enhance transport features by decoupling reqwest

- Added reqwest features for reqwest-based implementations.
- Updated documentation
- Modified error handling in SSE transport to use `String` for content type.
- Updated examples to include new features

* feat(rmcp): enhance transport features by decoupling reqwest

- Added reqwest features for reqwest-based implementations
- Updated documentation
- Modified error handling in SSE transport to use `String`
- Updated examples to include new features
2025-08-20 11:43:18 +08:00
..
src fix: match shape of the calltoolresult schema (#377) 2025-08-19 14:28:25 +08:00
Cargo.toml feat: include reqwest in transport-streamble-http-client feature (#376) 2025-08-20 11:43:18 +08:00
README.md feat(examples): Add func call support (#168) 2025-05-12 13:52:57 +08:00

Simple Chat Client

A simple chat client implementation using the Model Context Protocol (MCP) SDK. It just a example for developers to understand how to use the MCP SDK. This example use the easiest way to start a MCP server, and call the tool directly. No need embedding or complex third library or function call(because some models can't support function call).Just add tool in system prompt, and the client will call the tool automatically.

Usage

After configuring the config file, you can run the example:

./simple_chat --help                                                       # show help info
./simple_chat config > config.toml                                         # output default config to file
./simple_chat --config my_config.toml chat                                 # start chat with specified config
./simple_chat --config my_config.toml --model gpt-4o-mini chat             # start chat with specified model