issue: startup failed while Connecting to SSE endpoint #65

Closed
opened 2026-02-15 20:17:46 -05:00 by yindo · 0 comments
Owner

Originally created by @moonphase97 on GitHub (May 15, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of mcpo.

mcpo Version

v0.0.14

Open WebUI Version (if applicable)

v0.6.9

Operating System

Windows11

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both MCPO and Open WebUI.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

Hi
First, I apologize for my insufficient knowledge and BAD English skills.
I may be asking very stupid questions.
Thank you for your understanding.

I installed mcpo and confirmed that it integrates well with open-webui.
After that, I tried to run an SSE compatible server to connect it to n8n.

Actual Behavior

However, after
Connecting to SSE endpoint: http://localhost:8001/sse
an error occurs as shown in the log and it fails to run.
The log provided is from anaconda, but uv and docker all show the same log.

Steps to Reproduce

The commands I used are as follows

uvx mcpo --port 8000 --server-type "sse" -- http://localhost:8001/sse --config ./config.json
mcpo --port 8000 --server-type "sse" -- http://localhost:8001/sse --config ./config.json
docker run -p 8000:8000 ghcr.io/open-webui/mcpo:main --api-key ***--server-type "sse" -- http://127.0.0.1:8001/sse -- uvx mcp-server-fetch
etc...

Logs & Screenshots

(py311) PS C:\mcpo> mcpo --port 8080 --server-type "sse" -- http://localhost:8001/sse --config ./config.json
Starting MCP OpenAPI Proxy on 0.0.0.0:8080 with command: http://localhost:8001/sse --config ./config.json
2025-05-16 10:02:12,835 - INFO - Starting MCPO Server...
2025-05-16 10:02:12,835 - INFO - Name: MCP OpenAPI Proxy
2025-05-16 10:02:12,835 - INFO - Version: 1.0
2025-05-16 10:02:12,835 - INFO - Description: Automatically generated API from MCP Tool Schemas
2025-05-16 10:02:12,835 - INFO - Hostname: ***
2025-05-16 10:02:12,836 - INFO - Port: 8080
2025-05-16 10:02:12,836 - INFO - API Key: Not Provided
2025-05-16 10:02:12,836 - INFO - CORS Allowed Origins: ['*']
2025-05-16 10:02:12,836 - INFO - Path Prefix: /
2025-05-16 10:02:12,836 - INFO - Configuring for a single SSE MCP Server with URL http://localhost:8001/sse
2025-05-16 10:02:12,836 - INFO - Uvicorn server starting...
INFO: Started server process [55720]
INFO: Waiting for application startup.
2025-05-16 10:02:12,857 - INFO - Connecting to SSE endpoint: http://localhost:8001/sse
ERROR: + Exception Group Traceback (most recent call last):
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\starlette\routing.py", line 692, in lifespan
| async with self.lifespan_context(app) as maybe_state:
| File "C:\Users*
\anaconda3\envs\py311\Lib\contextlib.py", line 204, in aenter
| return await anext(self.gen)
| ^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\mcpo\main.py", line 115, in lifespan
| async with sse_client(url=args[0]) as (
| File "C:\Users*
\anaconda3\envs\py311\Lib\contextlib.py", line 204, in aenter
| return await anext(self.gen)
| ^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\mcp\client\sse.py", line 45, in sse_client
| async with anyio.create_task_group() as tg:
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\anyio_backends_asyncio.py", line 772, in aexit
| raise BaseExceptionGroup(
| ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\httpx_transports\default.py", line 101, in map_httpcore_exceptions
| yield
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpx_transports\default.py", line 394, in handle_async_request
| resp = await self._pool.handle_async_request(req)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\httpcore_async\connection_pool.py", line 256, in handle_async_request
| raise exc from None
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpcore_async\connection_pool.py", line 236, in handle_async_request
| response = await connection.handle_async_request(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\httpcore_async\connection.py", line 101, in handle_async_request
| raise exc
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpcore_async\connection.py", line 78, in handle_async_request
| stream = await self._connect(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\httpcore_async\connection.py", line 124, in _connect
| stream = await self._network_backend.connect_tcp(kwargs)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpcore_backends\auto.py", line 31, in connect_tcp
| return await self._backend.connect_tcp(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpcore_backends\anyio.py", line 113, in connect_tcp
| with map_exceptions(exc_map):
| File "C:\Users*\anaconda3\envs\py311\Lib\contextlib.py", line 155, in exit
| self.gen.throw(typ, value, traceback)
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
| raise to_exc(exc) from exc
| httpcore.ConnectError: All connection attempts failed
|
| The above exception was the direct cause of the following exception:
|
| Traceback (most recent call last):
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\mcp\client\sse.py", line 49, in sse_client
| async with aconnect_sse(
| File "C:\Users*
\anaconda3\envs\py311\Lib\contextlib.py", line 204, in aenter
| return await anext(self.gen)
| ^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\httpx_sse_api.py", line 69, in aconnect_sse
| async with client.stream(method, url, headers=headers, kwargs) as response:
| File "C:\Users*
\anaconda3\envs\py311\Lib\contextlib.py", line 204, in aenter
| return await anext(self.gen)
| ^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpx_client.py", line 1583, in stream
| response = await self.send(
| ^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\httpx_client.py", line 1629, in send
| response = await self._send_handling_auth(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpx_client.py", line 1657, in _send_handling_auth
| response = await self._send_handling_redirects(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\httpx_client.py", line 1694, in _send_handling_redirects
| response = await self._send_single_request(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*
\anaconda3\envs\py311\Lib\site-packages\httpx_client.py", line 1730, in _send_single_request
| response = await transport.handle_async_request(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users*\anaconda3\envs\py311\Lib\site-packages\httpx_transports\default.py", line 393, in handle_async_request
| with map_httpcore_exceptions():
| File "C:\Users*
\anaconda3\envs\py311\Lib\contextlib.py", line 155, in exit
| self.gen.throw(typ, value, traceback)
| File "C:\Users***\anaconda3\envs\py311\Lib\site-packages\httpx_transports\default.py", line 118, in map_httpcore_exceptions
| raise mapped_exc(message) from exc
| httpx.ConnectError: All connection attempts failed
+------------------------------------

ERROR: Application startup failed. Exiting.

Additional Information

No response

Originally created by @moonphase97 on GitHub (May 15, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of mcpo. ### mcpo Version v0.0.14 ### Open WebUI Version (if applicable) v0.6.9 ### Operating System Windows11 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** MCPO and Open WebUI. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior Hi First, I apologize for my insufficient knowledge and BAD English skills. I may be asking very stupid questions. Thank you for your understanding. I installed mcpo and confirmed that it integrates well with open-webui. After that, I tried to run an SSE compatible server to connect it to n8n. ### Actual Behavior However, after `Connecting to SSE endpoint: http://localhost:8001/sse` an error occurs as shown in the log and it fails to run. The log provided is from anaconda, but uv and docker all show the same log. ### Steps to Reproduce The commands I used are as follows `uvx mcpo --port 8000 --server-type "sse" -- http://localhost:8001/sse --config ./config.json` `mcpo --port 8000 --server-type "sse" -- http://localhost:8001/sse --config ./config.json` `docker run -p 8000:8000 ghcr.io/open-webui/mcpo:main --api-key ***--server-type "sse" -- http://127.0.0.1:8001/sse -- uvx mcp-server-fetch` etc... ### Logs & Screenshots (py311) PS C:\mcpo> mcpo --port 8080 --server-type "sse" -- http://localhost:8001/sse --config ./config.json Starting MCP OpenAPI Proxy on 0.0.0.0:8080 with command: http://localhost:8001/sse --config ./config.json 2025-05-16 10:02:12,835 - INFO - Starting MCPO Server... 2025-05-16 10:02:12,835 - INFO - Name: MCP OpenAPI Proxy 2025-05-16 10:02:12,835 - INFO - Version: 1.0 2025-05-16 10:02:12,835 - INFO - Description: Automatically generated API from MCP Tool Schemas 2025-05-16 10:02:12,835 - INFO - Hostname: *** 2025-05-16 10:02:12,836 - INFO - Port: 8080 2025-05-16 10:02:12,836 - INFO - API Key: Not Provided 2025-05-16 10:02:12,836 - INFO - CORS Allowed Origins: ['*'] 2025-05-16 10:02:12,836 - INFO - Path Prefix: / 2025-05-16 10:02:12,836 - INFO - Configuring for a single SSE MCP Server with URL http://localhost:8001/sse 2025-05-16 10:02:12,836 - INFO - Uvicorn server starting... INFO: Started server process [55720] INFO: Waiting for application startup. 2025-05-16 10:02:12,857 - INFO - Connecting to SSE endpoint: http://localhost:8001/sse ERROR: + Exception Group Traceback (most recent call last): | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\starlette\routing.py", line 692, in lifespan | async with self.lifespan_context(app) as maybe_state: | File "C:\Users\***\anaconda3\envs\py311\Lib\contextlib.py", line 204, in __aenter__ | return await anext(self.gen) | ^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\mcpo\main.py", line 115, in lifespan | async with sse_client(url=args[0]) as ( | File "C:\Users\***\anaconda3\envs\py311\Lib\contextlib.py", line 204, in __aenter__ | return await anext(self.gen) | ^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\mcp\client\sse.py", line 45, in sse_client | async with anyio.create_task_group() as tg: | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\anyio\_backends\_asyncio.py", line 772, in __aexit__ | raise BaseExceptionGroup( | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_transports\default.py", line 101, in map_httpcore_exceptions | yield | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_transports\default.py", line 394, in handle_async_request | resp = await self._pool.handle_async_request(req) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpcore\_async\connection_pool.py", line 256, in handle_async_request | raise exc from None | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpcore\_async\connection_pool.py", line 236, in handle_async_request | response = await connection.handle_async_request( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpcore\_async\connection.py", line 101, in handle_async_request | raise exc | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpcore\_async\connection.py", line 78, in handle_async_request | stream = await self._connect(request) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpcore\_async\connection.py", line 124, in _connect | stream = await self._network_backend.connect_tcp(**kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpcore\_backends\auto.py", line 31, in connect_tcp | return await self._backend.connect_tcp( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpcore\_backends\anyio.py", line 113, in connect_tcp | with map_exceptions(exc_map): | File "C:\Users\***\anaconda3\envs\py311\Lib\contextlib.py", line 155, in __exit__ | self.gen.throw(typ, value, traceback) | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions | raise to_exc(exc) from exc | httpcore.ConnectError: All connection attempts failed | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\mcp\client\sse.py", line 49, in sse_client | async with aconnect_sse( | File "C:\Users\***\anaconda3\envs\py311\Lib\contextlib.py", line 204, in __aenter__ | return await anext(self.gen) | ^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx_sse\_api.py", line 69, in aconnect_sse | async with client.stream(method, url, headers=headers, **kwargs) as response: | File "C:\Users\***\anaconda3\envs\py311\Lib\contextlib.py", line 204, in __aenter__ | return await anext(self.gen) | ^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_client.py", line 1583, in stream | response = await self.send( | ^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_client.py", line 1629, in send | response = await self._send_handling_auth( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_client.py", line 1657, in _send_handling_auth | response = await self._send_handling_redirects( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_client.py", line 1694, in _send_handling_redirects | response = await self._send_single_request(request) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_client.py", line 1730, in _send_single_request | response = await transport.handle_async_request(request) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_transports\default.py", line 393, in handle_async_request | with map_httpcore_exceptions(): | File "C:\Users\***\anaconda3\envs\py311\Lib\contextlib.py", line 155, in __exit__ | self.gen.throw(typ, value, traceback) | File "C:\Users\***\anaconda3\envs\py311\Lib\site-packages\httpx\_transports\default.py", line 118, in map_httpcore_exceptions | raise mapped_exc(message) from exc | httpx.ConnectError: All connection attempts failed +------------------------------------ ERROR: Application startup failed. Exiting. ### Additional Information _No response_
yindo added the bug label 2026-02-15 20:17:46 -05:00
yindo closed this issue 2026-02-15 20:17:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/mcpo#65