You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/concepts/architecture.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,8 +108,8 @@ The transport layer handles the actual communication between clients and servers
108
108
- Uses standard input/output for communication
109
109
- Ideal for local processes
110
110
111
-
2.**HTTP with SSE transport**
112
-
- Uses Server-Sent Events for server-to-client messages
111
+
2.**Streamable HTTP transport**
112
+
- Uses HTTP with optional Server-Sent Events for streaming
113
113
- HTTP POST for client-to-server messages
114
114
115
115
All transports use [JSON-RPC](https://www.jsonrpc.org/) 2.0 to exchange messages. See the [specification](/specification/) for detailed information about the Model Context Protocol message format.
@@ -295,7 +295,7 @@ Here's a basic example of implementing an MCP server:
295
295
- Simple process management
296
296
297
297
2.**Remote communication**
298
-
- Use SSE for scenarios requiring HTTP compatibility
298
+
- Use Streamable HTTP for scenarios requiring HTTP compatibility
299
299
- Consider security implications including authentication and authorization
The legacy SSE transport enabled server-to-client streaming with HTTP POST requests for client-to-server communication.
325
+
326
+
Previously used when:
327
+
328
+
- Only server-to-client streaming is needed
329
+
- Working with restricted networks
330
+
- Implementing simple updates
331
+
332
+
#### Legacy Security Considerations
333
+
334
+
The deprecated SSE transport had similar security considerations to Streamable HTTP, particularly regarding DNS rebinding attacks. These same protections should be applied when using SSE streams within the Streamable HTTP transport.
335
+
158
336
<Tabs>
159
337
<Tabtitle="TypeScript (Server)">
160
338
@@ -437,8 +615,8 @@ When implementing transport:
437
615
- Handle denial of service scenarios
438
616
- Monitor for unusual patterns
439
617
- Implement proper firewall rules
440
-
- For SSE transports, validate Origin headers to prevent DNS rebinding attacks
441
-
- For local SSE servers, bind only to localhost (127.0.0.1) instead of all interfaces (0.0.0.0)
618
+
- For HTTP-based transports (including Streamable HTTP), validate Origin headers to prevent DNS rebinding attacks
619
+
- For local servers, bind only to localhost (127.0.0.1) instead of all interfaces (0.0.0.0)
442
620
443
621
## Debugging Transport
444
622
@@ -454,3 +632,65 @@ Tips for debugging transport issues:
454
632
8. Monitor resource usage
455
633
9. Test edge cases
456
634
10. Use proper error tracking
635
+
636
+
## Backwards Compatibility
637
+
638
+
To maintain compatibility between different protocol versions:
639
+
640
+
### For Servers Supporting Older Clients
641
+
642
+
Servers wanting to support clients using the deprecated HTTP+SSE transport should:
643
+
644
+
1. Host both the old SSE and POST endpoints alongside the new MCP endpoint
645
+
2. Handle initialization requests on both endpoints
646
+
3. Maintain separate handling logic for each transport type
647
+
648
+
### For Clients Supporting Older Servers
649
+
650
+
Clients wanting to support servers using the deprecated transport should:
651
+
652
+
1. Accept server URLs that may use either transport
653
+
2. Attempt to POST an `InitializeRequest` with proper `Accept` headers:
654
+
- If successful, use Streamable HTTP transport
655
+
- If it fails with 4xx status, fall back to legacy SSE transport
656
+
3. Issue a GET request expecting an SSE stream with `endpoint` event for legacy servers
0 commit comments