LLMAIAI Coding Agents

MarkItDown: Turn PDFs and Office Files into Markdown for LLMs (CLI, Docker, MCP; Linux, Windows, Mac)

Before you start

  • 21 min read
  • Updated November 2026

Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#

MarkItDown is a free Python tool from Microsoft that turns PDFs, Word, Excel, PowerPoint, HTML and more into plain Markdown, so a language model (LLM) can read them.

MarkItDown text label (the project has no official logo)

Logo: the project (github.com/microsoft/markitdown) ships no logo file. This is a plain text label made by DIY Lab Hub, not a Microsoft logo.

Markdown is plain text with simple marks for headings, lists and tables. You run MarkItDown as a command, from Python, in a Docker container you build yourself, or as an MCP server (a small program an AI app can call as a tool). There is no web page, no database and no login.

WhatValue (official sources, read November 2026)
Current versionmarkitdown 0.1.9, released 21 October 2026 (previous: 0.1.8, September 2026)
MCP packagemarkitdown-mcp 0.0.1a8, released 21 October 2026. The a8 means alpha. It has its own version numbers
LicenceMIT (Copyright Microsoft Corporation). No paid edition found
Time neededAbout 15 minutes for pip, 10 more for Docker (our estimate)
RAMNo official figure. See Performance and resources
PortsNone for the command. 3001 only for the optional MCP HTTP mode
Docker imageNone official. You build it from the repository
Official docsREADME at v0.1.9 and the MCP README

At a glance:

  • Formats: PDF, Word, Excel, PowerPoint, images, audio, HTML, CSV, JSON, XML, ZIP, YouTube links and EPUB.
  • Not an app. The README lists web servers, REST APIs and web front ends as out of scope. Do not look for a dashboard.
  • Scans fail quietly. A scanned PDF gives an empty file and exit code 0, unless you add OCR (Step 6).

Which version. We pin markitdown==0.1.9 (GitHub's Latest) and markitdown-mcp==0.0.1a8. We found no report that 0.1.9 breaks an install.

How it fits together#

You give MarkItDown a file. It picks a converter by file type and returns Markdown. Nothing else is needed unless you add OCR or an AI client.

MarkItDown flow: PDF, Word, Excel and PowerPoint files go into the markitdown command, or an AI agent calls markitdown-mcp; both return Markdown, which you feed into chunking and RAG; a dashed optional branch sends images to a local Ollama vision model or to a cloud service

Drawn for this guide from the official README and source. Dashed parts are optional.

Before you start#

You need Python 3.10 to 3.14. Docker is only for Steps 4 and 5.

SystemWhat to have
LinuxPython 3.10 to 3.14 with venv (on Debian or Ubuntu: sudo apt install python3-venv)
WindowsPython from python.org, with the py launcher, and PowerShell. Docker Desktop (Linux containers) for the Docker steps
MacPython 3.10 to 3.14 from python.org (the system Python may be too old). Docker Desktop for the Docker steps

Check your tools:

Run in terminalbash
python3 --version
docker --version
git --version

On Windows use py --version instead of python3 --version.

Checklist:

  • [ ] python3 --version (or py --version) prints 3.10 to 3.14
  • [ ] A sample PDF with selectable text and a .docx file
  • [ ] For Steps 4 and 5: Docker and Git work

Tested by DIY Lab Hub: not yet. Commands come from the official README, Dockerfiles and source at v0.1.9, read in November 2026. We did not run them. We say "expected" where we have no captured output.

Tip: The project does not certify Windows ARM64, Apple Silicon or Raspberry Pi. On native Windows ARM64 the [all] install failed (issue 2440, open). Pick only the extras you need.

Step 1: Install MarkItDown in a virtual environment#

A virtual environment is a private folder of Python packages, so MarkItDown cannot clash with other projects (the README recommends one). Extras are optional package groups in square brackets. [all] installs every converter; a short list saves disk space.

ExtraAdds support for
(none)Text, HTML, CSV, JSON, XML, ZIP, EPUB, URLs
[pdf]PDF (existing text only): pdfminer.six, pdfplumber
[docx] / [pptx]Word (mammoth, lxml) / PowerPoint (python-pptx)
[xlsx] / [xls]Excel (pandas, openpyxl) / old Excel (pandas, xlrd)
[audio-transcription]Speech to text (pydub, SpeechRecognition). Sends audio to Google
[az-doc-intel], [az-content-understanding], [youtube-transcription], [outlook]Azure services, YouTube transcripts, Outlook messages
[all]Everything above

Linux#

Run in terminalbash
mkdir -p ~/docker_volumes/markitdown/{in,out,backups}
cd ~/docker_volumes/markitdown
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install 'markitdown[all]==0.1.9'
python -m pip check
markitdown --version

Windows (PowerShell)#

Codepowershell
New-Item -ItemType Directory -Force "$HOME\docker_volumes\markitdown\in", "$HOME\docker_volumes\markitdown\out", "$HOME\docker_volumes\markitdown\backups" | Out-Null
Set-Location "$HOME\docker_volumes\markitdown"
py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install "markitdown[all]==0.1.9"
python -m pip check
markitdown --version

Mac (Terminal)#

Same commands as Linux.

Check it worked. Expected, not captured: pip check says No broken requirements found., markitdown --version prints markitdown 0.1.9, and your prompt starts with (.venv).

Tip: If PowerShell refuses Activate.ps1, skip activation and call .\.venv\Scripts\markitdown.exe directly, or run Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass (this window only). Several Pythons? py --list shows them, and py -3.12 -m venv .venv picks one.

Step 2: Convert your first file#

Give the command a file name. Add -o to choose the output file. Without a file name it reads standard input.

Use -o on Windows instead of >. The > form crashed with UnicodeEncodeError in issue 1370. The maintainers say it is fixed on main and -o writes UTF-8 directly.

Copy a PDF and a Word file into the in folder first.

Linux#

Run in terminalbash
cd ~/docker_volumes/markitdown
printf '<h1>Lab Test</h1><p>Hello from MarkItDown.</p>' | markitdown -x .html -o out/smoke.md
markitdown in/example.pdf -o out/example.md
markitdown in/example.docx -o out/example-docx.md
for f in in/*; do
  [ -f "$f" ] || continue
  o="out/$(basename "$f").md"
  markitdown "$f" -o "$o" || echo "FAILED: $f" >&2
  [ -s "$o" ] || echo "EMPTY: $f" >&2
done

Windows (PowerShell)#

Codepowershell
Set-Location "$HOME\docker_volumes\markitdown"
"<h1>Lab Test</h1><p>Hello from MarkItDown.</p>" | markitdown -x .html -o out\smoke.md
markitdown in\example.pdf -o out\example.md
markitdown in\example.docx -o out\example-docx.md
Get-ChildItem .\in -File | ForEach-Object {
  $o = Join-Path .\out ($_.Name + ".md")
  markitdown $_.FullName -o $o
  if ($LASTEXITCODE -ne 0) { Write-Warning "FAILED: $($_.Name)" }
  elseif ((Get-Item $o).Length -eq 0) { Write-Warning "EMPTY: $($_.Name)" }
}

Mac (Terminal)#

Same commands as Linux.

The -x .html flag tells MarkItDown the file type, because standard input has no file name. By default MarkItDown cuts long base64 image data out of the result. Add --keep-data-uris to keep it.

Check it worked. Expected: out/smoke.md holds # Lab Test and the greeting, and every file in in has a .md twin in out with no Python traceback.

Step 3: Check the result#

Look at a sample before you feed Markdown to an AI. Some failures are silent.

What you may seeWhy
Empty .md, exit code 0A scanned PDF has no text layer. Stock MarkItDown only reads existing text (issue 1156, confirmed on 0.1.9 in November 2026)
Missing text after a pictureOpen bug in PDF parsing (issue 1870)

Linux#

Run in terminalbash
cd ~/docker_volumes/markitdown
ls -lh out/
head -n 20 out/example.md

Windows (PowerShell)#

Codepowershell
Set-Location "$HOME\docker_volumes\markitdown"
Get-ChildItem .\out | Select-Object Name, Length
Get-Content .\out\example.md -TotalCount 20 -Encoding UTF8

Mac (Terminal)#

Same commands as Linux.

Build a small test set once: a text PDF, a scanned PDF, a two-column PDF, a Word file with pictures, an Excel file and a non-English file. Compare the results with the originals, and again before every upgrade.

Check it worked. No file is 0 bytes unless expected. First and last paragraphs match the source.

Step 4: Build the Docker image yourself#

There is no official image and no official Compose file. The README says to build it from the repository. Use tag v0.1.9, the files we read.

The v0.1.9 Dockerfile starts from python:3.13-slim-trixie, adds ffmpeg and exiftool, installs markitdown[all], and runs as nobody:nogroup. The entry point is markitdown, so everything after the image name is a CLI argument.

Linux#

Run in terminalbash
cd ~/docker_volumes/markitdown
git clone --branch v0.1.9 --depth 1 https://github.com/microsoft/markitdown.git src
cd src
docker build -t markitdown:0.1.9 .
cd ..
docker run --rm markitdown:0.1.9 --version
docker run --rm -i --network none markitdown:0.1.9 < in/example.pdf > out/docker-stdin.md
docker run --rm --network none --user "$(id -u):$(id -g)" \
  -v "$HOME/docker_volumes/markitdown/in:/in:ro" \
  -v "$HOME/docker_volumes/markitdown/out:/out" \
  markitdown:0.1.9 /in/example.pdf -o /out/docker-mount.md

Windows (PowerShell)#

PowerShell has no < input redirect, so mount the folders instead.

Codepowershell
Set-Location "$HOME\docker_volumes\markitdown"
git clone --branch v0.1.9 --depth 1 https://github.com/microsoft/markitdown.git src
Set-Location src
docker build -t markitdown:0.1.9 .
Set-Location ..
docker run --rm markitdown:0.1.9 --version
docker run --rm --network none `
  -v "$HOME\docker_volumes\markitdown\in:/in:ro" `
  -v "$HOME\docker_volumes\markitdown\out:/out" `
  markitdown:0.1.9 /in/example.pdf -o /out/docker-mount.md

Mac (Terminal)#

Same commands as Linux (Docker Desktop).

The < in > out form is the README's own. --network none keeps a local conversion off the network; remove it for URLs.

Check it worked. Expected: the build ends without errors, --version prints markitdown 0.1.9, and out/docker-mount.md matches the pip result.

Tip: Permission denied on the output folder means the container runs as nobody. Pass --user "$(id -u):$(id -g)" on Linux and Mac, as above.

Step 5: Run the MCP server#

markitdown-mcp gives an AI app one tool, convert_to_markdown(uri), for http:, https:, file: or data: addresses. Know four things:

  • It depends on markitdown[all], so it installs every extra.
  • It runs over STDIO (the app starts it and talks through pipes) by default. With --http it listens on 127.0.0.1:3001.
  • It returns the whole Markdown in one reply, which can exceed an AI client's limit.
  • It has no vision client, so no image captions and no OCR.

Linux#

Run in terminalbash
cd ~/docker_volumes/markitdown
source .venv/bin/activate
python -m pip install 'markitdown-mcp==0.0.1a8'
markitdown-mcp --http --host 127.0.0.1 --port 3001

Stop it with Ctrl+C. To build the image (it needs the src folder from Step 4), go into the MCP folder first:

Run in terminalbash
cd ~/docker_volumes/markitdown/src/packages/markitdown-mcp
docker build -t markitdown-mcp:0.0.1a8 .

Windows (PowerShell)#

Codepowershell
Set-Location "$HOME\docker_volumes\markitdown"
.\.venv\Scripts\Activate.ps1
python -m pip install "markitdown-mcp==0.0.1a8"
markitdown-mcp --http --host 127.0.0.1 --port 3001

Stop it with Ctrl+C. To build the image:

Codepowershell
Set-Location "$HOME\docker_volumes\markitdown\src\packages\markitdown-mcp"
docker build -t markitdown-mcp:0.0.1a8 .

Mac (Terminal)#

Same commands as Linux.

The MCP Dockerfile installs markitdown from PyPI by range (>=0.1.9,<0.2.0), not from your checkout, so a later rebuild can pull a newer 0.1.x. Keep the image you tested.

Connect Claude Desktop. The MCP README suggests Docker for it. In Claude Desktop open Settings, Developer, Edit Config. The file is ~/Library/Application Support/Claude/claude_desktop_config.json on Mac and %APPDATA%\Claude\claude_desktop_config.json on Windows (MCP docs). Add this entry with your real absolute path (/Users/<you>/... on Mac; on Windows write the full path with doubled backslashes in JSON). The folder must be readable by other users, because the container runs as nobody. Add "--network", "none" after "-i" if you only read local files. Then restart Claude Desktop:

File contentjson
{
  "mcpServers": {
    "markitdown": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-v", "/home/<you>/docker_volumes/markitdown/in:/workdir:ro",
        "markitdown-mcp:0.0.1a8"
      ]
    }
  }
}

Use the container path in the address: file:///workdir/example.pdf. If the server does not connect, read mcp.log in ~/Library/Logs/Claude (Mac) or %APPDATA%\Claude\logs (Windows).

Connect Claude Code. The syntax is claude mcp add [options] <name> -- <command> [args...] (Claude Code docs):

Run in terminalbash
claude mcp add --scope user markitdown -- docker run --rm -i -v "$HOME/docker_volumes/markitdown/in:/workdir:ro" markitdown-mcp:0.0.1a8
claude mcp list

Test with MCP Inspector (needs Node.js): run npx @modelcontextprotocol/inspector, choose STDIO and the command markitdown-mcp, click Connect, then Tools, List Tools, and run convert_to_markdown on a valid address.

Check it worked. Expected: the tool list shows convert_to_markdown, and a file:///workdir/... call returns Markdown.

Tip: Raw JSON-RPC calls put the address under params.arguments, not params.input (issue 1362).

Step 6: Add OCR and image captions with a local model (optional)#

Stock MarkItDown cannot read a scan. The separate plugin markitdown-ocr (0.1.2, MIT) sends page images to a vision model. Image captions use the same route. The model can run on your PC with Ollama (our guide).

We did not test this and found no official model advice. It joins two documented parts: MarkItDown's llm_client and Ollama's OpenAI-compatible address http://localhost:11434/v1/ (the key is required but ignored).

Read these four warnings first:

  1. No --llm-client flag. The OCR README shows one, but the CLI at v0.1.9 has none. Use Python.
  2. Silent skip. Without llm_client the plugin loads and skips OCR without a message.
  3. Open OCR bugs. Scanned PDFs gave only page markers in issue 1863 and issue 2343. Test with one scan first.
  4. AGPL dependency. The plugin needs PyMuPDF, which is AGPL-3.0 or a paid Artifex licence (issue 1675). Check this before you ship a product.

Start Ollama and pull a vision model first, for example ollama pull qwen3-vl:8b (the model in Ollama's own vision example). Any vision model you have works. Save this as ocr_convert.py in ~/docker_volumes/markitdown:

Run in terminalpython
import sys
from pathlib import Path
from openai import OpenAI
from markitdown import MarkItDown

src, dst = Path(sys.argv[1]), Path(sys.argv[2])
client = OpenAI(base_url="http://localhost:11434/v1/", api_key="ollama", max_retries=5)
md = MarkItDown(enable_plugins=True, llm_client=client, llm_model="qwen3-vl:8b")
result = md.convert_local(str(src))
dst.write_text(result.markdown, encoding="utf-8")
print(f"Wrote {len(result.markdown)} characters to {dst}")

Linux#

Run in terminalbash
cd ~/docker_volumes/markitdown
source .venv/bin/activate
python -m pip install 'markitdown-ocr==0.1.2' openai
markitdown --list-plugins
python ocr_convert.py in/scanned.pdf out/scanned.md

Windows (PowerShell)#

Codepowershell
Set-Location "$HOME\docker_volumes\markitdown"
.\.venv\Scripts\Activate.ps1
python -m pip install "markitdown-ocr==0.1.2" openai
markitdown --list-plugins
python .\ocr_convert.py .\in\scanned.pdf .\out\scanned.md

Mac (Terminal)#

Same commands as Linux.

Check it worked. Expected: --list-plugins shows ocr, and the script prints a non-zero character count. If the file holds only ## Page headings, you hit the open bug above.

Tip: A local Ollama keeps images on your machine. If you point base_url at https://ollama.com/v1 or at OpenAI, the images leave it.

Put it behind HTTPS (with or without Traefik)#

The command and the STDIO server need no HTTPS. The HTTP server has no login, so never publish it. The MCP README says to use it only with local trusted agents and not to bind it to other interfaces.

If an AI client on another machine must reach it, put a reverse proxy with a password in front. Both routes are our untested adaptation.

Two facts from the source explain the files:

  • The container must bind 0.0.0.0 so the proxy can reach it. That prints WARNING: The server is being bound to a non-localhost interface. Never add ports: here.
  • The MCP SDK 2.1.1 checks the Host header only when the server binds 127.0.0.1, localhost or ::1. Bound to 0.0.0.0, that check is off, which is why a proxy name works.

Create the shared network once: docker network create proxy.

With Traefik#

On a server that already runs Traefik v3 with the Docker provider. Use your own entry point name. Make the hash with htpasswd -nB <user> (it asks for the password) and write every $ as $$ in Compose (Traefik's docs). Any other container on proxy can reach port 3001 without the password, so give this pair its own network if you share proxy.

File contentyaml
services:
  markitdown-mcp:
    image: markitdown-mcp:0.0.1a8
    container_name: markitdown-mcp
    restart: unless-stopped
    command: ["--http", "--host", "0.0.0.0", "--port", "3001"]
    volumes:
      - ./in:/workdir:ro
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.http.routers.markitdown.rule=Host(`markitdown.<your-domain>`)"
      - "traefik.http.routers.markitdown.entrypoints=https"
      - "traefik.http.routers.markitdown.tls=true"
      - "traefik.http.routers.markitdown.middlewares=markitdown-auth"
      - "traefik.http.middlewares.markitdown-auth.basicauth.users=<user>:<hash-with-doubled-dollars>"
      - "traefik.http.services.markitdown.loadbalancer.server.port=3001"

networks:
  proxy:
    external: true

Without Traefik: Caddy#

Caddy renews its own certificates for a public domain; for a home-only name use tls internal (our Caddy guide shows how devices trust its root). Use the MarkItDown file above without labels: and add Caddy:

Run in terminalbash
mkdir -p ~/docker_volumes/caddy/{conf,data,config}
cd ~/docker_volumes/caddy
docker run --rm -it caddy:2.11.9 caddy hash-password

The command asks for a password and prints a hash. Caddy's docs show bcrypt hashes starting with $2a$. Save this as ~/docker_volumes/caddy/conf/Caddyfile:

File contenttext
markitdown.example.com {
    basic_auth {
        <user> <hash-from-above>
    }
    reverse_proxy markitdown-mcp:3001
}

For a home name, add tls internal as the first line inside the braces. Save this as ~/docker_volumes/caddy/docker-compose.yml. It mounts the conf folder, not a single file:

File contentyaml
services:
  caddy:
    image: caddy:2.11.9
    container_name: caddy
    restart: unless-stopped
    ports:
      - "80:80/tcp"
      - "443:443/tcp"
      - "443:443/udp"
    volumes:
      - ./conf:/etc/caddy:ro
      - ./data:/data
      - ./config:/config
    networks:
      - proxy

networks:
  proxy:
    external: true

Run docker compose up -d in both folders. On Windows create the folders with New-Item -ItemType Directory -Force; the Docker commands are the same. Check it worked. curl -I https://markitdown.example.com/mcp should answer 401 without a password. On Windows use curl.exe.

Tip: Many MCP clients cannot send a custom Authorization header. Check yours before you build this.

Security and testing#

MarkItDown runs with the rights of its user, like Python's open() and requests.get() (README). A tricked agent that asks for file:///etc/passwd gets an answer from a plain install.

ControlHow
Share one folderMount only in, read-only (:ro), never your home folder
Docker socketMarkItDown never needs /var/run/docker.sock. Never mount it
NetworkUse --network none for local batches. Keep MCP on STDIO or 127.0.0.1
PluginsOff by default, but the MCP Docker image sets MARKITDOWN_ENABLE_PLUGINS=True. Install only plugins you trust

What leaves your machine (from the source at v0.1.9):

ActionLeaves the machine?
Local PDF, Office, HTML, CSV, ZIP conversionNo
Audio transcription ([audio-transcription])Yes. The code calls recognize_google, so audio goes to Google
An http, https or YouTube addressYes. It is fetched from the internet
-d (Document Intelligence) or --use-cu (Content Understanding)Yes, to your Azure endpoint. Calls are billable
llm_client (captions, OCR)Wherever base_url points. Local Ollama stays home
TelemetryThe Dockerfiles set ORT_DISABLE_TELEMETRY=1 (a library the tool uses). No project telemetry switch is documented. We did not audit the traffic

Do not convert confidential files with a cloud option unless its terms allow it. Markdown you paste into a cloud assistant leaves your machine too.

Quick tests after any change: markitdown --version, markitdown --list-plugins and docker image ls markitdown (the same in PowerShell).

MarkItDown or Docling?#

MarkItDownDocling
IdeaLight text extraction from many formatsLayout-aware conversion with OCR
Scanned PDFEmpty unless you add OCR plugin and a vision modelOCR is on by default (see our guide)
InstallSmall pip packages, no models, no serverModels to download; also a Docker API on port 5001
OutputMarkdownMarkdown, JSON, HTML, chunks
LicenceMITMIT

Choose MarkItDown for mixed folders of Office files, HTML and normal PDFs on a small machine. Choose Docling for scans, two-column papers and dense tables. We have no benchmark, so test both on your files. For PDF repair use Stirling-PDF; for JavaScript-heavy websites, Crawl4AI.

Using the Markdown for RAG#

RAG means giving an LLM the best passages from your own documents. Split the Markdown at headings and keep the source file name. This loop adds the name at the top of each file:

Run in terminalbash
cd ~/docker_volumes/markitdown
for f in in/*; do
  [ -f "$f" ] || continue
  { printf -- '---\nsource_file: %s\n---\n\n' "$(basename "$f")"; markitdown "$f"; } > "out/$(basename "$f").md"
done

Then index them with our Qdrant guide or RAGFlow.

Common mistakes#

MistakeWhy it happensDo this instead
markitdown file.pdf > out.md fails on WindowsConsole encoding cannot show a character (issue 1370)Use -o out.md
docker build for MCP says failed to read dockerfileYou built from the repo root (issue 2127)cd packages/markitdown-mcp, then build
A big PDF breaks in the AI appThe MCP tool returns all text at once; Claude Code's limit was 25,000 tokens (issue 1332, open)Convert with the CLI and -o, then chunk
Upgraded markitdown, MCP still crashesThe server is a separate package (issue 2146)Upgrade markitdown-mcp in the environment the AI app launches
VS Code installs an old MCP serverThe gallery pins [email protected] (issue 2581, open)Remove the version suffix in mcp.json
MCP says Field requiredThe call used params.input (issue 1362)Use params.arguments
Scanned PDF gives an empty fileNo text layer, and OCR is not built in (issue 1156)Check the file size; use Step 6 or Docling
OCR plugin installed, no OCR happensNo llm_client was passed, so OCR is skipped silentlyPass llm_client and llm_model in Python
AI assistants: docker pull mcr.microsoft.com/markitdown, a dashboard on port 8080, or a Compose stack with PostgresInvented. The project ships no image, UI or Compose fileBuild the image from the v0.1.9 tag
AI assistants: markitdown-mcp==0.1.9, or --llm-client on the CLIThe MCP package has its own version series; the OCR README shows a flag the CLI lacksPin markitdown-mcp==0.0.1a8; set the client in Python
AI assistants: result.text_content in new codeIt still works but is soft-deprecated in the sourceUse result.markdown

Tip: After pinning, run python -m pip show markitdown markitdown-mcp to confirm both versions.

Tip: Keep the original extension in the output name (report.pdf.md, as in the loops), so report.pdf and report.docx do not overwrite each other.

Troubleshooting#

ProblemSolution
Output file is 0 bytesProbably a scanned PDF. Try selecting text in a PDF viewer; if you cannot, use Step 6 or Docling
markitdown: command not foundThe virtual environment is not active. Run source .venv/bin/activate or .\.venv\Scripts\Activate.ps1
Permission denied writing to a mounted folderThe image runs as nobody. Add --user "$(id -u):$(id -g)"
Images vanish from the MarkdownLong data URIs are cut by default. Add --keep-data-uris

Exact error texts#

  • ERROR: failed to build: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory: wrong folder. Build the MCP image inside packages/markitdown-mcp.
  • E: Release file for http://deb.debian.org/debian-security/dists/bullseye-security/InRelease is expired: an old checkout. Use tag v0.1.9.
  • UnicodeEncodeError: 'charmap' codec can't encode character: use -o.
  • Host and port arguments are only valid when using streamable HTTP or SSE transport (see: --http).: add --http, or drop --host and --port.
  • MCP server process exited before completing the MCP initialize handshake with Input should be 'tools/call' [type=literal_error, input_value='server/discover': an old markitdown-mcp 0.0.1a4. A reporter confirmed 0.0.1a7 fixed it (issue 2365).
  • MCP tool "convert_to_markdown" response (51164 tokens) exceeds maximum allowed tokens (25000): one client's limit. Use the CLI.
  • PdfConverter threw ValueError with message: not enough values to unpack (expected 4, got 2): one analysis in issue 2071 traces it to a malformed box value inside the PDF. It is not always an image-only PDF.
  • Fetching the resource failed with HTTP status <n>., Could not fetch the resource., File conversion failed., Could not read the resource: <reason>.: the MCP tool's four messages. Check the address, mount and file rights.

Known bugs (open, November 2026)#

  • Issue 1156: scanned PDF gives empty output and exit code 0. Confirmed on 0.1.9.
  • Issue 1863 and issue 2343: OCR plugin returns only page markers for scans (reported on 0.1.0; not confirmed fixed in 0.1.2).
  • Issue 1870 and issue 2071: text lost after an inline image; a crash on a malformed PDF (May and June 2026 reports).
  • Issue 2565: OCR plugin glues columns together on pages with a picture. Issue 2440: no install on native Windows ARM64; the maintainer expects a fix with cryptography 51.

Updates and backups#

Test before you update. There is no database, but output can change.

  1. Save the current set: python -m pip freeze > requirements-before.txt.
  2. Install the new version in a second virtual environment and convert your test set.
  3. Compare with the old output (diff -u, or Compare-Object on Windows).
  4. Then change your pins. For Docker, clone the new tag and build markitdown:<new-version>. Keep the old image.

Read the release notes first; the 0.1.9 notes list no manual migration.

Back up in, out, your scripts, the pip freeze file and your MCP client config. .venv and src can be rebuilt. For off-site copies see our restic guide.

Linux#

Save as ~/docker_volumes/markitdown/backup.sh, then chmod +x it:

File contentbash
#!/usr/bin/env bash
set -euo pipefail
BASE="$HOME/docker_volumes/markitdown"
mkdir -p "$BASE/backups"
"$BASE/.venv/bin/python" -m pip freeze > "$BASE/requirements-lock.txt"
tar -czf "$BASE/backups/markitdown-$(date +%F).tar.gz" -C "$BASE" in out requirements-lock.txt

Run it at 03:00 with crontab -e:

File contenttext
0 3 * * * /bin/bash $HOME/docker_volumes/markitdown/backup.sh

Windows (PowerShell)#

Save as $HOME\docker_volumes\markitdown\backup.ps1:

Codepowershell
$Base = "$HOME\docker_volumes\markitdown"
New-Item -ItemType Directory -Force "$Base\backups" | Out-Null
& "$Base\.venv\Scripts\python.exe" -m pip freeze | Set-Content -Encoding UTF8 "$Base\requirements-lock.txt"
tar -czf "$Base\backups\markitdown-$(Get-Date -Format yyyy-MM-dd).tar.gz" -C $Base in out requirements-lock.txt

tar.exe ships with Windows 10 and 11. Schedule the script in Task Scheduler at 03:00 with the action powershell.exe -NoProfile -File "<path>\backup.ps1".

Mac (Terminal)#

Same script and cron line as Linux. Use absolute paths in cron.

Restore test. Unpack into a new empty folder, never over your working one:

Run in terminalbash
mkdir -p /tmp/markitdown-restore && tar -xzf ~/docker_volumes/markitdown/backups/markitdown-<date>.tar.gz -C /tmp/markitdown-restore
ls /tmp/markitdown-restore

You should see in, out and requirements-lock.txt.

Performance and resources#

Microsoft publishes no RAM, CPU, disk or file-size figures and no arm64 results. We give none.

One user measured a 400-page PDF in issue 1611: about 200 MiB peak on 0.1.4, about 2.7 GiB on 0.1.5 (it killed a 2 GB VM, exit code 137). The 0.1.6 release fixed it. It is one report, not a benchmark.

There is no worker setting or queue. Convert files one by one and measure your biggest file with docker stats. The knobs at v0.1.9:

KnobWhat it does
Pip extrasSkip heavy libraries you do not need
-x, -m, -cGive a file type or charset hint, mainly for standard input
--keep-data-urisOff by default, so outputs stay small

FAQ#

Why is my Markdown empty for a PDF? It is probably a scan. Stock MarkItDown reads the text layer only and exits with code 0. Use Step 6 or Docling.

Is it free for commercial use? Yes. MarkItDown, markitdown-mcp and markitdown-ocr are MIT. Azure is billed by Azure. PyMuPDF, which the OCR plugin needs, is AGPL-3.0 or paid.

Where is the official Docker image? None that we found. Build it from the v0.1.9 tag (Step 4).

Does it work offline? Local PDF, Office, HTML and CSV conversion does (--network none enforces it). Audio, URLs, YouTube, Azure and cloud models need the internet.

Why can MCP not find my file? Inside Docker it sees only mounted folders. Mount one at /workdir and use file:///workdir/<name>.

Sources#

Checked against the official docs on 2026-11-25.