SSE concepts
There are some concepts we need to understand before we can start building our server. First off, a server using SSE as transport is a server that can be accessed via HTTP. That means, even if it can run locally, it can also be accessed remotely. The implications of this are that this is a server that we need to expose using a web server.
SSE is a standard for unidirectional communication from server to client over a single, long-lived HTTP connection. It allows servers to push real-time updates to clients without requiring the client to poll for changes. Here are some more details:
- Protocol: SSE uses standard HTTP with the MIME type text/event-stream
- Client API: The browser uses the EventSource API to receive events
- Format: Messages are sent as plain text with fields such as
event,data, andid, each terminated by two endlines
It’s typically used for dashboard-like applications where real-time updates are crucial.
In MCP...