Skip to content

StreamableHttp - GET request standalone SSE #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: ihrpr/streamablehttp-stateless
Choose a base branch
from

Conversation

ihrpr
Copy link
Contributor

@ihrpr ihrpr commented Apr 22, 2025

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

  • Streamable Http Client
  • Resumability

Stacked on top of #554

Copy link
Contributor

@jerome3o-anthropic jerome3o-anthropic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!
edit: one suggestion on adding a test for the GET stream actually being used for notifications

@@ -87,6 +88,9 @@ async def call_tool(
if i < count - 1: # Don't wait after the last notification
await anyio.sleep(interval)

# This will send a resource notificaiton though standalone SSE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually - a test for this would be awesome

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have a test for this in the next PR, where I have a client!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants