mirror of
https://github.com/open-webui/mcpo.git
synced 2026-11-05 01:27:39 +00:00
[GH-ISSUE #240] issue: anyio.ClosedResourceError for connecting streamable_http MCP server #111
Labels
No labels
bug
can't reproduce
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/mcpo#111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nghe4 on GitHub (Aug 27, 2025).
Original GitHub issue: https://github.com/open-webui/mcpo/issues/240
Check Existing Issues
mcpo Version
v0.0.17
Open WebUI Version (if applicable)
No response
Operating System
Ubuntu
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
I think it should re-establish a new session
Actual Behavior
It cannot connect to my MCP server anymore and keep return HTTP Response code 500 but actually my MCP server is still running and able to receive request.
Steps to Reproduce
The MCP server is customized and maybe handle some requests take longer time than mcpo expected
Logs & Screenshots
INFO: 10.224.33.204:51454 - "POST /custom_kubectl_mcp/scan_unhealthy_pods_by_namespace HTTP/1.1" 500 Internal Server Error
2025-08-27 01:46:10,138 - INFO - Calling endpoint: scan_unhealthy_pods_by_namespace, with args: {'cluster_name': 'rke2-sle-micro-elemental', 'namespace': 'cattle-monitoring-system', 'min_restart_count': 1, 'restart_time_window_minutes': 60}
2025-08-27 01:46:10,139 - INFO - Unexpected error calling scan_unhealthy_pods_by_namespace: Traceback (most recent call last):
File "/app/.venv/lib/python3.11/site-packages/mcpo/utils/main.py", line 289, in tool
result = await session.call_tool(endpoint_name, arguments=args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/mcp/client/session.py", line 293, in call_tool
result = await self.send_request(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/mcp/shared/session.py", line 261, in send_request
await self._write_stream.send(SessionMessage(message=JSONRPCMessage(jsonrpc_request), metadata=metadata))
File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 242, in send
self.send_nowait(item)
File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 211, in send_nowait
raise ClosedResourceError
anyio.ClosedResourceError
Additional Information
No response
@vlameiras commented on GitHub (Oct 13, 2025):
I'm having the same issue, using
latest@taylorwilsdon commented on GitHub (Oct 18, 2025):
https://github.com/open-webui/mcpo/compare/issues/240?expand=1