Commit graph rust-sdk/examples
Author SHA1 Message Date
4t145
a66f66ae34
fix: error for status in post method of streamable http client (#238) 2025-05-29 14:51:24 +08:00
4t145
209be7bdb8
refactor: provide http server as tower service (#228)
* refactor: streamable http server as tower service
2025-05-28 19:21:40 +08:00
dependabot[bot]
915bc3fb37
chore(deps): update rig-core requirement from 0.10.0 to 0.12.0 (#231)
Updates the requirements on [rig-core](https://github.com/0xPlaygrounds/rig) to permit the latest version.
- [Release notes](https://github.com/0xPlaygrounds/rig/releases)
- [Commits](https://github.com/0xPlaygrounds/rig/compare/rig-core-v0.10.0...rig-core-v0.12.0)

---
updated-dependencies:
- dependency-name: rig-core
  dependency-version: 0.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-27 08:44:47 +08:00
jokemanfire
d5a72e43c1
fix(examples): add servers in examples's readme (#229)
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-05-26 21:00:49 +08:00
jokemanfire
0ce14186ba
chore(deps): update rand requirement from 0.8 to 0.9 (#226)
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-05-26 18:58:33 +08:00
jokemanfire
0d52b7d24f
fix(examples): add clients in examples's readme (#225)
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-05-26 18:32:29 +08:00
Yang Yexuan
23e8200a58
fix(examples): Make mcp_oauth_server example worked in MCP inspector OAuth (#219) 2025-05-26 09:12:12 +08:00
z9rtm
5bbfcccfba
ci: add example-test workflow for testing and building examples (#211)
This workflow sets up a new CI job to handle testing and building of example projects in the repository. It includes setting up Node.js, Rust, Python, and necessary caching to ensure proper environment preparation. Example directories are iterated to run tests and builds for each valid Cargo project.

Co-authored-by: GCOV Github Badge <build@github.com>
2025-05-22 11:35:29 +08:00
dependabot[bot]
4e5685cb1c
chore(deps): update thiserror requirement from 1.0 to 2.0 (#208)
---
updated-dependencies:
- dependency-name: thiserror
  dependency-version: 2.0.12
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-21 11:17:16 +08:00
4t145
076dc2c2cd
feat: better http server support (#199)
* feat: better http server support

1. allow user get extensions in tool call.
2. allow user serve sse service without initialization.

* fix: fix document test
2025-05-19 18:49:18 +08:00
4t145
a3b42c4a83
fix: sse endpoint build follow js's new URL(url, base) (#197)
* fix: sse endpoint build follow js's `new URL(url, base)`

* fix: fix feature denpencies
2025-05-19 13:09:00 +08:00
Humberto Yusta Gómez
64995cc40c
fix: cleanup zombie processes for child process client (#156)
* feat(client): cleanup of zombie processes in child process client

Using process wrap library, Process Group for Unix and Job Object for Windows

* fix: install extra dep based on feature, update examples take owned command

Install process-wrap if transport-child-process feature is enabled. Update examples to take ownership
of the command instead of mutable reference

* fix: update other examples, comments and readme to take ownership of command

Updated more examples, comments and readme to take command instead of mutable ref.
Also small fix in cargo toml of example to use local path.

* refactor: add configure command ext

Added configure command ext to tokio process command so that
you can use .configure() to use inline commands for mcp stdio client.
Added warning if start kill process fails
2025-05-18 18:38:47 +08:00
4t145
5e4e77efa5
refactor: fix error introduced by merge, and reorganize feature (#185) 2025-05-18 14:15:41 +08:00
4t145
9a771fb157
refactor: Transport trait and worker transport, and streamable http client with those new features. (#167)
* refactor: a transport trait and streamable http client

* test: test with js streamable http server

* refactor: separate sse stream connection

* fix(test): streamable http client test with js

* fix(test): wait longer time for js server startup
2025-05-17 23:53:38 +08:00
高庆丰
614d974d8d
example: Add named pipe example (#181) 2025-05-16 10:40:03 +08:00
jokemanfire
6de444c62f
feat(examples): Add func call support (#168)
Some works about simple-chat.
1. fix some bugs.
2. add func call optional.

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-05-12 13:52:57 +08:00
4t145
787cc015b7
feat(extension): extract http request part into rmcp extension (#163)
* feat(extension): extract http request part into rmcp extension

* perf(extension): insert extension from one entrypoint
2025-05-09 10:36:52 +08:00
Dennis Kawurek
546490a95e
fix: build errors for WASI target (#151) 2025-05-09 01:51:16 +08:00
4t145
57e14c56e8
feat(transport): support streamable http server (#152)
* feat(transport): support streamable http server

* refactor(transport): add common module for shared transport utilities

* perf(tracing): add more log for streamable http session

* fix(test): fix port conflict in test with js

* fix(transport): fix id generating and session management

1. cancel when deleting
2. use `wrapping` and `saturating` correctly

* chore(naming): rename sse server to streamable http server
2025-05-08 13:57:51 +08:00
Andrew Culberson
6c2e6e22ee
feat(oauth): fixes + cache client credentials (#157)
credentials optimize
2025-05-08 09:18:35 +08:00
jokemanfire
afb8a905e5
chore: add oauth2 support (#130)
1.add oauth2 server and client example
2.add oauth2 impl in sse
3.add auth doc 
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-04-29 17:52:59 +08:00
Paul Ellenbogen
b1542a6153
fix: fix resource leak (#136)
When a running service is dropped, its connections should be closed and its resources should be
cleaned up.

This changes the default from leaving services running to closing them. Library users who want
their services to remain running should call `waiting` on their running service, in a new task
where necessary.

Co-authored-by: Paul Ellenbogen <pe5@cs.princeton.edu>
2025-04-28 17:56:20 +08:00
jokemanfire
5e4d447b32
chore: make cli command in simple-chat (#145)
add config,chat,help command
2025-04-27 09:10:51 +08:00
Eucalypt
6c2c02454d
chore: disable unix_socket example on windows (#146) 2025-04-26 14:27:15 +08:00
jokemanfire
b6fabc8836
chore: make proxy in simple-chat configure (#134)
and remove some prints and some useless codes

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-04-20 11:00:47 +08:00
jokemanfire
04a0a2cefb
docs: fix doc in simple-chat (#129) 2025-04-14 17:22:45 +08:00
Ofer Affias
82239581ed
docs: fix typo and clarify instructions (#124) 2025-04-11 09:05:48 +08:00
Luke Francl
dffae27cf0
docs: update calculator example description (#115)
The example in the README uses "sum" for both `sum` and `sub`. I changed it to "difference". For consistency, I also updated the example code to use the same term.
2025-04-10 20:04:15 +08:00
jokemanfire
2125698fdc
docs: add a simple chat client for example (#119)
1. optimize the readme in root
2. add example

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-04-10 16:52:25 +08:00
Rik Huijzer
583a513448
fix: fix 2 cargo warnings (#112)
* fix: fix 3 cargo warnings

* revert `version = "1.0"` removal
2025-04-09 18:09:33 +08:00
Ruangyot Nanchiang
feb224c9aa
Fix typo for Claude desktop config file path correction and add more example for Windows, Linux, and MacOS (#107)
* fix(typo): claude desktop config file path correction
2025-04-09 10:50:26 +08:00
Rik Huijzer
fdfb5274e8
docs: give macOS link and clarify missing UI (#110)
fix doc in examples/README.md.
2025-04-09 08:55:07 +08:00
byeblack
d6a26fcd31
fix(rig-integration): implement ToolEmbeddingDyn trait for McpToolAdaptor (#99)
- Added ToolEmbeddingDyn trait for McpToolAdaptor to enable dynamic loading of McpTool
- Enhanced logging to record details

Co-authored-by: byeblack <byeblack@misaki.red>
2025-04-07 10:28:19 +08:00
jokemanfire
36834f37d0
fix(macro): add generics marco types support (#98)
add generic marco support

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-04-07 10:01:28 +08:00
4t145
68375460df
feat: revision-2025-03-26 without streamable http (#84)
1. Suppot revision 2025-03-26 data types
2. Support meta, progress tokne, and extensions in request/notification,
3. Remove `Message`, use `JsonRpcMessage` directly
2025-04-07 09:47:39 +08:00
A₿del ∞/21M
cced5e9c2f
chore: fix broken wasi example link (#100)
fix doc's link in example
2025-04-07 09:37:52 +08:00
Ruangyot Nanchiang
57f2ba265f
Add Claude desktop quick start and update Cargo.toml of examples/servers, examples/clients (#94)
* feat(readme): add Claude Desktop quick start guide

* fix(readme): correct typo in Claude Desktop instructions
2025-04-05 13:07:31 +08:00
Jonathan Hendler
2744cde0d9
fix(typo): nit language corrections (#90) 2025-04-04 12:20:48 +08:00
Bob Liu
6a74451c15
fix: fix rig chat agent output format (#86) 2025-04-03 13:48:38 +08:00
jokemanfire
c30d8063e3
ci: add spell check (#82)
for code greater use spell check

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-04-02 13:55:37 +08:00
Bob Liu
6a648b8827
chore: fix typos (#79) 2025-04-02 01:15:01 +08:00
4t145
2c0cafdde3
feat(tool): allow tool call return a serializable value in json format (#75) (#78) 2025-04-01 15:53:01 +08:00
4t145
923e87af4d
feat: Sse server auto ping (#74)
1. auto ping in sse stream every second to make cursor happy
2. configurable sse keep alive

---------

Co-authored-by: = <=>
2025-04-01 10:54:09 +08:00
Todsaporn Banjerdkit
59c975887e
docs: format and fix typo (#72) 2025-03-31 16:13:17 +08:00
4t145
0eea9aad4a
fix(test): fix tool deserialization error (#68) 2025-03-31 13:05:35 +08:00
Jefry Dewangga
d6fb12b69f
chore: format code correctly (#66) 2025-03-30 23:29:13 +08:00
Sandro Hanea
50fadfb81b
[Example] Small fix on incorrect counter logic and improve prompt handling (#63)
The counter decrement in `get_value` was removed to prevent unintended changes to the counter state. Additionally, `get_prompt` was updated to parse and validate the `message` argument properly, ensuring better error handling and formatting.

Co-authored-by: sandrohanea <me@sandro.rocks>
2025-03-30 00:34:32 +08:00
jokemanfire
0a2f13a1f4
style: fmt the project (#54)
add rustfmt.toml

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-03-28 23:50:46 +08:00
Wang Ruobiao
59bfb6e748
refactor(sse_server): separate router and server startup (#52)
* feat: expose axum router

* feat: add axum_router example with SSE server implementation

* refactor: simplify SseServer configuration handling in server setup

* docs: add warning to SseServer::new about potential post_path issues with embedded routers
2025-03-28 22:06:50 +08:00
4t145
0be6067326
Move whole rmcp crate to offcial rust sdk (#44)
* get rid of async-trait

* move rmcp to official-rust-sdk

* replace master with main

* update readme, change license

* fix typo

* Update README.md

Co-authored-by: Jefry Dewangga <jefrydco@gmail.com>

* fix typos

---------

Co-authored-by: = <=>
Co-authored-by: Jefry Dewangga <jefrydco@gmail.com>
2025-03-27 17:33:41 -04:00