Auto-compress PDFs and screenshots to Markdown before they hit Claude Code's context — 5-10x fewer tokens
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"mdshrink-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# mdshrink > Auto-compress PDFs and screenshots to Markdown before they hit Claude Code's context. 5-10x fewer tokens, fully local, one-line install. [](https://pypi.org/project/mdshrink-mcp) [](https://pypi.org/project/mdshrink-mcp) [](LICENSE) [](https://github.com/Manish3451/mdshrink/actions) ## What is mdshrink? mdshrink is an MCP server that automatically converts PDFs and screenshots to compact Markdown **before** they hit Claude Code's context window. It preserves semantic content while reducing token usage by 5-10x. ### Why? When you attach a PDF or screenshot in Claude Code: - A typical 20-page PDF consumes **25k-40k tokens** - A single screenshot consumes **1.5k-3k tokens** per image Most of those tokens are visual redundancy - fonts, layout, whitespace - that the model doesn't need. mdshrink extracts the semantic content and discards the bloat. ## Installation ```bash pip install mdshrink-mcp claude mcp add mdshrink -- mdshrink ``` Restart Claude Code. That's it. ## Usage Once installed, Claude Code will automatically call mdshrink tools before reading PDF or image files: - **`compress_pdf`** - Converts PDFs to compact Markdown - **`compress_image`** - OCR extracts text from screenshots - **`get_compressed`** - Cache lookup (fast check) Each conversion reports: - `original_tokens` - Estimated tokens for native file - `compressed_tokens` - Actual tokens in Markdown - `ratio` - Compression ratio (e.g., "5.2x") ## What It Compresses Well | Type | Compression | Notes | |------|-------------|-------| | Text-native PDFs | 5-10x | API specs, RFCs, papers, contracts | | Screenshots of text | 3-5x | Code, error messages, docs, terminal | | Scanned docs | Varies |…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.