Streamable HTTP
In Chapter 4, we discussed building MCP servers with the Server-Sent Events (SSE) transport. In that chapter, you learned that if you want users to access your MCP server on the web, you can’t use STDIO, but instead you need to use a transport such as SSE or, as described in this chapter, Streamable HTTP.
So, in this chapter, you will learn about the following:
- The Streamable HTTP transport
- Why this transport should be used over SSE
- How to work with concepts such as notifications and resumability
The chapter covers the following topics:
- Streamable HTTP versus SSE, and why it is the new standard
- Streamable HTTP in MCP
- Resumability
- Notifications
- Creating and testing a server with Streamable HTTP
- Testing the server
- Testing resumability
 
                                             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
     
         
                 
                 
                 
                 
                 
                 
                 
                 
                