Update rmcp to 3.1.2 (#39101)

## What changed

- Upgrade `rmcp` from 3.0.0 to 3.1.2.
- Use `rmcp`'s native JSON-RPC decoding and remove the local compatibility layer for multi-round-trip tool results.
- Preserve response metadata on `input_required` SSE results.
- Support OAuth protected-resource metadata discovery and include the discovered resource audience when refreshing tokens.

## Testing

- Add coverage for metadata preservation on modern SSE `input_required` responses.
- Add an OAuth startup scenario that discovers protected-resource metadata and verifies the refresh-token resource audience.

GitOrigin-RevId: 689f009b4a33552b640304111b74585b4009eeb8
This commit is contained in:
thomas authored and copyberry committed 2026-08-17 23:04:09 +00:00
1 parent 050aa077b5
commit 7500ab4c8d
11 files changed
+182 -262

No files matched your search

@@ -45,8 +45,6 @@ use tracing::debug;
use tracing::info;
use tracing::warn;
use crate::incoming_jsonrpc::deserialize_incoming_jsonrpc_message;
static PROCESS_COUNTER: AtomicUsize = AtomicUsize::new(1);
// Tool results can make valid MCP responses large, so keep the protocol
// ceiling well above ordinary messages while still bounding hostile input.
@@ -452,7 +450,7 @@ impl ExecutorProcessTransport {
None => return None,
};
let line = Self::trim_trailing_carriage_return(line);
match deserialize_incoming_jsonrpc_message(&line) {
match serde_json::from_slice(&line) {
Ok(message) => return Some(message),
Err(error) => {
debug!(