Skip to content
Back to search

docling-mcp

Making docling agentic through MCP

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/docling-project/docling-mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/docling-project/docling-mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/docling-project--docling-mcp/badge.svg)](/listings/docling-project--docling-mcp)

HTML

<a href="/listings/docling-project--docling-mcp"><img src="/api/listings/docling-project--docling-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Remote Mode (Recommended - Lightweight)

For users with access to Docling Serve API:

> **Getting Docling Serve**: Visit [docling-serve](https://github.com/docling-project/docling-serve) for installation guides. You can deploy it from published container images or look for managed Docling SaaS offerings.

pip install docling-mcp

Then configure your environment:

export DOCLING_MCP_SERVICE_URL=https://your-docling-service.example.com
export DOCLING_MCP_SERVICE_API_KEY=your-api-key-here
export DOCLING_MCP_CONVERSION_MODE=remote

Local Mode (Full Features)

For users who need local conversion or don't have Docling Serve access:

pip install docling-mcp[local]

Then configure your environment:

export DOCLING_MCP_CONVERSION_MODE=local

Hybrid Mode (Best of Both)

Install with local support and enable automatic fallback:

pip install docling-mcp[local]

Configure for remote with fallback:

export DOCLING_MCP_SERVICE_URL=https://your-docling-service.example.com
export DOCLING_MCP_CONVERSION_MODE=remote
export DOCLING_MCP_FALLBACK_TO_LOCAL=true

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 304 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="center">
  2. <a href="https://github.com/docling-project/docling-mcp">
  3. <img loading="lazy" alt="Docling" src="https://github.com/docling-project/docling-mcp/raw/main/docs/assets/docling_mcp.png" width="40%"/>
  4. </a>
  5. </p>
  6. # Docling MCP: making docling agentic
  7. [![CI](https://github.com/docling-project/docling-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/docling-project/docling-mcp/actions/workflows/ci.yml)
  8. [![PyPI version](https://img.shields.io/pypi/v/docling-mcp)](https://pypi.org/project/docling-mcp/)
  9. [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/docling-mcp)](https://pypi.org/project/docling-mcp/)
  10. [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
  11. [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  12. [![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)
  13. [![prek](https://img.shields.io/badge/prek-enabled-brightgreen)](https://pypi.org/project/prek/)
  14. [![License MIT](https://img.shields.io/github/license/docling-project/docling-mcp)](https://opensource.org/licenses/MIT)
  15. [![PyPI Downloads](https://static.pepy.tech/badge/docling-mcp/month)](https://pepy.tech/projects/docling-mcp)
  16. [![LF AI & Data](https://img.shields.io/badge/LF%20AI%20%26%20Data-003778?logo=linuxfoundation&logoColor=fff&color=0094ff&labelColor=003778)](https://lfaidata.foundation/projects/)
  17. [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-green?logo=modelcontextprotocol)](https://registry.modelcontextprotocol.io)
  18. [![docling-mcp MCP server](https://glama.ai/mcp/servers/docling-project/docling-mcp/badges/score.svg)](https://glama.ai/mcp/servers/docling-project/docling-mcp)
  19. [![MCP Toplist](https://mcptoplist.com/badge/io.github.docling-project%2Fdocling-mcp.svg)](https://mcptoplist.com/server/io.github.docling-project%2Fdocling-mcp)
  20. A document processing service using the Docling-MCP library and MCP (Model Context Protocol) for tool integration.
  21. ## Overview
  22. [Docling](https://github.com/docling-project/docling) MCP is a service that provides tools for document conversion, processing and generation. It uses the Docling library to convert PDF documents into structured formats and provides a caching mechanism to improve performance. The service exposes functionality through a set of tools that can be called by client applications.
  23. ## Compatibility
  24. | docling-mcp | MCP Python SDK |
  25. |---|---|
  26. | `>=3.0.0` | `mcp>=2.0.0` |
  27. | `>=2.0.0,<3.0.0` | `mcp>=1.9.4,<2.0.0` |
  28. If your MCP client application has not yet migrated to MCP SDK v2, pin:
  29. ```bash
  30. pip install "docling-mcp<3.0.0"
  31. ```
  32. See [MIGRATION.md](MIGRATION.md) for the full migration guide.
  33. ## Installation Options
  34. ### Remote Mode (Recommended - Lightweight)
  35. For users with access to Docling Serve API:
  36. > **Getting Docling Serve**: Visit [docling-serve](https://github.com/docling-project/docling-serve) for installation guides. You can deploy it from published container images or look for managed Docling SaaS offerings.
  37. ```bash
  38. pip install docling-mcp
  39. ```
  40. Then configure your environment:
  41. ```bash
  42. export DOCLING_MCP_SERVICE_URL=https://your-docling-service.example.com
  43. export DOCLING_MCP_SERVICE_API_KEY=your-api-key-here
  44. export DOCLING_MCP_CONVERSION_MODE=remote
  45. ```
  46. ### Local Mode (Full Features)
  47. For users who need local conversion or don't have Docling Serve access:
  48. ```bash
  49. pip install docling-mcp[local]
  50. ```
  51. Then configure your environment:
  52. ```bash
  53. export DOCLING_MCP_CONVERSION_MODE=local
  54. ```
  55. ### Hybrid Mode (Best of Both)
  56. Install with local support and enable automatic fallback:
  57. ```bash
  58. pip install docling-mcp[local]
  59. ```
  60. Configure for remote with fallback:
  61. ```bash
  62. export DOCLING_MCP_SERVICE_URL=https://your-docling-service.example.com
  63. export DOCLING_MCP_CONVERSION_MODE=remote
  64. export DOCLING_MCP_FALLBACK_TO_LOCAL=true
  65. ```
  66. ## Features
  67. - Conversion tools:
  68. - PDF document conversion to structured JSON format ([DoclingDocument][docling_document])
  69. - Generation tools:
  70. - Document generation in DoclingDocument, which can be exported to multiple formats
  71. - Local document caching for improved performance
  72. - Support for local files and URLs as document sources
  73. - Memory management for handling large documents
  74. - Logging system for debugging and monitoring
  75. - RAG applications with Milvus upload and retrieval
  76. ## Configuration
  77. All settings use the `DOCLING_MCP_` prefix and can be supplied as environment
  78. variables, in a `.env` file in the working directory, or via the `env` block of
  79. your MCP client config. Copy [`.env.example`](.env.example) as a starting point.
  80. ### Conversion mode
  81. | Variable | Default | Description |
  82. |---|---|---|
  83. | `DOCLING_MCP_CONVERSION_MODE` | `remote` | `remote` or `local` |
  84. ### Remote service (required when `DOCLING_MCP_CONVERSION_MODE=remote`)
  85. | Variable | Default | Description |
  86. |---|---|---|
  87. | `DOCLING_MCP_SERVICE_URL` | — | URL of the Docling Serve instance |
  88. | `DOCLING_MCP_SERVICE_API_KEY` | — | API key for the service |
  89. | `DOCLING_MCP_SERVICE_TIMEOUT` | `300.0` | Timeout in seconds for a whole conversion job |
  90. | `DOCLING_MCP_SERVICE_MAX_RETRIES` | `3` | Max retry attempts |
  91. | `DOCLING_MCP_FALLBACK_TO_LOCAL` | `false` | Fall back to local if service is unreachable (requires `docling-mcp[local]`) |
  92. ### Conversion pipeline (applies to both modes)
  93. | Variable | Default | Description |
  94. |---|---|---|
  95. | `DOCLING_MCP_KEEP_IMAGES` | `false` | Retain page images in output |
  96. | `DOCLING_MCP_IMAGES_SCALE` | `1.0` | Image scale factor (increase to avoid tensor padding errors) |
  97. | `DOCLING_MCP_DO_OCR` | `true` | Run OCR pipeline |
  98. | `DOCLING_MCP_OCR_ENGINE` | `auto` | OCR engine by its docling engine kind: `auto`, `easyocr`, `tesseract` (system binary), `tesserocr` (Python bindings), `ocrmac`, `rapidocr`. The engine must be installed on the conversion backend. In remote mode it is sent as the Docling Serve `ocr_preset`, so server-defined preset names also work there |
  99. | `DOCLING_MCP_OCR_LANG` | — | Comma-separated OCR languages, passed to the engine unchanged. `iso:en,iso:de` works with any engine (docling ≥ 2.127, recommended with `auto`); bare codes are engine-specific (`eng` for Tesseract, `en` for EasyOCR or Docling Serve). Unset means the engine's defaults |
  100. | `DOCLING_MCP_DO_TABLE_STRUCTURE` | `true` | Detect table structure |
  101. | `DOCLING_MCP_DO_PICTURE_DESCRIPTION` | `false` | Run a vision-language model to generate textual descriptions for figures and pictures |
  102. | `DOCLING_MCP_PICTURE_DESCRIPTION_PRESET` | — | Preset ID for the picture-description VLM (e.g. `smolvlm`, `granite_vision`). When unset the backend default is used. Only applies when `DOCLING_MCP_DO_PICTURE_DESCRIPTION=true` |
  103. > [!TIP]
  104. > Enabling `DOCLING_MCP_DO_PICTURE_DESCRIPTION=true` adds a VLM inference step for every figure in the document. On resource-constrained hardware (e.g. a laptop running the model on CPU) this can significantly increase conversion time.
  105. >
  106. > - **Remote mode** — increase `DOCLING_MCP_SERVICE_TIMEOUT` (in seconds) to give the remote service enough time to complete. The default is `300.0` (5 minutes).
  107. > - **Local mode / MCP client timeout** — the MCP client itself may also enforce a request timeout. For example, in LM Studio set the `timeout` field (in milliseconds) in your `mcp.json`:
  108. >
  109. > ```json
  110. > {
  111. > "mcpServers": {
  112. > "docling": {
  113. > "url": "http://localhost:8000/mcp",
  114. > "timeout": 300000
  115. > }
  116. > }
  117. > }
  118. > ```
  119. ### Markdown export
  120. | Variable | Default | Description |
  121. |---|---|---|
  122. | `DOCLING_MCP_IMAGE_EXPORT_MODE` | `placeholder` | How images are rendered in Markdown output: `placeholder` (emits `<!-- image -->`), `embedded` (base64 data-URI), `referenced` (file path / URL) |
  123. ### Cache
  124. | Variable | Default | Description |
  125. |---|---|---|
  126. | `DOCLING_MCP_CACHE_MAX_DOCUMENTS` | `10` | Maximum number of documents to keep in the in-memory cache. When the limit is reached the least-recently-used document is evicted. |
  127. ### LlamaIndex RAG (`--tools llama-index-rag`)
  128. | Variable | Default | Description |
  129. |---|---|---|
  130. | `DOCLING_MCP_LI_API_BASE` | `http://127.0.0.1:1234/v1` | OpenAI-compatible LLM endpoint |
  131. | `DOCLING_MCP_LI_API_KEY` | `none` | API key for the LLM endpoint |
  132. | `DOCLING_MCP_LI_MODEL_ID` | `ibm/granite-3.2-8b` | LLM model identifier |
  133. | `DOCLING_MCP_LI_EMBEDDING_MODEL` | `BAAI/bge-base-en-v1.5` | HuggingFace embedding model |
  134. ### LlamaStack (`--tools llama-stack-rag` / `--tools llama-stack-ie`)
  135. | Variable | Default | Description |
  136. |---|---|---|
  137. | `DOCLING_MCP_LLS_URL` | `http://localhost:8321` | LlamaStack server URL |
  138. | `DOCLING_MCP_LLS_VDB_EMBEDDING` | `all-MiniLM-L6-v2` | Embedding model for vector DB |
  139. | `DOCLING_MCP_LLS_EXTRACTION_MODEL` | `openai/gpt-oss-20b` | Model used for structured extraction |
  140. ### Setting variables in an MCP client config
  141. ```json
  142. {
  143. "mcpServers": {
  144. "docling": {
  145. "command": "uvx",
  146. "args": [
  147. "--from=docling-mcp",
  148. "docling-mcp-server"
  149. ],
  150. "env": {
  151. "DOCLING_MCP_CONVERSION_MODE": "remote",
  152. "DOCLING_MCP_SERVICE_URL": "https://your-docling-service.example.com",
  153. "DOCLING_MCP_SERVICE_API_KEY": "your-api-key-here"
  154. }
  155. }
  156. }
  157. }
  158. ```
  159. ## Getting started
  160. The easiest way to install Docling MCP and connect it to your client is by launching it via [uvx](https://docs.astral.sh/uv/).
  161. Depending on the transfer protocol required, specify the argument `--transport`, for example
  162. - **`stdio`** used e.g. in Claude for Desktop and LM Studio
  163. ```sh
  164. uvx --from docling-mcp docling-mcp-server --transport stdio
  165. ```
  166. - **`sse`** used e.g. in Llama Stack
  167. ```sh
  168. uvx --from docling-mcp docling-mcp-server --transport sse
  169. ```
  170. - **`streamable-http`** used e.g. in containers setup
  171. ```sh
  172. uvx --from docling-mcp docling-mcp-server --transport streamable-http
  173. ```
  174. More options are available, e.g. the selection of which toolgroup to launch. Use the `--help` argument to inspect all the CLI options.
  175. For developing the MCP tools further, please refer to the [Developing](CONTRIBUTING.md#developing) section of CONTRIBUTING.md for instructions.
  176. ## Integration with MCP clients
  177. One of the easiest ways to experiment with the tools provided by Docling MCP is to leverage an AI desktop client with MCP support.
  178. Most of these clients use a common config interface. Adding Docling MCP in your favorite client is usually as simple as adding the following entry in the configuration file.
  179. ```json
  180. {
  181. "mcpServers": {
  182. "docling": {
  183. "command": "uvx",
  184. "args": [
  185. "--from=docling-mcp",
  186. "docling-mcp-server"
  187. ]
  188. }
  189. }
  190. }
  191. ```
  192. When using **[Claude for Desktop](https://claude.ai/download)**, simply edit the config file `claude_desktop_config.json` with the snippet above or the example provided [here](docs/integrations/claude_desktop_config.json).
  193. In **[LM Studio](https://lmstudio.ai/)**, edit the `mcp.json` file with the appropriate section or simply click on the button below for a direct install.
  194. [![Add MCP Server docling to LM Studio](https://files.lmstudio.ai/deeplink/mcp-install-light.svg)](https://lmstudio.ai/install-mcp?name=docling&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb209ZG9jbGluZy1tY3AiLCJkb2NsaW5nLW1jcC1zZXJ2ZXIiXX0%3D)
  195. Other integrations are described in the [integrations] page.
  196. ## Examples
  197. ### Converting documents
  198. Example of prompt for converting PDF documents:
  199. ```prompt
  200. Convert the PDF document at <provide file-path> into DoclingDocument and return its document-key.
  201. ```
  202. ### Generating documents
  203. Example of prompt for generating new documents:
  204. ```prompt
  205. I want you to write a Docling document. To do this, you will create a document first by invoking `create_new_docling_document`. Next you can add a title (by invoking `add_title_to_docling_document`) and then iteratively add new section-headings and paragraphs. If you want to insert lists (or nested lists), you will first open a list (by invoking `open_list_in_docling_document`), next add the list_items (by invoking `add_list_items_to_list_in_docling_document`). After adding list-items, you must close the list (by invoking `close_list_in_docling_document`). Nested lists can be created in the same way, by opening and closing additional lists.
  206. During the writing process, you can check what has been written already by calling the `export_docling_document_to_markdown` tool, which will return the currently written document. At the end of the writing, you must save the document and return me the filepath of the saved document.
  207. The document should investigate the impact of tokenizers on the quality of LLMs.
  208. ```
  209. ## Contributing
  210. We welcome external contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get started.
  211. ## License
  212. The Docling MCP codebase is under MIT license. For individual model usage, please refer to the model licenses found in the original packages.
  213. ## LF AI & Data
  214. Docling and Docling MCP is hosted as a project in the [LF AI & Data Foundation](https://lfaidata.foundation/projects/).
  215. **IBM ❤️ Open Source AI**: The project was started by the AI for knowledge team at IBM Research Zurich.
  216. [docling_document]: https://docling-project.github.io/docling/concepts/docling_document/
  217. [integrations]: https://docling-project.github.io/docling-mcp/integrations/
  218. <!-- MCP registry ownership marker (proves this PyPI package maps to the server name). -->
  219. <!-- mcp-name: io.github.docling-project/docling-mcp -->

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.