microsoft / microsoft/markitdown

Connecting to SSE server running with Dockerfile not working

Open
#1,212 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Dockerfile and the server entry point under packages/markitdown/packages/markitdown-mcp, then reproduce the launch using --sse, --host 127.0.0.1, and --port 3001. Compare the container's reported address with the URL used by @modelcontextprotocol/inspector and the TypeScript SDK. Done means the inspector can connect to http://localhost:3001/sse without the connection error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
backend, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.