Building SSE Servers
So far, you’ve seen how you can build MCP servers using STDIO as transport. That’s a great choice of transport for servers meant to run locally. However, if you want to connect to servers remotely via HTTP or if you want responses from LLMs streamed, then there’s another transport called Server-Sent Events (SSE) better suited to this scenario.
In this chapter, we’ll focus on building and testing MCP servers using SSE as transport.
The chapter covers the following topics:
- SSE concepts
- Creating an SSE server as a web app
- Testing with SSE
- Creating an SSE server
Let’s dive into the details of SSE and how to build a server using it.