AFFiNE MCP Server
Read, write and organise AFFiNE workspaces, docs, databases and comments from an MCP client
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
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs DOCLING_MCP_SERVICE_URL. Replace each <NAME> with your value.
claude mcp add docling -e DOCLING_MCP_SERVICE_URL=<DOCLING_MCP_SERVICE_URL> -- uvx --from=docling-mcp docling-mcp-server --transport stdio{
"mcpServers": {
"docling": {
"command": "uvx",
"args": [
"--from=docling-mcp",
"docling-mcp-server",
"--transport",
"stdio"
],
"env": {
"DOCLING_MCP_SERVICE_URL": "<DOCLING_MCP_SERVICE_URL>"
}
}
}
}{
"mcpServers": {
"docling": {
"command": "uvx",
"args": [
"--from=docling-mcp",
"docling-mcp-server",
"--transport",
"stdio"
],
"env": {
"DOCLING_MCP_SERVICE_URL": "<DOCLING_MCP_SERVICE_URL>"
}
}
}
}{
"servers": {
"docling": {
"type": "stdio",
"command": "uvx",
"args": [
"--from=docling-mcp",
"docling-mcp-server",
"--transport",
"stdio"
],
"env": {
"DOCLING_MCP_SERVICE_URL": "<DOCLING_MCP_SERVICE_URL>"
}
}
}
}[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 mcp add --scope user -e DOCLING_MCP_SERVICE_URL=<DOCLING_MCP_SERVICE_URL> docling uvx -- --from=docling-mcp docling-mcp-server --transport stdioDOCLING_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. |
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.
| Runtime | Python |
|---|
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.
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.
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.
convert_document_into_docling_documentconvert_directory_files_into_docling_documentcheck_document_in_local_cacheremove_document_from_local_cachelist_cached_documentscreate_new_docling_documentexport_docling_document_to_markdownsave_docling_documentget_page_thumbnailadd_title_to_docling_documentadd_section_heading_to_docling_documentadd_paragraph_to_docling_documentopen_list_in_docling_documentclose_list_in_docling_documentadd_list_items_to_list_in_docling_documentadd_table_in_html_format_to_docling_documentget_overview_of_document_anchorssearch_for_text_in_document_anchorsget_text_of_document_item_at_anchorupdate_text_of_document_item_at_anchordelete_document_items_at_anchors