Skip to content

Connecting to SSE server running with Dockerfile not working #1212

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

Open
fazaamal opened this issue Apr 25, 2025 · 1 comment
Open

Connecting to SSE server running with Dockerfile not working #1212

fazaamal opened this issue Apr 25, 2025 · 1 comment

Comments

@fazaamal
Copy link

I am running an SSE server with the given Dockerfile in packages/markitdown/packages/markitdown-mcp and using the flags --sse --host 127.0.0.1 --port 3001.

In Docker it shows that it is running as per the logs

2025-04-25 17:45:08 INFO:     Started server process [1]
2025-04-25 17:45:08 INFO:     Waiting for application startup.
2025-04-25 17:45:08 INFO:     Application startup complete.
2025-04-25 17:45:08 INFO:     Uvicorn running on http://127.0.0.1:3001 (Press CTRL+C to quit)

But when I try to inspect the MCP server using npx @modelcontextprotocol/inspector and enter 'http://localhost:3001/sse' into the MCP server URL and clicking Connect, it shows this Connection Error, is your MCP server running? and in the logs of the inspector it shows this

Error in /sse route: SseError: SSE error: TypeError: fetch failed: other side closed
    at _eventSource.onerror (file:///Users/fazasophian/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js:69:31)
    at EventSource.scheduleReconnect_fn (file:///Users/fazasophian/.npm/_npx/5a9d879542beca3a/node_modules/eventsource/dist/index.js:248:53)
    at file:///Users/fazasophian/.npm/_npx/5a9d879542beca3a/node_modules/eventsource/dist/index.js:98:174 {
  code: undefined,
  event: {
    type: 'error',
    message: 'TypeError: fetch failed: other side closed',
    code: undefined,
    defaultPrevented: false,
    cancelable: false,
    timeStamp: 135798.814292
  }
}

Even when I am trying to connect to it using modelcontextprotocol's typescript-sdk, it also is unable to connect to the MCP server.

Anyone able to help?

Thanks in advance

@fazaamal fazaamal changed the title Running SSE server with Dockerfile not working Connecting to SSE server with Dockerfile not working Apr 25, 2025
@fazaamal fazaamal changed the title Connecting to SSE server with Dockerfile not working Connecting to SSE server running with Dockerfile not working Apr 25, 2025
@fazaamal
Copy link
Author

#1155 Im not sure if this issue is related but it mentions that it works on Windows and not Macos. I am running too on Macos M1

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

No branches or pull requests

1 participant