Docling MCP

Turns PDFs, Office files and web pages into structured Docling documents, and builds or edits them

Official · Docling Project Python Local · stdio ProductivityAI and ML

43 popularity score ★ 787

Connect your client

Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs DOCLING_MCP_SERVICE_URL. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add docling -e DOCLING_MCP_SERVICE_URL=<DOCLING_MCP_SERVICE_URL> -- uvx --from=docling-mcp docling-mcp-server --transport stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "docling": {
      "command": "uvx",
      "args": [
        "--from=docling-mcp",
        "docling-mcp-server",
        "--transport",
        "stdio"
      ],
      "env": {
        "DOCLING_MCP_SERVICE_URL": "<DOCLING_MCP_SERVICE_URL>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "docling": {
      "command": "uvx",
      "args": [
        "--from=docling-mcp",
        "docling-mcp-server",
        "--transport",
        "stdio"
      ],
      "env": {
        "DOCLING_MCP_SERVICE_URL": "<DOCLING_MCP_SERVICE_URL>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "docling": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--from=docling-mcp",
        "docling-mcp-server",
        "--transport",
        "stdio"
      ],
      "env": {
        "DOCLING_MCP_SERVICE_URL": "<DOCLING_MCP_SERVICE_URL>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.docling]
command = "uvx"
args = ["--from=docling-mcp", "docling-mcp-server", "--transport", "stdio"]

[mcp_servers.docling.env]
DOCLING_MCP_SERVICE_URL = "<DOCLING_MCP_SERVICE_URL>"
Gemini CLITerminal
gemini mcp add --scope user -e DOCLING_MCP_SERVICE_URL=<DOCLING_MCP_SERVICE_URL> docling uvx -- --from=docling-mcp docling-mcp-server --transport stdio

Settings 10

DOCLING_MCP_SERVICE_URL Required: URL of the Docling Serve instance that does the parsing in remote mode, the default; not needed with DOCLING_MCP_CONVERSION_MODE=local.
DOCLING_MCP_SERVICE_API_KEY Optional: API key for the Docling Serve instance, if it asks for one.
DOCLING_MCP_CONVERSION_MODE Optional: remote (default) or local; local needs the docling-mcp[local] install.
DOCLING_MCP_FALLBACK_TO_LOCAL Optional: Switch to local parsing when the remote service is unreachable; false by default, needs docling-mcp[local].
DOCLING_MCP_SERVICE_TIMEOUT Optional: Seconds allowed for one remote conversion job; 300 by default.
DOCLING_MCP_DO_OCR Optional: Run OCR; true by default.
DOCLING_MCP_DO_TABLE_STRUCTURE Optional: Detect table structure; true by default.
DOCLING_MCP_DO_PICTURE_DESCRIPTION Optional: Describe figures with a vision-language model; false by default and slow on CPU.
DOCLING_MCP_IMAGE_EXPORT_MODE Optional: How images appear in Markdown: placeholder (default), embedded or referenced.
DOCLING_MCP_CACHE_MAX_DOCUMENTS Optional: Documents kept in the in-memory cache; 10 by default.

What it does

Docling MCP puts the Docling document parser behind MCP tools. Hand it a local path or a URL and it parses the file (PDF, DOCX, HTML, images and the other formats Docling reads) into a DoclingDocument, keeps that document in an in-memory cache and returns a key. Later calls use the key to export Markdown, render a page thumbnail, search the text, or rewrite and delete individual items.

The same server can also write documents from scratch: an assistant creates an empty document, then adds a title, section headings, paragraphs, nested lists and HTML tables step by step, and finally saves it as Markdown and JSON.

Parsing happens in one of two places. In remote mode, the default, files go to a Docling Serve instance you point it at. In local mode, Docling runs on your own machine, which needs the larger docling-mcp[local] install. A fallback setting lets remote mode switch to local when the service cannot be reached.

By default it loads three tool groups: conversion, generation and manipulation, 21 tools in all (counted in the v3.3.0 source). Three more groups can be turned on with --tools: llama-index-rag (Milvus indexing and retrieval through LlamaIndex), llama-stack-rag and llama-stack-ie (LlamaStack retrieval and structured extraction). The project sits under the LF AI & Data Foundation and was started at IBM Research Zurich.

What it needs

RuntimePython

uv (for uvx) and Python. For remote mode, the default: a running Docling Serve instance, set with DOCLING_MCP_SERVICE_URL, plus its API key if it has one. For local mode: install docling-mcp[local] and set DOCLING_MCP_CONVERSION_MODE=local; Docling then runs its models on your machine. The optional RAG groups need their extras (llama-index-rag, llama-stack) and an LLM endpoint or LlamaStack server.

Limits

v3.3.0 starts on streamable-http at localhost:8000 unless --transport stdio is given (servers/mcp_server.py), so the README's client config, which has no --transport, does not speak stdio; the command here adds it. In remote mode with no DOCLING_MCP_SERVICE_URL and no fallback, the conversion tools fail; generation and manipulation still work. The directory tool converts only files directly in the folder, not subfolders, and skips files that fail. The cache keeps 10 documents by default (DOCLING_MCP_CACHE_MAX_DOCUMENTS), dropping the least recently used. Version 3 needs MCP SDK v2 clients; the README says to pin docling-mcp<3.0.0 otherwise.

Who it suits

Suits developers who want an assistant to read real documents, such as scanned PDFs, tables and slides, as structure rather than raw text, and who either have a Docling Serve instance or are willing to run Docling locally with the heavier install. Local mode keeps files on your own machine; remote mode sends them to whichever service you set. It also suits workflows where the assistant drafts a report and saves it as Markdown and JSON. For a quick text dump of a single file, a simpler file reader is lighter than running Docling's models.

Tools 21

convert_document_into_docling_document
Parses a file path or URL into a cached Docling document and returns its key
convert_directory_files_into_docling_document
Parses every file directly inside a local folder into cached documents
check_document_in_local_cache
Checks whether a document key is in the cache
remove_document_from_local_cache
Removes one document from the cache
list_cached_documents
Lists the keys of all cached documents
create_new_docling_document
Starts a new empty document and returns its key
export_docling_document_to_markdown
Returns a cached document as Markdown, optionally cut to a maximum size
save_docling_document
Writes a cached document to Markdown and JSON files in the cache folder
get_page_thumbnail
Renders one page of a document as a PNG image
add_title_to_docling_document
Adds or replaces the document title
add_section_heading_to_docling_document
Adds a section heading at a given level
add_paragraph_to_docling_document
Adds a paragraph of text
open_list_in_docling_document
Opens a new list, nested if one is already open
close_list_in_docling_document
Closes the list that is currently open
add_list_items_to_list_in_docling_document
Adds items to the open list
add_table_in_html_format_to_docling_document
Adds a table given as HTML
get_overview_of_document_anchors
Shows the document's structure with an anchor for each item
search_for_text_in_document_anchors
Finds items whose text matches given keywords
get_text_of_document_item_at_anchor
Returns the text of the item at an anchor
update_text_of_document_item_at_anchor
Replaces the text of the item at an anchor
delete_document_items_at_anchors
Deletes the items at the given anchors

Similar servers