INFO: 127.0.0.1:49295 - "POST /message?session_id=9b94d60e421a4129855a767fc0b0fde4 HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 416, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/fastapi/applications.py", line 1135, in __call__
await super().__call__(scope, receive, send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/applications.py", line 107, in __call__
await self.middleware_stack(scope, receive, send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
raise exc
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/routing.py", line 716, in __call__
await self.middleware_stack(scope, receive, send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/routing.py", line 736, in app
await route.handle(scope, receive, send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/routing.py", line 290, in handle
await self.app(scope, receive, send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/fastapi/routing.py", line 115, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/fastapi/routing.py", line 101, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/fastapi/routing.py", line 355, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/fastapi/routing.py", line 243, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/mcpgateway/translate.py", line 1960, in post_message
await stdio.send(payload.decode().rstrip() + "\n")
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/site-packages/mcpgateway/translate.py", line 521, in send
await self._stdin.drain()
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/asyncio/streams.py", line 392, in drain
await self._protocol._drain_helper()
File "/Users/ghart/miniforge3/envs/contextforge-cli/lib/python3.11/asyncio/streams.py", line 166, in _drain_helper
raise ConnectionResetError('Connection lost')
ConnectionResetError: Connection lost
Describe the bug
With the latest version of the upstream project, the
cforge runcommand is no longer working.Sample Code
Expected behavior
The MCP server should boot and auto-register itself with ContextForge, then unregister when quit.
Observed behavior
Registration fails with a 500 that I believe is coming from CF trying to invoke the MCP server:
error in
cforge serveerror in
cforge runlogs