Commit graph

434 commits

Author SHA1 Message Date
Guy Lichtman
baf22d37bb
chore: run all tests in ci without "local" feature (#761) 2026-03-23 19:03:16 -04:00
dependabot[bot]
f89e412200
chore(deps): update tokio-tungstenite requirement from 0.28.0 to 0.29.0 (#773)
Updates the requirements on [tokio-tungstenite](https://github.com/snapview/tokio-tungstenite) to permit the latest version.
- [Changelog](https://github.com/snapview/tokio-tungstenite/blob/master/CHANGELOG.md)
- [Commits](https://github.com/snapview/tokio-tungstenite/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: tokio-tungstenite
  dependency-version: 0.29.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>
2026-03-23 15:23:28 -04:00
Dale Seo
c8c0c0cffc
fix: prevent CallToolResult and GetTaskPayloadResult from shadowing CustomResult in untagged enums (#771)
The `#[serde(default)]` on `CallToolResult.content` (added in #752) made
all fields optional, causing `CallToolResult` to greedily match any JSON
object during `#[serde(untagged)]` deserialization of `ServerResult`.
Similarly, `GetTaskPayloadResult(Value)` matched everything before
`CustomResult(Value)` could be reached.

Fix by replacing derived `Deserialize` impls with custom ones:
- `CallToolResult`: require at least one known field to be present
- `GetTaskPayloadResult`: always fail (indistinguishable from
  `CustomResult` in JSON; construct programmatically via `::new()`)
2026-03-23 15:20:55 -04:00
jokemanfire
30cdc38c9a
chore: remove the rig example (#763)
The rig official has the mcp example, we need not to keep it just give the link.

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2026-03-23 09:01:49 +08:00
Guy Lichtman
3ea8c3c555
feat: add configuration for transparent session re-init (#760)
* feat: add configuration for transparent session re-init

* fix: in ci revert running tests without local until all tests pass

* fix: pr comments

* fix: documentation
2026-03-22 15:05:40 -04:00
Dale Seo
251ebec098
fix: drain in-flight responses on stdin EOF (#759) 2026-03-18 11:38:15 -04:00
Dale Seo
e709d0d084
fix: remove default type param from StreamableHttpService (#758) 2026-03-18 11:37:51 -04:00
Dale Seo
d485249048
fix: use cfg-gated Send+Sync supertraits to avoid semver break (#757) 2026-03-18 11:37:32 -04:00
Axel
55b478b0f4
fix(rmcp): surface JSON-RPC error bodies on HTTP 4xx responses (#748)
* fix(rmcp): surface JSON-RPC error bodies on HTTP 4xx responses

When a server returns a 4xx status with Content-Type: application/json,
attempt to deserialize the body as a ServerJsonRpcMessage before falling
back to UnexpectedServerResponse. This allows JSON-RPC error payloads
carried on HTTP error responses to be surfaced as McpError instead of
being lost in a transport-level error string.

Fixes #724

* fix(rmcp): surface JSON-RPC error bodies on HTTP 4xx responses

When a server returns a 4xx status with Content-Type: application/json,
attempt to deserialize the body as a ServerJsonRpcMessage before falling
back to UnexpectedServerResponse. This allows JSON-RPC error payloads
carried on HTTP error responses to be surfaced as McpError instead of
being lost in a transport-level error string.

Fixes #724

* fix(rmcp): only accept JsonRpcMessage::Error on non-success responses
2026-03-17 09:27:45 -04:00
Dale Seo
44dfcf5550
fix: default CallToolResult content to empty vec on missing field (#752) 2026-03-13 16:02:20 -04:00
Warwick
66712db808
fix(auth): redact secrets in Debug output for StoredCredentials and StoredAuthorizationState (#744)
* fix(auth): redact secrets in Debug output for StoredCredentials and StoredAuthorizationState

Removes `Debug` from the derive macros on `StoredCredentials` and
`StoredAuthorizationState` and replaces them with manual `Debug` impls
that print `[REDACTED]` for sensitive fields (access/refresh tokens,
PKCE verifiers, and CSRF tokens), preventing accidental credential
leakage via `{:?}` formatters, log calls, and error chains.

Fixes #741

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(auth): assert Debug output redacts secrets for credential types

Adds regression tests for the fix in the previous commit, verifying
that `{:?}` formatting of `StoredAuthorizationState` and
`StoredCredentials` does not emit plaintext secrets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(auth): address review feedback on debug redaction tests

- Remove redundant VendorExtraTokenFields from use super:: in
  test_stored_credentials_debug_redacts_token_response (already
  imported at module scope)
- Add assert!(debug_output.contains("created_at")) to
  test_stored_authorization_state_debug_redacts_secrets to verify
  non-secret fields remain visible in Debug output
- Run cargo fmt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update crates/rmcp/src/transport/auth.rs

Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>

* fix: remaining formatting issue

* fix: formatting

* fix: formatting

* fix: please

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>
2026-03-13 15:51:02 -04:00
Dale Seo
1a4a52a173
feat: add local feature for !Send tool handler support (#740)
* feat: add local feature for !Send tool handler support

* fix: gate streamable HTTP transport on not(local) feature
2026-03-11 17:22:56 -04:00
Dale Seo
8700e5c920
chore: fix all clippy warnings across workspace (#746) 2026-03-11 14:12:00 -04:00
github-actions[bot]
3bd7522070
chore: release v1.2.0 (#736)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-11 10:28:11 -04:00
Dale Seo
27b00967f1
feat: transparent session re-init on HTTP 404 (#743) 2026-03-11 10:27:00 -04:00
Dale Seo
5322430772
fix: handle ping requests sent before initialize handshake (#745) 2026-03-11 10:09:10 -04:00
Dale Seo
3d2c951ca3
feat: add missing constructors for non-exhaustive model types (#739)
* feat: add constructors for Root and ListRootsResult

* feat: add constructors for UnsubscribeRequestParams and PromptReference
2026-03-10 13:13:53 -04:00
dependabot[bot]
656a09a97a
chore(deps): update rig-core requirement from 0.31.0 to 0.32.0 (#738)
Updates the requirements on [rig-core](https://github.com/0xPlaygrounds/rig) to permit the latest version.
- [Release notes](https://github.com/0xPlaygrounds/rig/releases)
- [Changelog](https://github.com/0xPlaygrounds/rig/blob/main/release-plz.toml)
- [Commits](https://github.com/0xPlaygrounds/rig/compare/rig-core-v0.31.0...rig-core-v0.32.0)

---
updated-dependencies:
- dependency-name: rig-core
  dependency-version: 0.32.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>
2026-03-09 16:41:38 -04:00
dependabot[bot]
9fbf91e021
chore(deps): update jsonwebtoken requirement from 9 to 10 (#737)
Updates the requirements on [jsonwebtoken](https://github.com/Keats/jsonwebtoken) to permit the latest version.
- [Changelog](https://github.com/Keats/jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Keats/jsonwebtoken/compare/v9.0.0...v10.3.0)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-version: 10.3.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>
2026-03-09 16:41:16 -04:00
Dale Seo
54bb522e7f
feat: include granted scopes in OAuth refresh token request (#731)
* fix: include granted scopes in OAuth refresh token request

* docs: document scope forwarding in token refresh flow
2026-03-09 16:30:19 -04:00
Axel
be248980f2
fix(rmcp-macros): use re-exported serde_json path in task_handler (#735)
* fix(rmcp-macros): use re-exported serde_json path in task_handler

Replace bare `::serde_json::` with `::rmcp::serde_json::` in
task_handler.rs to prevent compilation errors in crates that don't
directly depend on serde_json.

Fixes #487

* Update crates/rmcp-macros/src/task_handler.rs

---------

Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>
2026-03-09 16:30:11 -04:00
Dale Seo
fc757d41ca
fix: allow deserializing notifications without params field (#729) 2026-03-09 15:56:27 -04:00
github-actions[bot]
1158cfe1b8
chore: release v1.1.1 (#732)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-09 11:15:31 -04:00
Dale Seo
8e5ebb4f5c
fix: accept logging/setLevel and ping before initialized notification (#730)
* fix: accept logging/setLevel and ping before initialized notification

* test: add server initialization tests for pre-init requests
2026-03-09 07:08:16 -04:00
nazq
9b507f5018
fix(rmcp-macros): replace deprecated *Param type aliases with *Params (#727)
The `#[task_handler]` macro generates code using deprecated type aliases
(`PaginatedRequestParam`, `CallToolRequestParam`, `GetTaskInfoParam`,
`GetTaskResultParam`, `CancelTaskParam`) that were renamed to `*Params`
in rmcp 0.13.0. This causes 5 deprecation warnings for every crate
using the macro.

Update all references to use the canonical `*Params` names:
- `PaginatedRequestParam` → `PaginatedRequestParams`
- `CallToolRequestParam` → `CallToolRequestParams`
- `GetTaskInfoParam` → `GetTaskInfoParams`
- `GetTaskResultParam` → `GetTaskResultParams`
- `CancelTaskParam` → `CancelTaskParams`

Also fix the corresponding doc examples in `lib.rs`.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-07 15:13:54 -05:00
Alex Hancock
5c5a2e734d
docs: roadmap.md update for correctness (#725) 2026-03-05 13:33:13 -05:00
Alex Hancock
770937a9fe
fix: conformance syntax changes (#723) 2026-03-05 09:07:21 -05:00
Tanish Desai
a8ea0f49b1
docs: modify build command in README (#706)
Updated the build command to specify the package for the MCP server examples.
2026-03-04 08:42:05 -05:00
github-actions[bot]
53c86d5d9d
chore: release v1.0.1 (#722)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-03 20:57:31 -05:00
Dale Seo
bb6c8043bf
feat: implement OAuth 2.0 Client Credentials flow (#707)
* feat: implement OAuth 2.0 Client Credentials flow

* fix: address SEP-1046 review findings

* fix: validate HTTPS on JWT token endpoint
2026-03-03 20:53:51 -05:00
Mohammod Al Amin Ashik
60a5518efb
docs: add McpMux to Built with rmcp section (#717)
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
2026-03-04 09:07:55 +08:00
github-actions[bot]
e223b53812
chore: release v1.0.0 (#721)
* chore: release v1.0.0-alpha.1

* chore: version 1.0.0

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alex Hancock <alexhancock@block.xyz>
2026-03-03 17:03:37 -05:00
Peter Siska
434ccb7812
fix(auth): pass WWW-Authenticate scopes to DCR registration request (#705)
* fix(auth): pass WWW-Authenticate scopes to DCR registration request

When an MCP server returns a 401 with `WWW-Authenticate: Bearer scope="..."`,
the scopes are parsed but never included in the Dynamic Client Registration
(DCR) request. Per RFC 7591, the DCR request should include a `scope` field
so the authorization server knows what scopes the client intends to use.
Servers that enforce scope-matching between registration and authorization
will reject the flow without this.

Changes:
- Add optional `scope` field to `ClientRegistrationRequest` with
  `skip_serializing_if` for backward compatibility
- Update `register_client()` to accept scopes parameter and include
  them in the DCR request body and returned `OAuthClientConfig`
- Thread scopes from `AuthorizationSession::new()` into both
  `register_client()` call sites
- Re-export `oauth2::TokenResponse` trait so consumers can extract
  scopes from token responses
- Add serialization tests for the new `scope` field

* refactor(auth): change register_client to accept &[&str] instead of &[String]

Avoids unnecessary Vec<String> allocation in callers that already have &[&str].

* fix(auth): make ClientRegistrationRequest crate-private

* refactor(auth): stop re-exporting oauth2 TokenResponse trait

* style(auth): merge TokenResponse into grouped oauth2 import

Fix nightly rustfmt check by consolidating the separate
`use oauth2::TokenResponse` into the existing `use oauth2::{...}` block.
2026-03-03 12:43:31 -05:00
Dale Seo
2d90b76501
fix: api ergonomics follow-up (#720)
* fix: builder with_* methods take T instead of Option<T>

* fix: emit conditional builder calls for optional fields in macros

* fix: convert with_task, with_stop_reason, with_logger, with_content to proper builders

* fix: update test callers for new builder signatures

* fix: simplify make_task helper and remove unused import

* fix: update sampling_stdio example for new with_stop_reason signature

* fix: make annotations and execution Option<Expr> consistent with other fields

* fix: remove unused none_expr import
2026-03-03 12:05:32 -05:00
Adam Kowalski
1fe5d1e1cd
fix(streamable-http): map stale session 401 to status-aware error (#709)
* fix(streamable-http): map stale session 401 to status-aware error

* test(streamable-http): expect 404 for stale session
2026-03-03 12:01:14 -05:00
github-actions[bot]
28beb9528b
chore: release v1.0.0-alpha (#719)
* chore: release v0.18.0

* chore: bump to 1.0.0-alpha

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jack Amadeo <jackamadeo@squareup.com>
2026-03-03 11:26:31 -05:00
Alex Hancock
6842f9cc3c
feat: docs update (#718) 2026-03-03 11:14:30 -05:00
Jack Amadeo
f63718d202
chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715)
* chore: add #[non_exhaustive] to reduce backwards-incompatible changes going forward

* fix: remove ProtocolVersion import

* fix: add a few more with_ mutator methods

---------

Co-authored-by: Alex Hancock <alexhancock@block.xyz>
2026-03-03 10:38:01 -05:00
Alex Hancock
79834b6211
chore: add ROADMAP.md tracking gaps from tier 1 (#713) 2026-03-02 14:09:59 -05:00
Alex Hancock
8d6b75cd5e
fix: properly disable the triage workflow (#714) 2026-03-02 14:09:46 -05:00
Guy Lichtman
78d959fcd4
feat(auth): support returning extra fields from token exchange (#700)
* feat(auth): support returning extra fields that may be returned from token generation

exchange_code_for_token and refresh_token now return a StandardTokenResponse which includes
any additionalfields which might have been sent by the vendor

BREAKING CHANGE: Return type of exchange_code_for_token and refresh_token has changed
and may require code changes.

* fix: doc links
2026-03-02 10:38:15 -05:00
Alex Hancock
9299fd3792
fix: do not attempt triage workflow without an API key (#712) 2026-03-02 10:36:42 -05:00
Kristof Mattei
876da50271
fix: downgrade logging of message to TRACE to avoid spamming logs (#699) 2026-02-27 18:11:22 -05:00
github-actions[bot]
955186502d
chore: release (#697)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-27 15:32:46 -05:00
Dale Seo
634852aaa0
fix: prevent mcp-conformance from being published to crates.io (#701) 2026-02-27 15:29:29 -05:00
Dale Seo
e68b15e600
docs: add prose documentation for core features to meet conformance (#702)
* docs: add prose documentation for core features to meet conformance

* docs: remove static coverage badge and svg

* docs: rewrite Chinese README to match current English README
2026-02-27 13:33:53 -05:00
Alex Hancock
98653855ef
feat: issue triage tooling (#698)
* feat: issue triage tooling

* fix: update triage-new-issues script

Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>

---------

Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>
2026-02-27 11:35:18 -05:00
Thiago Mendes
d6703dad75
feat(streamable-http): add json_response option for stateless server mode (#683)
* feat(streamable-http): add json_response option for stateless server mode

Adds `json_response: bool` field to `StreamableHttpServerConfig`.
When true and `stateful_mode` is false, the server returns
`Content-Type: application/json` directly instead of `text/event-stream`,
eliminating SSE framing overhead for simple request-response patterns.

This completes server-side JSON response support (client-side was added
in #540) and contributes to the stateless server goals of SEP-1442 (#526).

Backwards-compatible: `json_response: false` (default) preserves all
existing SSE behaviour unchanged, and `stateful_mode: true` is unaffected.

Benchmark evidence (50 VUs, 5min, 2 CPUs):
- RPS: 770 → 1139 (+48%)
- get_user_cart latency: 41ms → 0.76ms (-98%)
- checkout latency: 41ms → 0.55ms (-99%)
- Zero regressions, zero errors

* fix(tower): add cancellation awareness and logging to JSON response path

* fix(test): add missing Default to StreamableHttpServerConfig in concurrent streams test

Made-with: Cursor
2026-02-26 22:23:05 -05:00
dependabot[bot]
4677a65291
chore(deps): bump github/codeql-action from 3 to 4 (#695)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  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>
2026-02-26 13:44:24 -05:00
dependabot[bot]
e83665f583
chore(deps): bump actions/checkout from 4 to 6 (#696)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 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/v4...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>
2026-02-26 13:44:00 -05:00