Commit 2af0b90
committed
MCP: Fix protocol version mismatch warnings at startup
Older MCP clients (2024-11-05 spec) send `protocolVersion` in the JSON body of `initialize`, not as an HTTP header. The server only checked the header, defaulted to `2025-03-26`, and negotiated to`2025-11-25` — causing mismatch warnings on every subsequent request.
Now falls back to the body value when the header is absent.1 parent 2f7bff1 commit 2af0b90
1 file changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
393 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
394 | 405 | | |
395 | 406 | | |
396 | | - | |
| 407 | + | |
397 | 408 | | |
398 | 409 | | |
399 | 410 | | |
| |||
0 commit comments