Commit graph

388 commits

Author SHA1 Message Date
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
sktrpathi
11093bc830
feat: add type-safe elicitation schema support (#465) (#466)
* feat: add type-safe elicitation schema support (#465)

Implement type-safe schema definitions for MCP elicitation requests,
replacing generic `JsonObject` with strongly-typed primitive schemas
per the [MCP 2025-06-18 specification](https://spec.modelcontextprotocol.io/specification/2025-06-18/server/elicitation/).

Features:
- Type-safe schema hierarchy (`StringSchema`, `NumberSchema`, `IntegerSchema`, `BooleanSchema`)
- Builder pattern with fluent API and 20+ convenience methods
- Build-time validation ensuring required fields exist in properties
- Private fields enforcing invariants through validated constructors
- Comprehensive validation support (range, length, format, enums)
- Typed property methods for cleaner schema construction

Benefits:
- Compile-time type safety prevents invalid schema construction
- 60-70% reduction in boilerplate through convenience methods
- Enforces MCP specification requirement for primitive-only properties
- Better IDE autocomplete and type inference
- Runtime validation catches schema errors early

Breaking changes:
- `CreateElicitationRequestParam.requested_schema` changed from `JsonObject` to `ElicitationSchema`
- `ElicitationSchemaBuilder::build()` now returns `Result` instead of direct value

Fixes #465

* fix: fix RMCP compliance

* feat: add conversion methods to ElicitationSchema

Add from_json_schema() and from_type() methods to ElicitationSchema
for easier type-to-schema conversion. This addresses feedback about
improving ergonomics when working with generated schemas.

Also make all struct fields public for better flexibility.

* chore: change `StringFormat` to enum
2025-10-15 17:55:10 +08:00
dependabot[bot]
d929e6918e
chore(deps): bump actions/setup-node from 5 to 6 (#483)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  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-10-15 09:26:37 +08:00
dependabot[bot]
a211a713f4
chore(deps): update tokio-tungstenite requirement from 0.27.0 to 0.28.0 (#462)
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.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: tokio-tungstenite
  dependency-version: 0.28.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-10-14 09:43:30 +08:00
jokemanfire
6cd779c5d7
fix(oauth): dynamic client registration should be optional (#463)
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-10-14 09:30:29 +08:00
4t145
75a7e48441
docs(macro): fix visibility attribute's usage of handler macro (#481) 2025-10-13 11:21:39 +08:00
Honsun Zhu
b749e3c9b4
feat(SEP-973): following change Icon.sizes from string to string array (#479)
Ref:
https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1531
2025-10-10 19:23:04 +08:00
Min Wei
aeeff75e12
Streamable HTTP: drain SSE frames until the initialize response, ignoring early notifications to prevent handshake timeouts (#467)
Co-authored-by: Min Wei <minwei@microsoft.com>
2025-10-10 18:49:22 +08:00
Loocor
87fcc7c5cb
fix(sse-client): consume control frames; refresh message endpoint (#448) 2025-10-09 18:45:56 +08:00
dependabot[bot]
30c8e88076
chore(deps): bump astral-sh/setup-uv from 6 to 7 (#478)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 6 to 7.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v6...v7)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '7'
  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-10-09 17:00:35 +08:00
Brian Hung
b34fd6c187
bump crate version in README.md (#471)
bump crate to latest version (0.8.0) in README.md
2025-10-07 15:51:30 -04:00
github-actions[bot]
c86883b81c
chore: release v0.8.1 (#473)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-07 15:51:03 -04:00
Gabriel Peal
923145afdc
fix(oauth): pass bearer token to all streamable http requests (#476)
* fix(oauth): attach bearer token to all streaming http requests

* fix(typo): fix an unrelated typo

There was an errant typo in the CHANGELOG that is breaking CI
2025-10-07 15:35:06 -04:00
Alex Hancock
34f482375c
fix: fix spellcheck on intentional typo in CHANGELOG (#470) 2025-10-06 09:33:42 -04:00
github-actions[bot]
a4def1100d
chore: release v0.7.1 (#454)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-03 21:16:55 -04:00
Gabriel Peal
6011f34ddf
feat: allow clients to override client_name (#469)
Many MCP Servers use client_name for a variety of things including:
* Whitelisting
* Logos
* Copy shown directly on the page
* etc

As a result, it's important for MCP Clients to be able to override the client name.
2025-10-03 21:03:31 -04:00
jokemanfire
c0b777c7f7
fix(ci): fix rustdoc build by scoping docsrs cfg to rustdoc only (#458)
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-09-30 12:51:52 -04:00
Huabing (Robin) Zhao
0566d132ea
fix(oauth): support suffixed and preffixed well-knonw paths (#459)
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
2025-09-30 15:41:16 +08:00
V
717ec56e23
fix: generate default schema for tools with no params (#446)
* fix: generate default schema for tools with no params
2025-09-26 18:16:08 +08:00
Jack Amadeo
57fc428c57
chore: bump to rust 1.90.0 (#453) 2025-09-24 12:58:54 -04:00
Jack Amadeo
aff82ed0c4
chore: release v0.7.0 (#452) 2025-09-24 09:15:58 -04:00
Jack Amadeo
5216ab2bbd
fix: return auth errors (#451) 2025-09-23 15:58:00 -04:00
rliang
a11c4de332
fix(macros): support #[doc = include_str!(...)] for macros (#444)
Add tests and return syn::Result from extract_doc_line to propagate parsing errors.
2025-09-23 16:49:43 +08:00
Takeshi Yoneda
4c8f5ba7b3
fix(oauth): do not treat empty secret as valid for public clients (#443)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2025-09-22 09:08:07 +08:00
Louis Beaumont
8ae2c2bcbf
doc(root): Add Terminator to Built with rmcp section (#437)
Added Terminator, an AI-powered desktop automation MCP server, to the list of projects built with rmcp in the README.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-22 09:05:18 +08:00
Rob Jellinghaus
ddef4ce529
fix(clippy): add doc comment for generated tool attr fn (#439)
This change makes the `tool` macro's output safe for the `missing_docs` lint, by
emitting a doc comment for the generated `[tool]_tool_attr` function. This doc
comment is emitted regardless of whether the tool function is public, for simplicity.

We are building an MCP server using `rmcp` and discovered that the current crate
was not compatible with the `#![deny(missing_docs)]` lint which we use everywhere.

Tested by modifying the `test_tool_macros.rs` test to use `#![deny(missing_docs)]`
and adding doc comments to all pub fns and structs in that file.

None.

Fixes #438.

Co-authored-by: RobJellinghaus <rjellinghaus@live.com>
2025-09-17 15:02:56 +08:00
Peter Nehrer
4ee2add899
bugfix: Non-empty paths in OAuth2 Authorization Server Metadata URLs (#441)
* fix: support non-empty paths in OAuth2 Authorization Server Metadata URLs

* fix: address formatting errors
2025-09-17 15:02:37 +08:00
jokemanfire
f8a747eaca
chore(example): add example in progress (#271)
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-09-13 08:15:02 +08:00
David Stern
271cf0b232
fix(oauth): require CSRF token as part of the OAuth authorization flow. (#435)
* Require CSRF token as part of the authorization flow.

* Update auth example.

* Update docs/OAUTH_SUPPORT.md.
2025-09-12 09:27:11 +08:00
github-actions[bot]
83ce13c331
chore: release v0.6.4 (#426)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-11 14:08:13 -04:00
Alex Hancock
b57aa47693
feat(SEP-973): add support for icons and websiteUrl across relevant types (#432) 2025-09-11 11:49:03 -04:00