Commit graph rust-sdk/crates
Author SHA1 Message Date
dependabot[bot]
83c7aae49d
chore(deps): update sse-stream requirement from 0.1.4 to 0.2.0 (#230)
Updates the requirements on [sse-stream](https://github.com/4t145/sse-stream) to permit the latest version.
- [Release notes](https://github.com/4t145/sse-stream/releases)
- [Commits](https://github.com/4t145/sse-stream/compare/release-0.1.4...release-0.2.0)

---
updated-dependencies:
- dependency-name: sse-stream
  dependency-version: 0.2.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:43:53 +08:00
Lucas Nogueira
633d42425a
feat: add cancellation_token method to RunningService (#218) 2025-05-26 18:57:48 +08:00
Pete Hayman
4e8686ff47
fix: generic ServerHandler (#223) 2025-05-26 14:13:34 +08:00
Longhua Zhang
22134eb33e
fix: comment error (#215)
Co-authored-by: plutoyzhang <plutoyzhang@tencent.com>
2025-05-23 15:14:52 +08:00
emi0x7d1
d0bbb22850
Server info is only retrieved once during initialization (#214) 2025-05-23 03:51:26 +08:00
dependabot[bot]
c8ea0f6051
chore(deps): update base64 requirement from 0.21 to 0.22 (#209)
Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.21.0...v0.22.1)

---
updated-dependencies:
- dependency-name: base64
  dependency-version: 0.22.1
  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:56 +08:00
A-afflatus
8222e18e40
fix: resolve the server 406 error in API calls (#203) 2025-05-21 11:16:48 +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
jokemanfire
c1c4c9a0c9
doc: use hierarchical readme for publishing (#198) 2025-05-19 13:15:49 +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
4t145
817e62d895
feat: throw initialize error detail (#192) 2025-05-19 09:41:56 +08:00
4t145
35282ee34c
feat: sse client optionally skip the endpoint event (#187) 2025-05-18 18:55:02 +08:00
4t145
c1e282e50d
fix: more friendly interface to get service error (#190) 2025-05-18 18:54:44 +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
Abhay Agarwal
68ddea3ad5
feat(server): add annotation to tool macro (#184)
skip serializing the tool annotations if none, fixes mcp inspector
2025-05-18 16:04:58 +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
jokemanfire
01eedb7770
fix(schemar): use self-defined settings (#180)
Ignores fields that are not defined in the spec file.

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-05-16 14:40:28 +08:00
Stanley Horwood
e9a5ae9901
feat(model): add json schema generation support for all model types (#176)
* feat(model): add json schema generation support for all model types

This commit adds JSON Schema support for all model types by implementing
`schemars::JsonSchema` trait. The feature is gated behind the new
`schemars` feature flag. This enables automatic schema generation for
API documentation and validation purposes. Added tests to verify schema
generation for client and server JSON-RPC messages.

* fix(model): add manual json schema implementation for `NumberOrString`

This commit adds a manual implementation of `JsonSchema` trait for the
`NumberOrString` enum to properly represent its union type nature in
JSON Schema. The schema now correctly specifies that the type can be
either a number or a string using the `oneOf` validation keyword.

* fix(model): skip extensions field in json schema generation

The `Extensions` type was incorrectly included in JSON schema
generation, which could lead to confusing API documentation. This commit
adds `#[schemars(skip)]` attribute to all `extensions` fields in request
and notification structs, and removes the manual `JsonSchema`
implementation for the `Extensions` type since it's an internal
implementation detail that shouldn't be exposed in the schema.
2025-05-15 23:56:31 +08:00
Jonathan Hendler
5d92061ece
feat(openapi): add OpenAPI v3 compatibility and test for nullable field schema workaround (#135) (#137) 2025-05-14 14:06:59 +08:00
Aaron
030b6f0858
fix(transport-sse-server): cleanup on connection drop (#165) 2025-05-12 14:15:34 +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
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
Mauro Sardara
52c0651158
feat: allow use of reqwest without ring provider (#155)
Signed-off-by: Mauro Sardara <msardara@cisco.com>
2025-05-08 02:58:03 +08:00
4t145
09474d4769
fix(test): skip serialize tool's annotation if empty (#160)
* fix(test): skip serialize tool's annotation if empty

1. skip serialize tool's annotation if empty
2. close js server and client when close

* fix(test): fix test with js, don't close too early
2025-05-07 15:22:24 +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
18346b94e4
fix(rmcp-macros): fix extract_doc_line code (#142)
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-04-20 11:00:59 +08:00
Sandipsinh Dilipsinh Rathod
3a97917cd7
feat(rmcp-macro): generate description from docs (#141)
* feat: generate description from docs

* fix logic to extract doc

* fmt

* chore: undo unnecessary changes in `Cargo.toml`

* chore: undo unnecessary changes in `Cargo.toml`

* chore: remove unnecessary code in tests

* create `extract_doc_line`

* fmt

* make sure the string is not empty

* avoid multilayer nesting

* fmt
2025-04-18 10:56:16 +08:00
Nora
9fc1cc0e0e
chore: remove un-used tower.rs (#125)
Signed-off-by: nora-coder-dot <nora6677@gmail.com>
Co-authored-by: nora-coder-dot <nora6677@gmail.com>
2025-04-11 16:11:28 +08:00
4t145
31da5ff02d
fix(handler): do call handler methods when initialize server (#118) 2025-04-10 15:06:45 +08:00
Rik Huijzer
d0962ec9ee
docs: add an overview to rmcp/src/lib.rs (#116) 2025-04-10 09:11:35 +08:00
jokemanfire
7ae2728c54
fix(macros): add error deal (#109)
1.Check whether the parameters include aggregated parameters and individual parameters
2.Check if the toolbox attribute is default

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-04-09 10:15:33 +08:00
Eitan Yarmush
6a423048fa
feat: extensions to context (#102) 2025-04-08 10:01:17 +08:00
Sandipsinh Dilipsinh Rathod
938ecbe2fb
fix(server): schemars compilation errors (#104) 2025-04-08 09:41:55 +08:00
4t145
b9be9797d1
fix(test): fix test introduced by #97 (#101) 2025-04-07 17:31:56 +08:00
Jonathan Hendler
910d3b39db
test(context): test context request handling and refactor for reusable client-server tests (#97) 2025-04-07 10:13:05 +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
Jonathan Hendler
72e7533e41
test(logging): Add tests for logging (#96)
* test(logging): implement basic logging functionality

* test(logging): add comprehensive server transport tests
2025-04-05 20:45:57 +08:00
Jonathan Hendler
2744cde0d9
fix(typo): nit language corrections (#90) 2025-04-04 12:20:48 +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
jokemanfire
4ca00c2052
fix(client): add error enum while deal client info (#76)
1. wrap the error type for more standardized
2. add more information in error for debug trace
3. wrap helper func for more user-friendly code

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-04-01 21:15:48 +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
Eitan Yarmush
588a013090
feat(transport): Sse client transport trait (#67)
* feat: created transport trait and impl

* feat(transport): abstract sse transport from the client definition

* test: add test with js server (#65)

* fix: use prefix to check mime type

* fix(test): fix tool deserialization error (#68)

* ci: add documentation generation job (#59)

* ci: add documentation generation job

1. add doc ci in workflow
2. remove the readme in rmcp crate

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>

* docs: fix doc test in README.md

1) fix doc test in readme
2) fix some fmt

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>

---------

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>

* fix(notification): fix wrongly error report in notification (#70)

* chore: fix lint errors by creating a type alias

* chore: resolve conflict

* chore: fix fmt

* chore: revert

---------

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
Co-authored-by: Jefry Dewangga <jefrydco@gmail.com>
Co-authored-by: 4t145 <u4t145@163.com>
Co-authored-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-03-31 16:22:54 +08:00
4t145
145b5de322
fix(notification): fix wrongly error report in notification (#70) 2025-03-31 13:50:27 +08:00
jokemanfire
b91fe54409
ci: add documentation generation job (#59)
* ci: add documentation generation job

1. add doc ci in workflow
2. remove the readme in rmcp crate

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>

* docs: fix doc test in README.md

1) fix doc test in readme
2) fix some fmt

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>

---------

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-03-31 13:46:31 +08:00