Skip to content

[Feat]: support streamable http mcp #8864

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

Merged
merged 17 commits into from
Jun 3, 2025
Merged

[Feat]: support streamable http mcp #8864

merged 17 commits into from
Jun 3, 2025

Conversation

malhotra5
Copy link
Contributor

@malhotra5 malhotra5 commented Jun 3, 2025

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality this introduces.


Summarize what the PR does, explaining any non-trivial design decisions.

image
image


Link of any specific issues this addresses:


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:2a86c48-nikolaik   --name openhands-app-2a86c48   docker.all-hands.dev/all-hands-ai/openhands:2a86c48

@malhotra5 malhotra5 changed the title [Feat]: suport streamable http mcp [Feat]: support streamable http mcp Jun 3, 2025
@malhotra5 malhotra5 marked this pull request as draft June 3, 2025 02:24
Copy link
Contributor Author

I have fixed the failing tests by updating the test files to match the new MCP client implementation that supports both SSE and StreamableHTTP protocols. The changes include:

  1. Updated test_mcp_utils.py to include the new streamable_http_servers parameter in calls to create_mcp_clients
  2. Updated test_mcp_timeout.py to include the new parameter and pass None for the conversation_id
  3. Updated test_mcp_create_clients_timeout.py to match the new function signature

All tests are now passing.

Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 142 to 144
# FIXME: OpenHands' streamable http server may not be running when headless mode is started
# if openhands_mcp_server:
# config.mcp.sse_servers.append(openhands_mcp_server)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# FIXME: OpenHands' streamable http server may not be running when headless mode is started
# if openhands_mcp_server:
# config.mcp.sse_servers.append(openhands_mcp_server)

Comment on lines 271 to 273
# FIXME: OpenHands' streamable http server may not be running when CLI mode is started
# if openhands_mcp_server:
# config.mcp.sse_servers.append(openhands_mcp_server)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's just remove it :D

Suggested change
# FIXME: OpenHands' streamable http server may not be running when CLI mode is started
# if openhands_mcp_server:
# config.mcp.sse_servers.append(openhands_mcp_server)

@malhotra5 malhotra5 marked this pull request as ready for review June 3, 2025 16:12
@malhotra5 malhotra5 enabled auto-merge (squash) June 3, 2025 16:49
@malhotra5 malhotra5 merged commit a348840 into main Jun 3, 2025
18 checks passed
@malhotra5 malhotra5 deleted the streamable-http branch June 3, 2025 17:06
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.

3 participants