← All prompt collections
The full post, ready to copy
Stop Burning Tokens on PDFs: MarkItDown Setup for Claude
Slide 1
When you give Claude a PDF, every page is read twice: as text and as a picture of the page. Anthropic's own figures are 1,500 to 3,000 tokens of text per page, plus up to 1,568 for the page image. For 20 pages that is roughly 61,000 to 91,000 tokens.
MarkItDown is a free tool from Microsoft that turns the file into clean Markdown text first. Claude then reads only the text, so the page images are gone and tables arrive as real tables.
It works on PDF, Word, Excel, PowerPoint, HTML, CSV and more.
Repo: github.com/microsoft/markitdown
Slide 2
You need Python 3.10 to 3.14. In your terminal:
pip install 'markitdown[all]'
No terminal experience? Paste this into Claude Code and let it do the install:
Install Microsoft's markitdown with all optional formats, then convert a test PDF to check it works.
Slide 3
markitdown report.pdf -o report.md
Then give Claude report.md instead of the PDF. This works everywhere, including the normal Claude chat: just upload the .md file.
Same command for other formats:
markitdown slides.pptx -o slides.md
markitdown budget.xlsx -o budget.md
markitdown contract.docx -o contract.md
Slide 4
pip install markitdown-mcp
claude mcp add markitdown -- markitdown-mcp
Restart Claude Code and type /mcp to check that markitdown is listed. It gives Claude one tool, convert_to_markdown, which accepts a file path or a web link.
Slide 5
Open Settings > Developer > Edit Config and add this to claude_desktop_config.json, then restart the app:
{
"mcpServers": {
"markitdown": {
"command": "markitdown-mcp"
}
}
}
If Claude can't find the command, replace markitdown-mcp with the full path your terminal prints for: which markitdown-mcp
Microsoft's own guide recommends running it in Docker instead. The steps are in the repo under packages/markitdown-mcp.
Slide 6
Add this line to your CLAUDE.md (Claude Code) or your project instructions (desktop app):
Before reading any PDF, Word, Excel or PowerPoint file, convert it to Markdown with the markitdown tool and read the Markdown instead of the original.
Now you only have to point Claude at a file:
Summarise ~/Documents/report.pdf in 10 bullets.
Slide 7
- Give Claude the file's location or a link. A file you drag into the chat window goes straight to Claude and skips MarkItDown, so convert it first (Step 2) and upload the .md.
- Scanned PDFs are just pictures, so there is no text to pull out. They need the optional markitdown-ocr add-on, which uses an AI model and costs tokens of its own.
- Charts and photos don't come through as text. If the meaning is in the images, send the original PDF.
- Always skim the Markdown for big tables before you trust it.
- Microsoft says the MCP server is meant for local use on your own computer.
Slide 8
Ask Claude Code:
Convert ~/Documents/report.pdf with markitdown, then tell me roughly how many tokens the Markdown is compared with the 1,500 to 3,000 text tokens plus up to 1,568 image tokens per page that the original PDF would cost.