Commit graph

39 commits

Author SHA1 Message Date
Todsaporn Banjerdkit
59c975887e
docs: format and fix typo (#72) 2025-03-31 16:13:17 +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
4t145
0eea9aad4a
fix(test): fix tool deserialization error (#68) 2025-03-31 13:05:35 +08:00
Jefry Dewangga
ac1b8c6ddb
test: add test with js server (#65) 2025-03-31 00:22:14 +08:00
Jefry Dewangga
d6fb12b69f
chore: format code correctly (#66) 2025-03-30 23:29:13 +08:00
Takayuki Maeda
cc3f29934f
ci: use rust-cache (#60)
Replace actions/cache with rust-cache.
2025-03-30 08:15:38 +08:00
jokemanfire
0e2b115c10
fix(server): add error enum while deal server info (#51)
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-03-30 00:35:41 +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
jokemanfire
b9e192275b
ci: add commit-lint in CI (#50)
no need too many workflows's yaml file, for ci we just need one.

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-03-28 21:15:23 +08:00
Takayuki Maeda
4e6b222e09
docs: fix broken link (#53) 2025-03-28 08:12:21 -04:00
jokemanfire
ac01c4e081
docs: update the chinese doc (#48)
the chinese doc also should be update

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-03-28 08:10:25 -04:00
Ramnivas Laddad
595c4b8706
docs: fix the branch name for git dependency (#46) 2025-03-27 18:52:52 -04:00
Ramnivas Laddad
0e5cf6801a
doc: fix a typo in Cargo.toml (#45) 2025-03-27 18:52:20 -04: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
Ma1oneZhang
31493cfbcc
chore: decrease log level (#41)
Co-authored-by: ziyang zhang <zhangziyang@stu.cdut.edu.cn>
2025-03-20 21:32:34 -07:00
xring
b3d655da31
add an actix-web server sse example (#33)
* add an actix-web server sse example

remove unused import

* fix to apply cargo fmt and cargo clippy to pass the the repo checks
2025-03-19 21:15:45 -07:00
situ2001
9c33eedbcb
fix: update transport command to use the correct example server (#36)
* fix: update transport command to use the correct example server

* style: cargo fmt
2025-03-19 21:15:10 -07:00
situ2001
989453d0da
docs: add installation instructions for uv (#37) 2025-03-18 15:39:58 -04:00
Marc-Andre Giroux
042299f251
pin transport once, use project in write_message (#28) 2025-03-17 21:52:10 -07:00
niebayes
b1ed4e7204
add missing license (#35) 2025-03-17 21:37:08 -07:00
4t145
4597d1f047
Server wasm compatibility (#15)
* add axum sse example

* fix: make the sse axum folder name correct

* feat: add common modules for Axum SSE example

This commit adds supporting modules for the Axum Server-Sent Events (SSE) example:
- Added `counter.rs` with a simple counter router implementation
- Added `jsonrpc_frame_codec.rs` for decoding JSON-RPC frames
- Created a `mod.rs` to expose these modules
- Removed the previous SSE example configuration from Cargo.toml

* refactor: remove main.rs and update Cargo.toml for WASM compatibility

This commit makes two key changes:
1. Removes the main.rs file and make it a example
2. Add a wasi_std_io example

* refactor: simplify WASI I/O handling in example and fmt

Merged AsyncInputStream and AsyncOutputStream into a single WasiFd struct with std_in() and std_out() methods, reducing code duplication and improving clarity of the WASI standard I/O example.

* move examples to root
2025-03-14 11:21:33 -07:00
4t145
c0bd94dd85
Add an axum sse example (#12)
* add axum sse example

* fix: make the sse axum folder name correct

* feat: add common modules for Axum SSE example

This commit adds supporting modules for the Axum Server-Sent Events (SSE) example:
- Added `counter.rs` with a simple counter router implementation
- Added `jsonrpc_frame_codec.rs` for decoding JSON-RPC frames
- Created a `mod.rs` to expose these modules
- Removed the previous SSE example configuration from Cargo.toml

* move examples to root

* nit: remove extra newline here
2025-03-03 20:01:21 -08:00
Kalvin C
6609aa6aa8
chore: move examples out of various places into a top-level dir (#10) 2025-03-03 14:50:34 -05:00
Bradley Axen
b24e912543
fix: update cargo.tomls for publishing (#7) 2025-02-27 17:02:34 +01:00
David Soria Parra
a1da1a80a7
Merge pull request #3 from modelcontextprotocol/davidsp/github-workflows
feat:  github workflows
2025-02-25 15:02:36 +00:00
Alex Hancock
8f3cb34f6e
Merge pull request #2 from kalvinnchau/mcp-prompt-spec 2025-02-22 11:41:26 -05:00
David Soria Parra
e56d91c4a9
feat: github workflows
Run clippy, tests and cargo fmt checks at PR and push time.
2025-02-21 20:39:05 +00:00
Kalvin Chau
ef9309cc78 test: add impl of list/get prompt to main.rs and stdio_integration to
test both new methods
2025-02-21 09:16:34 -08:00
Kalvin Chau
7afab42c61 feat: remove concrete impl of get_prompt and list_prompts, and require
implementing types to define them, similar to other methods
2025-02-21 09:14:32 -08:00
Kalvin Chau
22b11ea127 feat: handle JsonRpcMessage::Error messages to propagate to the user 2025-02-20 19:38:23 -08:00
Kalvin Chau
08b73f3001 feat: add prompts support to mcp-client, ahere to MCP spec for prompts
- add new endpoints `list_prompts` and `get_prompt` in the MCP client
- update prompt model in mcp-core to make `description` and `arguments`
  optional, following MCP spec
2025-02-20 19:38:19 -08:00
Alex Hancock
fe1108c498
Merge pull request #1 from modelcontextprotocol/alexhancock/rust-sdk-init
Bring in mcp-* crates from goose as a starting point
2025-02-20 20:56:16 -05:00
Alex Hancock
79225a0d30 Address PR feedback and downgrade editions temporarily 2025-02-20 20:52:42 -05:00
Alex Hancock
3e3352dd8d Update to brand new 2024 edition of rust 2025-02-20 14:09:25 -05:00
Alex Hancock
4554644a3a Bring in mcp-* crates from goose as a starting point 2025-02-20 13:15:48 -05:00
David Soria Parra
91e8ba6363
Initial commit 2025-02-18 10:55:26 +00:00