rust-sdk/examples/simple-chat-client
adam jones eb5a7f7408
feat!: remove SSE transport support (#562)
SSE transport has been removed from the MCP specification in favor of
streamable HTTP. This removes all SSE-specific transport code:

- Remove `transport-sse-client` and `transport-sse-server` features
- Remove `SseClientTransport` and `SseServer` types
- Remove SSE-specific examples (`counter_sse`, `counter_sse_directly`)
- Migrate auth examples from SSE to streamable HTTP
- Update tests to remove SSE transport usage
- Update documentation

BREAKING CHANGE: The following have been removed:
- `transport-sse-client` feature
- `transport-sse-client-reqwest` feature
- `transport-sse-server` feature
- `SseClientTransport` type
- `SseServer` type
- `sse_client` and `sse_server` modules

Users should migrate to streamable HTTP transport which provides
equivalent functionality. See `StreamableHttpClientTransport` and
`StreamableHttpService` for the replacement APIs.

Ref: https://github.com/modelcontextprotocol/rust-sdk/pull/561#issuecomment-3576551699
2025-12-01 20:40:13 -05:00
..
src feat!: remove SSE transport support (#562) 2025-12-01 20:40:13 -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