# MarkItDown MCP troubleshooting

> Server disconnected, CONNECTION_CLOSED, Unsupported URI scheme, empty results, huge documents, plugin crashes: each MCP problem we reproduced, with fixes.

Source: https://markitdown.dev/mcp/troubleshooting/ · Updated 2026-11-16·Upstream source ↗

Most MCP problems are one of a handful of things, and we reproduced each of them below with the exact message. Start by running the server on its own: if it does not start there, no client will make it start.

> **Short answer**
>
> Run the command from your config in a terminal. If it starts and waits, the server is fine and the problem is the client's config or path. If it prints an error, fix that first.

Tested with markitdown 0.1.9 · Python markitdown-mcp 0.0.1a8, MCP SDK 2.3.0, Python 3.13, Linux lab; Claude Code 2.1.325, Codex CLI 0.169.0, Gemini CLI 0.68.0 (T13, T21) · 2026-11-16 · evidence: [server-probe.log](https://markitdown.dev/evidence/T13/server-probe.log), [uvx-probe.log](https://markitdown.dev/evidence/T13/uvx-probe.log), [cc-probe.log](https://markitdown.dev/evidence/T13/cc-probe.log), [mcp.log](https://markitdown.dev/evidence/T21/mcp.log)

## The client says "failed to connect" or `CONNECTION_CLOSED`

Claude Code reported `Failed to connect — CONNECTION_CLOSED` for `uvx markitdown-mcp==0.0.1a8` under uv 0.11.32. Running the command shows the cause:

````markdown
$ uv --version
uv 0.11.32 (x86_64-unknown-linux-gnu)
$ uvx markitdown-mcp --help   (uv 0.11.32)
               than STDIO (default: False)
  --sse        (Deprecated) An alias for --http (default: False)
  --host HOST  Host to bind to (default: 127.0.0.1)
  --port PORT  Port to listen on (default: 3001)
$ uvx --from markitdown-mcp markitdown-mcp  resolved versions
markitdown-mcp 0.0.1a7 markitdown 0.1.5
$ uvx --prerelease=allow ...
markitdown-mcp 0.0.1a8 markitdown 0.1.9
$ uvx markitdown-mcp==0.0.1a8 --help   (uv 0.11.32)
````

*uvx-probe.log · 1,205 bytes · first 12 of 23 lines shown*

The server depends on a pre-release package, so uv needs `--prerelease=allow`. With the flag it connected:

```bash
uvx --prerelease=allow markitdown-mcp==0.0.1a8
```

A plain `uvx markitdown-mcp` started under the same uv but silently resolved the older 0.0.1a7 with markitdown 0.1.5. Check the version with `pip show markitdown-mcp`: the server has no `--version` flag.

## `Unsupported URI scheme`

The tool takes a URI. A plain path such as `/tmp/report.docx` was rejected with `Unsupported URI scheme: /tmp/report.docx. Supported schemes are: ...`. Use `file:///tmp/report.docx`, `http(s)://...` or a `data:` URI. An empty URI gave the same error.

## Short error messages

Every error the server returned in our probe
| What we asked | Message length |
| --- | --- |
| missing file | 97 |
| a folder | 86 |
| a plain path without a scheme | 143 |
| empty uri | 118 |
| https to an unreachable host | 71 |

*Every error the server returned in our probe Source: Test T13 · markitdown-mcp 0.0.1a8 · mcp-responses.csv · Download CSV*

A missing file gave "Could not read the resource: No such file or directory", a folder "Is a directory", and an unreachable address "Could not fetch the resource." The nested cause is not included.

## An empty result with no error

A scanned PDF returned 0 characters ([OCR](https://markitdown.dev/ocr/)). The server cannot read text from pictures.

## A huge document

A 200-page text PDF came back as 848,539 characters, roughly 212,000 tokens. A client with a tool-result limit may refuse that. We did not reproduce a client's limit message. Convert with the command line instead and let the client read the file ([CLI](https://markitdown.dev/cli/)).

## The server stops answering with plugins enabled

With `MARKITDOWN_ENABLE_PLUGINS=true` and the upstream sample plugin, a request for an RTF file with an emoji in it never returned: the plugin's output contained lone surrogate characters and the server died with `UnicodeEncodeError ... surrogates not allowed` ([details](https://markitdown.dev/plugins/)). Turn plugins off for the server, or use a plugin whose output is valid text.

## HTTP mode

`markitdown-mcp --http` listens on 127.0.0.1:3001. The endpoint is `/mcp`: `/mcp/` redirected (307) and `/` gave 404. Starting it on another interface printed a warning that the server has no authentication.

## Client-specific traps we hit

-   **Claude Code:** put `--env KEY=value` after the server name.
-   **Codex CLI:** `CODEX_HOME` must point at an existing folder.
-   **Gemini CLI:** project-scope servers are disabled in an untrusted folder.

See [the client page](https://markitdown.dev/mcp/clients/).

## Messages reported upstream that we did not reproduce

These need a client or a server version we did not run. Their cards say so.

### Input should be 'tools/call'

Not yet tested · fixed in 0.0.1a7

### Input should be 'tools/call'

markitdown-mcp 0.0.1a4 pins an old MCP SDK that does not understand newer clients.

Fix

-   Use markitdown-mcp 0.0.1a7 or newer (0.0.1a8 is current).

Affected: 0.0.1a4 · [Upstream report](https://github.com/microsoft/markitdown/issues/2365)

### Field required

Not yet tested

### Field required \[type=missing, input\_value={}, input\_type=dict\]

The URI was sent under params.input; the tool expects params.arguments.

Fix

-   Send {"name": "convert\_to\_markdown", "arguments": {"uri": "file:///..."}}.

Affected: any · [Upstream report](https://github.com/microsoft/markitdown/issues/1362)

### SseError: fetch failed in Docker

Not yet tested

### SseError: SSE error: TypeError: fetch failed: other side closed

The server inside the container listens on 127.0.0.1, which the host cannot reach.

Fix

-   Start the server with --host 0.0.0.0 inside the container and publish the port (-p 3001:3001); see the security warning for non-local binds.

Affected: Docker · [Upstream report](https://github.com/microsoft/markitdown/issues/1212)

In our Docker run the HTTP endpoint was `/mcp` and answered normally when the port was published ([Docker page](https://markitdown.dev/docker/)).

## Related

- [MCP server](https://markitdown.dev/mcp/): The server, launchers and limits.
- [MCP in Cursor, Claude Code, Codex and others](https://markitdown.dev/mcp/clients/): Client-by-client notes.
- [Plugins](https://markitdown.dev/plugins/): Plugins and the server.
- [Error reference](https://markitdown.dev/errors/): Other error messages.

---
Independent guide to the open-source MarkItDown library. Not affiliated with or endorsed by Microsoft. Official source: https://github.com/microsoft/markitdown
