You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and discussions.
I am using the latest version of mcpo.
mcpo Version
mcpo-0.0.12
Open WebUI Version (if applicable)
No response
Operating System
win11
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
In SSE mode, using the command mcpo --server-type "sse" -- http://localhost:3333/sse should normally start the MCP proxy server.
Actual Behavior
502 Bad Gateway Error
Steps to Reproduce
1.MCP Server Initialization
Successfully launched the Figma-Context-MCP server with the following terminal logs:
Initializing Figma MCP Server in HTTP mode on port 3333...
HTTP server listening on port 3333
SSE endpoint available at http://localhost:3333/sse
Message endpoint available at http://localhost:3333/messages
(: Server logs explicitly reference localhost for SSE endpoints.)
2.Proxy Setup Failure
Attempted to start the proxy using:
mcpo --server-type "sse" -- http://localhost:3333/sse
Resulted in 502 Bad Gateway Error.
3.Workaround Validation
Modified the URL to use explicit addresses:
-127.0.0.1: Proxy started successfully.like mcpo --server-type "sse" -- http://127.0.0.1:3333/sse
-[::1] (IPv6 loopback): Proxy also started successfully.
Logs & Screenshots
D:>mcpo --port 5566 --server-type "sse" -- http://localhost:3333/sse
Starting MCP OpenAPI Proxy on 0.0.0.0:5566 with command: http://localhost:3333/sse
INFO: Started server process [7572]
INFO: Waiting for application startup.
ERROR: Traceback (most recent call last):
File "D:\Miniconda\Lib\site-packages\mcp\client\sse.py", line 53, in sse_client
event_source.response.raise_for_status()
File "D:\Miniconda\Lib\site-packages\httpx_models.py", line 829, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '502 Bad Gateway' for url 'http://localhost:3333/sse'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
During handling of the above exception, another exception occurred:
Exception Group Traceback (most recent call last):
| File "D:\Miniconda\Lib\site-packages\starlette\routing.py", line 692, in lifespan
| async with self.lifespan_context(app) as maybe_state:
| File "D:\Miniconda\Lib\contextlib.py", line 210, in aenter
| return await anext(self.gen)
| ^^^^^^^^^^^^^^^^^^^^^
| File "D:\Miniconda\Lib\site-packages\mcpo\main.py", line 101, in lifespan
| async with sse_client(url=args[0], sse_read_timeout=None) as (reader, writer):
| File "D:\Miniconda\Lib\contextlib.py", line 210, in aenter
| return await anext(self.gen)
| ^^^^^^^^^^^^^^^^^^^^^
| File "D:\Miniconda\Lib\site-packages\mcp\client\sse.py", line 43, in sse_client
| async with anyio.create_task_group() as tg:
| File "D:\Miniconda\Lib\site-packages\anyio_backends_asyncio.py", line 767, in aexit
| raise BaseExceptionGroup(
| ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "D:\Miniconda\Lib\site-packages\mcp\client\sse.py", line 53, in sse_client
| event_source.response.raise_for_status()
| File "D:\Miniconda\Lib\site-packages\httpx_models.py", line 829, in raise_for_status
| raise HTTPStatusError(message, request=request, response=self)
| httpx.HTTPStatusError: Server error '502 Bad Gateway' for url 'http://localhost:3333/sse'
| For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
+------------------------------------
ERROR: Application startup failed. Exiting.
Additional Information
The failure appears to stem from localhost resolution inconsistencies in the underlying SSE URL parser.
This discussion was converted from issue #104 on April 28, 2025 12:38.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Check Existing Issues
mcpo Version
mcpo-0.0.12
Open WebUI Version (if applicable)
No response
Operating System
win11
Browser (if applicable)
No response
Confirmation
README.md
.Expected Behavior
In SSE mode, using the command mcpo --server-type "sse" -- http://localhost:3333/sse should normally start the MCP proxy server.
Actual Behavior
502 Bad Gateway Error
Steps to Reproduce
1.MCP Server Initialization
Successfully launched the Figma-Context-MCP server with the following terminal logs:
Initializing Figma MCP Server in HTTP mode on port 3333...
HTTP server listening on port 3333
SSE endpoint available at http://localhost:3333/sse
Message endpoint available at http://localhost:3333/messages
(: Server logs explicitly reference localhost for SSE endpoints.)
2.Proxy Setup Failure
Attempted to start the proxy using:
mcpo --server-type "sse" -- http://localhost:3333/sse
Resulted in 502 Bad Gateway Error.
3.Workaround Validation
Modified the URL to use explicit addresses:
-127.0.0.1: Proxy started successfully.like mcpo --server-type "sse" -- http://127.0.0.1:3333/sse
-[::1] (IPv6 loopback): Proxy also started successfully.
Logs & Screenshots
D:>mcpo --port 5566 --server-type "sse" -- http://localhost:3333/sse
Starting MCP OpenAPI Proxy on 0.0.0.0:5566 with command: http://localhost:3333/sse
INFO: Started server process [7572]
INFO: Waiting for application startup.
ERROR: Traceback (most recent call last):
File "D:\Miniconda\Lib\site-packages\mcp\client\sse.py", line 53, in sse_client
event_source.response.raise_for_status()
File "D:\Miniconda\Lib\site-packages\httpx_models.py", line 829, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '502 Bad Gateway' for url 'http://localhost:3333/sse'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
During handling of the above exception, another exception occurred:
| File "D:\Miniconda\Lib\site-packages\starlette\routing.py", line 692, in lifespan
| async with self.lifespan_context(app) as maybe_state:
| File "D:\Miniconda\Lib\contextlib.py", line 210, in aenter
| return await anext(self.gen)
| ^^^^^^^^^^^^^^^^^^^^^
| File "D:\Miniconda\Lib\site-packages\mcpo\main.py", line 101, in lifespan
| async with sse_client(url=args[0], sse_read_timeout=None) as (reader, writer):
| File "D:\Miniconda\Lib\contextlib.py", line 210, in aenter
| return await anext(self.gen)
| ^^^^^^^^^^^^^^^^^^^^^
| File "D:\Miniconda\Lib\site-packages\mcp\client\sse.py", line 43, in sse_client
| async with anyio.create_task_group() as tg:
| File "D:\Miniconda\Lib\site-packages\anyio_backends_asyncio.py", line 767, in aexit
| raise BaseExceptionGroup(
| ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "D:\Miniconda\Lib\site-packages\mcp\client\sse.py", line 53, in sse_client
| event_source.response.raise_for_status()
| File "D:\Miniconda\Lib\site-packages\httpx_models.py", line 829, in raise_for_status
| raise HTTPStatusError(message, request=request, response=self)
| httpx.HTTPStatusError: Server error '502 Bad Gateway' for url 'http://localhost:3333/sse'
| For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
+------------------------------------
ERROR: Application startup failed. Exiting.
Additional Information
The failure appears to stem from localhost resolution inconsistencies in the underlying SSE URL parser.
Beta Was this translation helpful? Give feedback.
All reactions