rust-sdk/examples/simple-chat-client
Dale Seo 9e881a645b
Implement SEP-1319: Decouple Request Payload from RPC Methods (#617)
* feat: implement SEP-1319 Decouple Request Payload from RPC Methods

* test: update tests

* fix: update handler trait methods to use new types

* fix: update examples

* fix: correct deprecation version

* fix: update wrapper macros to use new *Params type names
2026-01-16 12:16:52 -05:00
..
src Implement SEP-1319: Decouple Request Payload from RPC Methods (#617) 2026-01-16 12:16:52 -05:00
Cargo.toml feat!: remove SSE transport support (#562) 2025-12-01 20:40:13 -05: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