Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mcp-servers/rust/fast-time-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ a mismatching `MCP-Protocol-Version` header is rejected with `HeaderMismatch`

`--strict` makes the served set exact. `--protocol 2026-07-28 --strict` runs a
pure `2026-07-28` server: every `initialize` call — including ones naming
`2025-11-25` — is rejected with JSON-RPC error `-32602` whose `data.supported`
`2025-11-25` — is rejected with an `UnsupportedProtocolVersionError` (`-32022`)
whose `data.supported`
lists only the configured revisions, and `server/discover` advertises only
`2026-07-28`. To run a strict server that still accepts the legacy handshake,
enable both revisions explicitly:
Expand Down
6 changes: 3 additions & 3 deletions mcp-servers/rust/fast-time-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ fn mcp_initialize_response(
if config.strict && (!config.legacy || requested != Some(MCP_PROTOCOL_VERSION)) {
return mcp_error_response(
id,
-32602,
ERR_UNSUPPORTED_PROTOCOL_VERSION,
"Unsupported protocol version",
Some(json!({
"supported": config.supported_versions(),
Expand Down Expand Up @@ -1739,7 +1739,7 @@ mod tests {
assert_eq!(response.status(), StatusCode::OK);
assert!(response.headers().get(SESSION_HEADER).is_none());
let body = response_json(response).await;
assert_eq!(body["error"]["code"], -32602);
assert_eq!(body["error"]["code"], -32022);
assert_eq!(body["error"]["message"], "Unsupported protocol version");
assert_eq!(
body["error"]["data"]["supported"],
Expand Down Expand Up @@ -1776,7 +1776,7 @@ mod tests {
assert_eq!(response.status(), StatusCode::OK);
assert!(response.headers().get(SESSION_HEADER).is_none());
let body = response_json(response).await;
assert_eq!(body["error"]["code"], -32602);
assert_eq!(body["error"]["code"], -32022);
assert_eq!(body["error"]["message"], "Unsupported protocol version");
assert_eq!(
body["error"]["data"]["supported"],
Expand Down
Loading