跳到正文
Skillpedia
✓ 官方 · Docling project (IBM Research Zurich)● 免费开源💻 本地🔓 无需 API 密钥数据与数据库

Docling MCP

让你的智能体把 PDF 和其他文档转换为结构化格式,并使用 Docling 生成新文档。

784 GitHub 星标作者 Docling project (IBM Research Zurich)许可证 MIT更新于 19天前

如何安装

这个 MCP 是本地的:在你的电脑上运行。

适用于电脑上安装的应用(Claude Desktop、Claude Code、Cursor、VS Code 等)。选择你的应用:

粘贴到终端:

claude mcp add docling -- uvx --from docling-mcp==3.5.0 docling-mcp-server --transport stdio docling-mcp

需要填写的内容

名称用途必填
DOCLING_MCP_CONVERSION_MODEConversion mode: 'remote' (default) or 'local' (requires docling-mcp[local] extra).否
DOCLING_MCP_SERVICE_URLBase URL of the Docling Serve instance. Required when conversion mode is remote.否
DOCLING_MCP_SERVICE_API_KEYAPI key for authenticating with Docling Serve.否
DOCLING_MCP_SERVICE_TIMEOUTRequest timeout in seconds for the remote Docling Serve API. Default: 300.0.否
DOCLING_MCP_SERVICE_MAX_RETRIESMaximum number of retry attempts for remote API requests. Default: 3.否
DOCLING_MCP_FALLBACK_TO_LOCALSet to 'true' to fall back to local conversion when Docling Serve is unreachable.否
DOCLING_MCP_KEEP_IMAGESSet to 'true' to retain page images in converted documents. Default: false.否
DOCLING_MCP_IMAGES_SCALEImage scale factor (e.g. 1.0, 2.0). Increase to avoid tensor batching errors. Default: 1.0.否
DOCLING_MCP_DO_OCRSet to 'false' to disable the OCR pipeline. Default: true.否
DOCLING_MCP_OCR_ENGINEOCR engine kind: 'auto' (default), 'easyocr', 'tesseract', 'tesserocr', 'ocrmac', 'rapidocr'. Must be installed on the conversion backend.否
DOCLING_MCP_OCR_LANGComma-separated OCR languages (e.g. 'iso:en,iso:de' or 'eng,deu'). When unset the engine's default languages apply.否
DOCLING_MCP_DO_TABLE_STRUCTURESet to 'false' to disable table structure detection. Default: true.否
DOCLING_MCP_DO_PICTURE_DESCRIPTIONSet to 'true' to run a vision-language model to generate textual descriptions for figures and pictures. Requires a VLM to be available on the conversion backend. Default: false.否
DOCLING_MCP_PICTURE_DESCRIPTION_PRESETPreset 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.否
DOCLING_MCP_IMAGE_EXPORT_MODEControls how images are rendered when exporting to Markdown. Accepted values: 'placeholder' (default, emits <!-- image -->), 'embedded' (base64 data-URI), 'referenced' (file path / URL).否
DOCLING_MCP_CACHE_MAX_DOCUMENTSMaximum number of documents to keep in the in-memory cache. Oldest (least-recently-used) documents are evicted when the limit is reached. Default: 10.否

好了!现在试试

重启应用,把下面任意一条请求粘贴到聊天里:

将 C:/reports/q3.pdf 中的 PDF 转换为 Docling 文档,并返回其文档键。
写一份关于分词器的新文档,包含标题、小标题和列表,然后保存。

简介

这个服务器把你的智能体连接到 Docling,一个文档处理库。智能体可以把 PDF 文件或网址转换为结构化文档,把它导出为 Markdown 等格式,并逐段构建新文档。它可以使用远程的 Docling Serve 服务,也可以在本地运行转换。

它能做什么

  • 将 PDF(文件或网址)转换为结构化的 DoclingDocument
  • create_new_docling_document:新建文档
  • add_title_to_docling_document:添加标题
  • open_list_in_docling_document 和 close_list_in_docling_document:构建列表
  • export_docling_document_to_markdown:导出已写好的内容
  • 使用 Milvus 上传和获取文档,用于 RAG

什么时候用

  • ›当你希望把一份 PDF 转换为智能体可以阅读的结构化文本时
  • ›当你希望智能体撰写文档并保存时
  • ›当你在构建文档搜索,并需要先转换文档时

你需要准备

Python。对于远程模式,需要 Docling Serve 的网址和 API 密钥。对于本地模式,需要安装 docling-mcp[local]。

搭配的技能

⭐ Skillpedia MCP · 免费你的智能体自己找到合适的技能安装我们的 MCP,智能体需要时会在 15,000+ 个技能中搜索。免费安装 →

常见问题

它免费且开源吗?

代码采用 MIT 许可证。底层软件包的模型许可证是单独的。

我需要 Docling Serve 服务吗?

不需要。远程模式使用它,但本地模式(docling-mcp[local])在你的电脑上转换。

它能回退到本地转换吗?

可以。安装本地版本后,设置 DOCLING_MCP_FALLBACK_TO_LOCAL=true。

它支持 OCR 吗?

支持。OCR 默认开启,如果安装了 easyocr 或 tesseract 等引擎,你可以选择它们。

它支持哪些传输方式?

stdio、sse 和 streamable-http。

我应该固定哪个版本?

3.0.0 或更新版本需要 MCP SDK v2。如果你的客户端还没有升级到 v2,请固定为 docling-mcp<3.0.0。

如果不能用

  • ›使用 uvx --from docling-mcp docling-mcp-server 运行,并确认已安装 uv。
  • ›在远程模式下,请检查 DOCLING_MCP_SERVICE_URL 和 DOCLING_MCP_SERVICE_API_KEY。
  • ›如果图片描述很慢,请提高 DOCLING_MCP_SERVICE_TIMEOUT 或你客户端的超时时间。

每周 5 个新技能,1 分钟读完。