An MCP server for document processing with Docling, including PDF-to-structured-JSON conversion, document generation, and caching. It can run against a remote Docling service or locally, and supports document sources from files and URLs.
From the registry: Convert PDFs and other documents to structured formats via Docling, for AI applications.
$ pip install uvhttps://docs.astral.sh/uv/$ pip install "docling-mcp[local]"Please install the `docling-mcp` MCP server into my current AI client (that's you).
Optional prerequisites:
- Install uv — Install Astral's uv tool to run the server via uvx, which the README recommends as the easiest launch method. Run: `pip install uv` (https://docs.astral.sh/uv/)
- Install Docling Serve or obtain access to a Docling Serve instance (remote mode) — Required only if using the recommended remote conversion mode. You need a reachable Docling Serve URL and, if configured, an API key. (https://github.com/docling-project/docling-serve)
- Install local conversion dependencies (local or hybrid mode) — If you need local conversion or remote fallback to local, install the local extras for docling-mcp instead of the base package. Run: `pip install "docling-mcp[local]"`
Canonical MCP server config (stdio transport):
- command: `uvx`
- args: ["--from=docling-mcp","docling-mcp-server","--transport","stdio"]
- required environment variables:
- `DOCLING_MCP_CONVERSION_MODE`: Conversion mode: set to remote or local. In the default/recommended setup, remote mode is used. (example: `remote`)
- `DOCLING_MCP_SERVICE_URL`: URL of the Docling Serve instance. Required when DOCLING_MCP_CONVERSION_MODE=remote. (example: `<your-docling-service-url>`)
- optional environment variables:
- `DOCLING_MCP_SERVICE_API_KEY`: API key for the Docling Serve service. Required if your remote service requires authentication. (example: `<your-api-key>`)
- `DOCLING_MCP_SERVICE_TIMEOUT`: Request timeout in seconds for the remote service. (example: `<timeout-seconds>`)
- `DOCLING_MCP_SERVICE_MAX_RETRIES`: Maximum retry attempts for remote service requests. (example: `<max-retries>`)
- `DOCLING_MCP_FALLBACK_TO_LOCAL`: Fall back to local conversion if the remote service is unreachable. Requires local extras to be installed. (example: `true`)
- `DOCLING_MCP_KEEP_IMAGES`: Retain page images in output. (example: `false`)
- `DOCLING_MCP_IMAGES_SCALE`: Image scale factor; increase to avoid tensor padding errors. (example: `<image-scale>`)
- `DOCLING_MCP_DO_OCR`: Whether to run the OCR pipeline. (example: `true`)
- `DOCLING_MCP_DO_TABLE_STRUCTURE`: Whether to detect table structure. (example: `true`)
- `DOCLING_MCP_LI_API_BASE`: OpenAI-compatible LLM endpoint for the llama-index-rag tool group. (example: `<your-llm-api-base>`)
- `DOCLING_MCP_LI_API_KEY`: API key for the LLM endpoint used by the llama-index-rag tool group. (example: `<your-llm-api-key>`)
- `DOCLING_MCP_LI_MODEL_ID`: LLM model identifier for the llama-index-rag tool group. (example: `<your-llm-model-id>`)
- `DOCLING_MCP_LI_EMBEDDING_MODEL`: HuggingFace embedding model for the llama-index-rag tool group. (example: `<your-embedding-model>`)
- `DOCLING_MCP_LLS_URL`: LlamaStack server URL for the llama-stack-rag or llama-stack-ie tool groups. (example: `<your-llamastack-url>`)
- `DOCLING_MCP_LLS_VDB_EMBEDDING`: Embedding model for the vector database used by LlamaStack tool groups. (example: `<your-vdb-embedding-model>`)
- `DOCLING_MCP_LLS_EXTRACTION_MODEL`: Model used for structured extraction in LlamaStack tool groups. (example: `<your-extraction-model>`)
Note: Preferred portable launch path is uvx. The README documents multiple transports; stdio is selected here as the canonical MCP client config shape. For local-only usage, set DOCLING_MCP_CONVERSION_MODE=local and omit remote service variables. For hybrid usage, use remote mode plus DOCLING_MCP_FALLBACK_TO_LOCAL=true and install local extras.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.DOCLING_MCP_SERVICE_URLrequiredURL of the Docling Serve instance when using remote conversionDOCLING_MCP_SERVICE_API_KEYrequiredAPI key for the Docling Serve instance when using remote conversionComprehensive PostgreSQL documentation and best practices, including ecosystem tools