| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
lgtm!
edit: one suggestion on adding a test for the GET stream actually being used for notifications
Sorry, something went wrong.
| if i < count - 1: # Don't wait after the last notification | ||
| await anyio.sleep(interval) | ||
|
|
||
| # This will send a resource notificaiton though standalone SSE |
There was a problem hiding this comment.
Actually - a test for this would be awesome
Sorry, something went wrong.
There was a problem hiding this comment.
have a test for this in the next PR, where I have a client!
Sorry, something went wrong.
| if GET_STREAM_KEY in self._request_streams: | ||
| response = self._create_error_response( | ||
| "Conflict: Only one SSE stream is allowed per session", | ||
| HTTPStatus.CONFLICT, | ||
| ) | ||
| await response(request.scope, request.receive, send) | ||
| return |
There was a problem hiding this comment.
I am okay with this, but I don't think this is necessarily true: https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#multiple-connections. A client could have multiple SSE connections open but we should just reply to one.
Sorry, something went wrong.
The base branch was changed.
| Back | FazBrowse Home | New Git URL |
As per spec, the client MAY issue an HTTP GET to the MCP endpoint. This can be used to open an SSE stream, allowing the server to communicate to the client, without the client first sending data via HTTP POST. This PR implements establishing SSE stream on GET request.
Follow ups
Stacked on top of #554