Skip to content

Commit 77b4299

Browse files
authored
Merge pull request modelcontextprotocol#658 from modelcontextprotocol/basil/version_header_in_shttp
move version header doc to transports
2 parents 4879073 + 6ab271d commit 77b4299

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

docs/specification/draft/basic/lifecycle.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,12 @@ supports. This **SHOULD** be the _latest_ version supported by the server.
138138
If the client does not support the version in the server's response, it **SHOULD**
139139
disconnect.
140140

141+
<Note>
141142
If using HTTP, the client **MUST** include the `MCP-Protocol-Version:
142-
<protocol-version>` HTTP header during any subsequent requests to the MCP
143-
server, allowing the MCP server to respond based on the MCP protocol version.
144-
145-
The protocol version sent by the client **SHOULD** be the one negotiated during [initialization](https://modelcontextprotocol.io/specification/draft/basic/lifecycle#initialization).
146-
147-
If the server receives a request with a missing, invalid, or unsupported
148-
MCP-Protocol-VERSION, it **MUST** respond with `400 Bad Request`.
149-
For example: `MCP-Protocol-Version: 2024-11-05`
143+
<protocol-version>` HTTP header on all subsequent requests to the MCP
144+
server.
145+
For details, see [the Protocol Version Header section in Transports](/specification/draft/basic/transports#protocol-version-header).
146+
</Note>
150147

151148
#### Capability Negotiation
152149

docs/specification/draft/basic/transports.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,20 @@ sequenceDiagram
237237
238238
```
239239

240+
### Protocol Version Header
241+
242+
If using HTTP, the client **MUST** include the `MCP-Protocol-Version:
243+
<protocol-version>` HTTP header on all subsequent requests to the MCP
244+
server, allowing the MCP server to respond based on the MCP protocol version.
245+
246+
The protocol version sent by the client **SHOULD** be the one [negotiated during
247+
initialization](/specification/draft/basic/lifecycle#version-negotiation).
248+
249+
For example: `MCP-Protocol-Version: 2025-03-26`
250+
251+
If the server receives a request with a missing, invalid, or unsupported
252+
MCP-Protocol-VERSION, it **MUST** respond with `400 Bad Request`.
253+
240254
### Backwards Compatibility
241255

242256
Clients and servers can maintain backwards compatibility with the deprecated [HTTP+SSE

0 commit comments

Comments
 (0)