Docling MCP
An MCP server built on Docling: converts PDFs into structured documents, builds new ones and feeds them to RAG
Install
{
"mcpServers": {
"docling": {
"command": "uvx",
"args": [
"--from=docling-mcp",
"docling-mcp-server"
]
}
}
}For Claude Desktop, LM Studio and other clients. Set mode and service URL in the env block.
This is third-party code. Review the repository files before installing.
What it does
The server exposes Docling library tools to an agent. It converts a PDF from a local file or URL into a structured DoclingDocument with tables and OCR, and caches the result. The agent can build a new document step by step with headings, paragraphs and nested lists, then export it to Markdown. Separate tool groups push documents into Milvus, LlamaIndex or LlamaStack for RAG and extraction. Conversion runs locally or through a Docling Serve service.
Who it is for. For analysts and developers whose agent needs to read PDFs and other documents in structured form.
Good fit when
- You need text, headings and tables out of a PDF without losing structure
- You need to assemble a report and save it as Markdown
- You need to load documents into a vector store for RAG
Not a fit when
- The agent's built-in PDF reading is enough
- You have neither a Docling Serve instance nor resources for local recognition models
Example request
Convert the PDF at ~/docs/report.pdf into a DoclingDocument and print its tables as MarkdownLimitations
By default the server runs in remote mode and needs a Docling Serve URL and key. Local conversion requires docling-mcp[local], which downloads models and uses noticeable resources. Versions 3.x need MCP SDK v2; older clients should pin docling-mcp<3.0.0. Local mode needs no external services.
How to disable. Remove the docling block from your MCP client config and, if needed, run pip uninstall docling-mcp.
MCP
- Transport
- stdio, sse, http
- Authentication
- not required
| Environment variables | |
|---|---|
| DOCLING_MCP_CONVERSION_MODE | remote (default) or local |
| DOCLING_MCP_SERVICE_URL | Docling Serve URL, required in remote mode |
| DOCLING_MCP_SERVICE_API_KEY secret | Docling Serve API key |
| DOCLING_MCP_FALLBACK_TO_LOCAL | true enables local fallback when the service is unreachable |
Security check
- Reads local files and downloads documents from URLs
- In remote mode sends documents to a Docling Serve service
README in short
The README describes three setups: remote Docling Serve, fully local and hybrid. All settings use DOCLING_MCP_ variables, with tables for conversion, Markdown export and RAG via LlamaIndex and LlamaStack. It runs through uvx with a transport flag and ships configs for Claude Desktop and LM Studio. Started at IBM Research, hosted by LF AI and Data, MIT licensed.
FAQ
How do remote and local modes differ?
In remote mode Docling Serve does the conversion and the install is light. In local mode everything runs on your machine and needs the local extra. Hybrid mode falls back to local when the service is down.
Which transports are supported?
stdio, sse and streamable-http, chosen with the --transport flag.
Related
Microsoft's utility and MCP server that turn PDF, Word, Excel, PowerPoint, HTML and other files into Markdown for models
Anthropic skills
Skills
Anthropic's official skill examples: docx, pdf, pptx and xlsx documents, design, MCP builder and the Agent Skills spec
Anthropic's legal plugin suite: contracts, privacy, employment, IP, litigation, AI governance and legal education
A skill that builds editable PPTX decks from PDF, DOCX, URLs and Markdown with native shapes, charts and animations