Commit graph

318 commits

Author SHA1 Message Date
dependabot[bot]
de62b1b087
chore(deps): update askama requirement from 0.14 to 0.15 (#600)
Updates the requirements on [askama](https://github.com/askama-rs/askama) to permit the latest version.
- [Release notes](https://github.com/askama-rs/askama/releases)
- [Commits](https://github.com/askama-rs/askama/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: askama
  dependency-version: 0.15.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>
Co-authored-by:  jokemanfire <hu.dingyang@zte.com.cn>
2026-01-06 09:29:33 +08:00
Nicolas Pellegrin
e04c4a1397
docs: update README external links (#603) 2026-01-06 09:25:17 +08:00
Alex
a7acdd8892
docs: clarity and formatting (#602) 2026-01-06 09:20:52 +08:00
Pavel Bezglasny
e9029ccc99
feat(elicitation): implement SEP-1330 Elicitation Enum Schema Improvements (#539) 2025-12-24 13:54:20 -05:00
Frankie Colson
6fd55f02fc
fix(docs): add spreadsheet-mcp to Built with rmcp (#582)
* docs: add spreadsheet-read-mcp to Built with rmcp

* Update description with repo rename, new features
2025-12-24 09:30:37 +08:00
jokemanfire
621c9f619e
feat(task): add task support (SEP-1686) (#536)
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-12-22 09:01:00 -05:00
Dale Seo
eeacd1375f
Add optional icons field to RawResourceTemplate (#589)
* feat: add optional icons field to RawResourceTemplate

* chore: update JSON schema for ResourceTemplate icons
2025-12-18 16:56:55 -05:00
github-actions[bot]
0d65822c38
chore: release v0.12.0 (#577)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-18 16:07:25 -05:00
Michael Bolin
e0faf1ed51
feat: add support for custom requests (#590)
#580 and #556 introduced support for custom notifications,
so this PR takes the next logical step and adds support for custom requests:

- Introduces `CustomRequest` and `CustomResult` model types, wires them into the client/server
  request and result unions, and allows `ClientRequest::method()` to return the dynamic method
  name.
- Implements serde and meta handling for `CustomRequest` so `_meta` is carried through
  extensions; adds default `on_custom_request` handlers that return `METHOD_NOT_FOUND` unless
  overridden.
- Updates JSON schema fixtures to include the new request/result shapes and `EmptyObject`
  strictness.
- Adds tests for custom request roundtrips and end-to-end client↔server handling.
- Focused integration test in `crates/rmcp/tests/test_custom_request.rs`.

For additional testing, I used this locally to update Codex to use a custom
request instead of a custom notification so that it gets an "ack" from the MCP
server to ensure it has processed the update before sending more messages:
https://github.com/openai/codex/pull/8142.
2025-12-18 12:41:06 -05:00
Michael Bolin
2e3cc4a973
feat: add support for custom server notifications (#580)
https://github.com/modelcontextprotocol/rust-sdk/pull/556 introduced support for
custom client notifications, so this PR makes the complementary change, adding
support for custom server notifications.

MCP clients, particularly ones that offer "experimental" capabilities,
may wish to handle custom server notifications that are not part of the
standard MCP specification. This change introduces a new
`CustomServerNotification` type that allows a client to process
such custom notifications.

- introduces `CustomServerNotification` to carry arbitrary methods/params while
  still preserving meta/extensions; wires it into the `ServerNotification` union
  and `serde` so `params` can be decoded with `params_as`
- allows client handlers to receive custom notifications via a new
  `on_custom_notification` hook
- adds integration coverage that sends a custom server notification end-to-end
  and asserts the client sees the method and payload

Test:

```shell
cargo test -p rmcp --features client test_custom_server_notification_reaches_client
```
2025-12-16 12:48:03 -05:00
Tanish Desai
31d242b1e4
fix: correct redirect URI in client-metadata.json (#585)
Update redirect_uris entry to the intended callback URL
2025-12-15 13:17:39 -05:00
Dale Seo
d7a05aa43f
fix: update process-wrap to v9.0 (#586) 2025-12-15 15:05:06 +08:00
Tanish Desai
f20ed202af
Add SEP-991 (CIMD) support for URL-based client IDs (#570)
* feat(auth): add cimd support for SEP-991

add cimd support for url-based client ids

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* test(auth): add unit tests for is_https_url helper

Add test coverage for is_https_url helper to validate HTTPS scheme, non-root paths,
and reject http, javascript, data schemes, and invalid inputs per SEP-991 requirements.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* feat(example): add CIMD OAuth server for SEP-991 testing

Implements a new server example (servers_cimd_auth_streamhttp) that
demonstrates CIMD (Client ID Metadata Document) support for URL-based
client IDs. The server validates client_id URLs, fetches and validates
client metadata documents, and provides OAuth 2.0 authorization endpoints
with MCP integration for end-to-end testing.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* fix(oauth): add CORS headers to token endpoint

Add CORS headers to token endpoint to allow cross-origin requests from browsers
during OAuth authorization code exchange flow.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* refactor: improve is_https_url function and consolidate tests

- Improve is_https_url function formatting and readability
- Merge all test cases into single test_is_https_url_scenarios function
- Add missing test case for "https://" URL

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* refactor: use map_err instead of match for error handling in auth.rs

Replace the verbose match statement with
map_err for more idiomatic

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* feat: add client-metadata.json

Add client metadata file for SEP-991 CIMD
authentication support

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

---------

Signed-off-by: tanish111 <tanishdesai37@gmail.com>
2025-12-10 08:55:38 -05:00
Thiago Martins
e3fd384a45
fix(docs): update CONTRIBUTE.MD (#579) 2025-12-10 09:33:22 +08:00
Dale Seo
8d33b155b6
refactor: merge cached_schema_for_type into schema_for_type (#581) 2025-12-09 20:04:52 -05:00
jokemanfire
bce0555068
fix(oauth): rfc8414 should judement the response_types (#485)
response_types_supported should be judement while try to do 'Authorization Code Flow'

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-12-09 11:18:18 -05:00
Sungjoo Kim
d4fcac02f8
Add NexusCore MCP to project list (#573)
* feat: add NexusCore MCP to project list

* docs: update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 09:16:18 +08:00
dependabot[bot]
ad608f080e
chore(deps): update darling requirement from 0.21 to 0.23 (#574)
Updates the requirements on [darling](https://github.com/TedDriggs/darling) to permit the latest version.
- [Release notes](https://github.com/TedDriggs/darling/releases)
- [Changelog](https://github.com/TedDriggs/darling/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TedDriggs/darling/compare/v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: darling
  dependency-version: 0.23.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>
Co-authored-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-12-09 09:15:05 +08:00
github-actions[bot]
4c87f7f163
chore: release v0.11.0 (#568)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-08 16:42:02 -05:00
Dale Seo
df84555065
Implements outputSchema validation (#566)
* feat: implement output schema validation

* fix: calculator example comply MCP spec

* refactor: merge cached_schema_for_output into schema_for_output
2025-12-08 16:13:19 -05:00
Nhat-Vu Nguyen
3c62ee8952
docs: add video-transcriber-mcp-rs to projects built with rmcp (#565) 2025-12-04 09:41:55 +08:00
Pavel Bezglasny
81411fc12d
feat(meta): add _meta field to prompts, resources and paginated result (#558) 2025-12-04 09:38:47 +08:00
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
Jonson Petard
3dee024325
fix(streamable-http): gracefully shutdown while client connected (#494)
* fix(streamable-http): gracefully shutdown while client connected

* fix: adviced comments

* fix: windows test build
2025-12-02 09:22:52 +08:00
github-actions[bot]
57d1ac94a0
chore: release v0.9.2 (#567)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-01 16:06:44 -05:00
Michael Bolin
4ef1a163f4
feat: add support for custom client notifications (#556)
MCP servers, particularly ones that offer "experimental" capabilities,
may wish to handle custom client notifications that are not part of the
standard MCP specification. This change introduces a new
`CustomClientNotification` type that allows a server to process
such custom notifications.

- introduces `CustomClientNotification` to carry arbitrary methods/params while
  still preserving meta/extensions; wires it into the `ClientNotification` union
  and `serde` so `params` can be decoded with `params_as`
- allows server handlers to receive custom notifications via a new
  `on_custom_notification` hook
- adds integration coverage that sends a custom client notification end-to-end
  and asserts the server sees the method and payload

Test:

```shell
cargo test -p rmcp --features client test_custom_client_notification_reaches_server
```
2025-12-01 15:58:18 -05:00
Tanish Desai
b6dcb282d9
chore: replace paste with pastey for macros feature (#564)
Signed-off-by: tanish111 <tanishdesai37@gmail.com>
2025-12-01 13:11:03 -05:00
adam jones
94428d543f
docs: mark SSE transport examples as deprecated (#561)
SSE transport has been removed from newer versions of the MCP spec.
Streamable HTTP is preferred as it is more reliable.

Moves SSE examples to a collapsed details section at the bottom of
the example list and removes them from the 'How to Run' section.
2025-11-25 10:34:59 -05:00
github-actions[bot]
2b60f8af0f
chore: release v0.9.1 (#548)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-24 13:01:48 -05:00
Tanish Desai
97ef6c97e4
Implementation of SEP-986: Specify Format for Tool Names (#551)
* feat: implement SEP-986 tool name validation and error reporting

Adds validation for MCP tool naming conventions as specified in SEP-986.
Ensures Rust SDK enforces standardized tool name formats, provides clear
errors for invalid names, and improves consistency across implementations.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* fix(doctests): correct import paths in tool_name_validation

Update doctest examples to use the correct module path
rmcp::handler::server::tool_name_validation instead of
rmcp::model::tool_name_validation.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* fix: only warn when warnings exist

Prevent empty warnings array from triggering warning output.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* fix: remove internal check

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* refactor: remove doc comments from validation functions

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* refactor: remove doc comments from add_route functions

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* refactor: make tool name validation helpers private

Made ToolNameValidationResult and its functions and fields private.
Made validate_tool_name and issue_tool_name_warning private.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

---------

Signed-off-by: tanish111 <tanishdesai37@gmail.com>
2025-11-24 10:40:03 -05:00
Xijun Dai
cf45070ce7
feat(streamable-http): support both SSE and JSON response formats (#540)
What this enables:

- Clients can accept either Server-Sent Events (SSE) or JSON responses
- Flexible content negotiation based on server preferences
- Improved interoperability with different MCP server implementations
2025-11-21 15:47:29 +08:00
dependabot[bot]
25e2ec41ab
chore(deps): bump actions/checkout from 5 to 6 (#554)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-11-21 09:25:40 +08:00
Jack Amadeo
da57ee7697
fix: don't block on creating the SSE stream (#553) 2025-11-19 17:20:00 -08:00
jokemanfire
76cdf48b68
fix(shemars): use JSON Schema 2020-12 as Default Dialect (#549)
TODO: Not fully compatible with 2020-12 yet.
2025-11-19 09:55:39 +08:00
Tanish Desai
1d38d68709
fix: exclude WASI example from workspace to avoid linker errors (#541)
* fix: exclude WASI example from workspace to avoid linker errors on Mac/arm64

Cargo uses the macOS host linker for workspace builds,
but that linker cannot resolve WASI WebAssembly imports
(such as _wasi:cli/run@0.2.x). As a result, including a WASI
crate in the workspace causes builds to fail on macOS systems using arm64.

Solution: Mark the WASI example as non-default by excluding it from the
workspace members. This makes the WASI package optional, so `cargo build`
won't touch it, and it can be built explicitly when needed with:
  cargo build -p wasi-mcp-example --target wasm32-wasip2

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* fix: make WASI example standalone for CI compatibility

Replace workspace inheritance with explicit values in examples/wasi/Cargo.toml
since excluded packages cannot inherit from workspace. This fixes CI manifest
parsing errors when building WASI example explicitly.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* fix: exclude examples from default builds using default-members

Only core crates are built by default, preventing WASI linker errors
on macOS while keeping it in workspace for property inheritance.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

---------

Signed-off-by: tanish111 <tanishdesai37@gmail.com>
2025-11-18 09:28:41 +08:00
Måns
b6cbd39503
fix(oauth): let OAuth discovery skip to next well-known URL candidate on JSON parse error. (#545) 2025-11-18 09:21:25 +08:00
github-actions[bot]
9cba162071
chore: release v0.9.0 (#535)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-17 10:31:01 -05:00
Alex Hancock
31be9b25b5
feat(auth): implement CredentialStore trait (#542) 2025-11-17 10:17:08 -05:00
Dylan Anthony
03040f8b0b
feat(tool): add _meta to tool definitions (#534) 2025-11-11 09:27:52 +08:00
github-actions[bot]
941300acbe
chore: release v0.8.5 (#512)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 09:25:44 -05:00
Gabriel Peal
82f9b0976a
fix(oauth): respect oauth-protected-resource discovery (#511) 2025-11-05 09:19:13 -05:00
github-actions[bot]
101b8ad84f
chore: release v0.8.4 (#506)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-04 16:39:13 -05:00
Gabriel Peal
dcbeb9b9bc
fix(oauth): fix oauth credential refresh (#509)
auth.rs was using an in-memory expires-at which is only set on initial token exchange.
Instead, this PR switches it to use the expires-at set in the credentials that are passed in.
2025-11-04 16:17:11 -05:00
Alex Hancock
d3ddc09e52
fix: do not manually construct fallback authorization metadata (#507) 2025-11-03 12:08:32 -05:00
George
04e0590652
fix(doc): add stakpak-agent to Built with rmcp section (#500)
* Add stakpak-agent to Built with rmcp section

* Remove extra formatting
2025-10-29 19:07:59 +08:00
Augustin Villetard
579958fe81
fix: client name mismatch (#503) 2025-10-29 17:47:37 +08:00
github-actions[bot]
9012709079
chore: release v0.8.3 (#498)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-22 16:21:26 -04:00
Gabriel Peal
3822d9d39c
fix: accept 204 in addition to 202 on initialize (#497) 2025-10-22 15:08:33 -04:00
github-actions[bot]
44129e496d
chore: release v0.8.2 (#480)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-20 20:52:35 -04:00
Gabriel Peal
e98e0d05df
fix(oauth): three oauth discovery and registration issues (#489) 2025-10-20 20:49:43 -04:00