pymupdf4llm-mcp is a Model Context Protocol (MCP) server built on top of pymupdf4llm. It exposes a single, powerful tool —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pymupdf/pymupdf4llm-mcp/llms.txt
Use this file to discover all available pages before exploring further.
convert_pdf_to_markdown — that LLM clients can call to extract structured Markdown (including images) from any PDF file. Launch it in seconds with uvx, or run it as a persistent SSE server or Docker container.
Introduction
Learn what pymupdf4llm-mcp is, how it works, and when to use it.
Quickstart
Install and connect to your MCP client in under 5 minutes.
Tool Reference
Full parameter and response documentation for the MCP tool.
Deployment
Run as stdio, SSE server, or Docker container.
How It Works
pymupdf4llm-mcp wraps thepymupdf4llm.to_markdown() function and exposes it as an MCP tool. When an LLM client calls the tool, the server:
Converts to Markdown
pymupdf4llm processes the PDF, extracting text with layout-aware formatting and converting tables, headings, and code blocks into Markdown.Extracts images
Embedded images are written to a configurable directory alongside the Markdown output.
Key Features
Zero-install launch
Run instantly with
uvx pymupdf4llm-mcp@latest stdio — no virtual environment setup required.Two transport modes
Choose
stdio for local LLM clients or sse for networked, persistent server deployments.Image extraction
Embedded PDF images are automatically saved to disk and referenced in the Markdown output.
Large PDF handling
Use
save_path to write output to a file for large PDFs, avoiding response size limits.