Skip to content

Conversation

@richard-rance
Copy link

Problem

When connecting to some MCP servers that supports making SSE GET requests, client.Connect gets hung up waiting for the first notification from the server.

More details in issue #633

Solution

This change modifies the tests to simulate a server that keeps the stand alone SSE connection open. It then adjusts the connection setup to run the standalone SSE connection in the background.

Open question

Work was done 2 weeks ago in #604 / #583 to make some errors from starting the stand alone SSE connection be returned as part of client.Connect. I'm not clear on why that is necessary. Clients are not required to accept SSE messages from servers. Stateless clients will want to opt out of even attempting to create the standalone SSE connection.
This PR undoes some of it so may not be the correct solution.

I'll clean up the tests once I know more.

When connecting to an MCP server that supports making SSE GET requests client.Connect gets hung up waiting for the first notification from the server.

This change modifies the tests to simulate a server that keeps the stand alone SSE connection open.
It then adjusts the connection setup to run the standalone SSE connection in the background.
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.

1 participant