A confirmation with no session A developer's mcp-better Rust MCP server, a reference implementation of MCP's 2026-07-28 multi round-trip request pattern (SEP-2322), shows that a sealed `requestState` token is signed but not secret: its payload is base64url-encoded plain JSON readable by anyone. Version 0.7.0's token carried no expiry and no replay marker, letting one round-1 token complete round 2 repeatedly; version 0.8.0 adds an 8-byte expiry and rejects a changed message, while documenting that the HMAC-SHA256 tag only authenticates, not encrypts, the payload. What a sealed requestState can and can't promise on MCP 2026-07-28 Some tools should ask before they act: delete, pay, send. On MCP's 2026-07-28 protocol a server can pause a tool call and ask the user, in the middle of the call, without holding a connection open. The catch is that the server keeps no session. Whatever it needs to remember between the question and the answer has to travel with the client, in a token called requestState . mcp-better https://github.com/Wolfe-Jam/mcp-better teaches this pattern: it is a Rust MCP server written as a textbook. Its confirm echo tool asks you to type CONFIRM, then echoes your message. A raw HTTP test of version 0.7.0 found that the confirmation promised more than it delivered. Version 0.8.0 adds an expiry and refuses a changed message, and says plainly what it still doesn't do. Every response below is a real capture from those two versions. This is SEP-2322, multi round-trip requests. Round 1 is an ordinary tool call: round 1 · request { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "confirm echo", "arguments": { "message": "confirm me" }, " meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": { "elicitation": { "form": {} } } } } } The server doesn't run the tool. It answers input required , says what it needs a form asking for CONFIRM , and hands back a sealed token: round 1 · response mcp-better 0.8.0, schema trimmed { "jsonrpc": "2.0", "id": 1, "result": { "resultType": "input required", "inputRequests": { "confirm": { "method": "elicitation/create", "params": { "message": "Type CONFIRM to echo the sealed message.", "mode": "form", "requestedSchema": "…" } } }, "requestState": "rs1.AAABohveDBN7…DwylF-M" } } The client shows the form, then sends the same call again with the answer and the same token: round 2 · request { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "confirm echo", "arguments": { "message": "confirm me" }, "requestState": "rs1.AAABohveDBN7…DwylF-M", "inputResponses": { "confirm": { "action": "accept", "content": { "confirm": "CONFIRM" } } }, " meta": "…" } } round 2 · response { "jsonrpc": "2.0", "id": 2, "result": { "resultType": "complete", "content": { "type": "text", "text": "{\"confirmed\":true,\"echo\":\"confirm me\",…}" } , "isError": false } } Two round trips, no session: everything round 2 needs travels in the token. WHY: the server can't trust anything in round 2 that it didn't seal in round 1. The client could send back anything. mcp-better seals the token with rmcp's RequestStateCodec : an HMAC-SHA256 tag over the payload. Change one byte and round 2 fails: { "jsonrpc": "2.0", "id": 5, "error": { "code": -32602, "message": "requestState failed integrity check or expired start again " } } But look inside the token. A client must not; an attacker will. The middle part is base64url, and it decodes to plain JSON: 0.8.0's token, split at its dots rs1 .AAABohveDBN7Im1lc3NhZ2UiOiJjb25maXJtIG1lIn0 .sEgJTcgy3dI6341xIRsGjf7IIuu-hxPkkoDbDwylF-M the middle part, decoded 8-byte expiry {"message":"confirm me"} What a sealed requestState is. Signed, not secret. NOTE: rmcp's docs say it: “Values are authenticated, not encrypted; key ids and payloads remain readable.” Never put private data in it, or encrypt it. In 0.7.0 the first 8 bytes of the payload were all zero: no expiry. Nothing marked a token as used either, because there's no session to mark. So one round-1 token completed round 2 again and again. Here it is, the same token sent twice to 0.7.0: first use { "confirmed": true, "echo": "confirm me", "mrtr": "confirm echo", "resultType": "complete" } same token again { "confirmed": true, "echo": "confirm me", "mrtr": "confirm echo", "resultType": "complete" } rmcp can stamp an expiry into the token, and opening it after that fails. 0.8.0 seals every round-1 token with five minutes: src/server.rs · mcp-better 0.8.0 js let sealed = self .state codec .seal json with &ConfirmState { message: message.clone }, &SealOptions::new .associated data MRTR AAD .ttl self.confirm ttl , .map err |e| { / … / } ?; After five minutes, round 2 is refused: round 2 · a round-1 token, 305 seconds later { "jsonrpc": "2.0", "id": 2, "error": { "code": -32602, "message": "requestState failed integrity check or expired start again " } } A test that doesn't wait five minutes: build the server with a 1 ms lifetime, sleep 20 ms, expect the error. js test fn confirm echo rejects expired state { let server = BetterServer::new .with confirm ttl std::time::Duration::from millis 1 ; let sealed = round1 state &server, "late" ; std::thread::sleep std::time::Duration::from millis 20 ; let req = confirm args "late" .with input responses accepted .with request state sealed ; let err = server.confirm echo call req, &elicit caps .unwrap err ; assert eq err.code, ErrorCode::INVALID PARAMS ; } An expiry bounds replay. It doesn't stop it. Inside the five minutes, 0.8.0 still accepts the same token twice: { "confirmed": true, "echo": "confirm me", "mrtr": "confirm echo", "resultType": "complete" } What an expiry buys, and what it doesn't. For an echo, that's harmless. For a tool with real effects, it isn't: put a nonce in the sealed state and keep a set of used nonces on the server, at least until they expire. That is state, and keeping it is a choice 2026-07-28 makes you take on purpose. mcp-better doesn't, and its docs say so. GOTCHA: The spec says servers SHOULD seal three things into the state: the authenticated user, a short expiry, and the method plus a digest of its parameters. rmcp's associated data can carry the first and the last. mcp-better 0.8.0 has the expiry and binds only the tool name. A real server should bind the user and a digest of the call, so a token can't be replayed by someone else or against a different call. Round 2 carries the arguments again. What if they changed? In 0.7.0 the server used the sealed message and ignored the new one. Safe, since the user's confirmed text won, but the caller was told "done" for something it didn't send: 0.7.0 · round 2 with "SWAPPED" { "confirmed": true, "echo": "confirm me", "mrtr": "confirm echo", "resultType": "complete" } 0.8.0 · round 2 with "SWAPPED" { "code": -32602, "message": "message changed since round 1; start again to confirm the new one" } The check is one if : // The sealed message is what the user confirmed. if message = state.message { return Err McpError::invalid params "message changed since round 1; start again to confirm the new one", None, ; } Tampered, sealed for another tool, expired: the client gets the same -32602 for all three. The reason never leaves the server. js let state: ConfirmState = self .state codec .open json with sealed, MRTR AAD // One client-facing error for every failure tampered, wrong tool, // expired , as rmcp's open with asks; the variant stays internal. .map err | | McpError::invalid params "requestState failed integrity check or expired start again ", None, ?; WHY: rmcp's docs: applications MUST map all token-opening failures to a single client-facing error. A forger learns nothing about which check failed. The changed-message error is different on purpose: it only fires after the token opened cleanly, so it tells a forger nothing. Round 1 asks for a form, so it only makes sense for a client that declared it can show one. A client that didn't gets a clear refusal, naming what's missing, instead of a question it can't answer: { "jsonrpc": "2.0", "id": 6, "error": { "code": -32021, "message": "Missing required client capability", "data": { "requiredCapabilities": { "elicitation": {} } } } } | | Rule | In mcp-better 0.8.0 | |---|---|---| | 1 | Seal the state; never trust echoed bytes | HMAC via rmcp RequestStateCodec | | 2 | Signed isn't secret | Only the message goes in, nothing private | | 3 | Put an expiry on every token | 5 minutes CONFIRM STATE TTL | | 4 | Know your reuse window; add a nonce and a store for real effects | Stated, not built: it only echoes | | 5 | Bind the token to who called and what they asked | Tool name only | | 6 | Refuse changed arguments | -32602 "message changed since round 1" | | 7 | One error for every failed open | -32602 for tampered, wrong tool, expired | | 8 | Ask only clients that declared the capability | -32021 naming elicitation | npx --yes mcp-better@0.8.0 --http http://127.0.0.1:8787/mcp Every request on 2026-07-28 needs an MCP-Protocol-Version header, an Mcp-Method header, an Mcp-Name header for tools/call , and meta with the protocol version and the client's capabilities. Leave one out and the server tells you which. Captured from mcp-better 0.7.0 and 0.8.0 over Streamable HTTP, protocol 2026-07-28, on November 27, 2026. — Drafted by Claude · Edited by James Wolfe