MCP
Use Docling for IBM watsonx from AI assistants via the Model Context Protocol
Docling MCP gives AI assistants Docling's document processing as tools, through the Model Context Protocol. Any MCP client can use it, such as IBM Bob, Claude Desktop or LM Studio. In remote mode, the heavy lifting runs on Docling for IBM watsonx, so the MCP server itself stays lightweight.
Prefer a simpler setup without a running server? Agent skills give an assistant the same abilities through a short Markdown file and the command line. That page also compares the two approaches.
What is Docling MCP?
Docling MCP is a Model Context Protocol server that exposes Docling's capabilities as tools that AI agents can invoke. It supports:
- Document Conversion: Convert PDFs to structured JSON format (DoclingDocument)
- Document Generation: Create new documents with titles, sections, paragraphs, and lists
- Multiple Formats: Export to Markdown, JSON, and other formats
- Local Caching: Improves performance for repeated document access
- RAG Applications: Integration with vector databases for retrieval-augmented generation
Prerequisites
You need the Service URL and API key of your Docling for IBM watsonx instance. See Quick Start. Docling MCP reads them as DOCLING_MCP_SERVICE_URL and DOCLING_MCP_SERVICE_API_KEY.
Installation Modes
Remote Mode (Recommended)
Lightweight installation that connects to your Docling Service:
pip install docling-mcpConfigure environment:
export DOCLING_MCP_SERVICE_URL=https://api.example.dcls.saas.ibm.com/your-instance-id
export DOCLING_MCP_SERVICE_API_KEY=your-api-key-here
export DOCLING_MCP_CONVERSION_MODE=remoteLocal Mode
For users without Docling Service access (processes documents locally):
pip install docling-mcp[local]Configure environment:
export DOCLING_MCP_CONVERSION_MODE=localHybrid Mode
Remote with automatic fallback to local processing:
pip install docling-mcp[local]Configure:
export DOCLING_MCP_SERVICE_URL=https://api.example.dcls.saas.ibm.com/your-instance-id
export DOCLING_MCP_SERVICE_API_KEY=your-api-key-here
export DOCLING_MCP_CONVERSION_MODE=remote
export DOCLING_MCP_FALLBACK_TO_LOCAL=trueQuick Start
The easiest way to use Docling MCP is via uvx:
# For stdio transport (Claude Desktop, LM Studio)
uvx --from docling-mcp docling-mcp-server --transport stdio
# For SSE transport (Llama Stack)
uvx --from docling-mcp docling-mcp-server --transport sse
# For HTTP transport (containerized setups)
uvx --from docling-mcp docling-mcp-server --transport streamable-httpClient Integration
{
"mcpServers": {
"docling": {
"command": "uvx",
"args": [
"--from=docling-mcp",
"docling-mcp-server"
],
"env": {
"DOCLING_MCP_CONVERSION_MODE": "remote",
"DOCLING_MCP_SERVICE_URL": "https://api.example.dcls.saas.ibm.com/your-instance-id",
"DOCLING_MCP_SERVICE_API_KEY": "your-api-key-here"
}
}
}
}Add this configuration to your client's MCP settings: Bob's MCP server settings in IBM Bob, claude_desktop_config.json for Claude Desktop, or mcp.json for LM Studio. For LM Studio, you can also use the direct install button:
Configuration
All settings use the DOCLING_MCP_ prefix and can be supplied as environment variables, in a .env file in the working directory, or via the env block of your MCP client config:
| Variable | Default | Description |
|---|---|---|
DOCLING_MCP_CONVERSION_MODE | remote | remote or local |
DOCLING_MCP_SERVICE_URL | — | Docling Service endpoint (required for remote mode) |
DOCLING_MCP_SERVICE_API_KEY | — | API key (required for remote mode) |
DOCLING_MCP_SERVICE_TIMEOUT | 300.0 | Request timeout in seconds |
DOCLING_MCP_FALLBACK_TO_LOCAL | false | Fall back to local if service unavailable |
DOCLING_MCP_KEEP_IMAGES | false | Retain page images in output |
DOCLING_MCP_DO_OCR | true | Enable OCR pipeline |
DOCLING_MCP_DO_TABLE_STRUCTURE | true | Detect table structure |
Full configuration reference available in the Docling MCP repository.
Example Usage
Here are some example prompts to get you going:
Converting Documents
Convert the PDF at /path/to/document.pdf and give me an outline of its sections.Generating Documents
Create a new document about AI tokenizers. Add a title, then add sections with headings and paragraphs. Include a bulleted list of key concepts. Export to Markdown when done.RAG Applications
Convert this research paper, chunk it, and add the chunks to the vector database for retrieval.Resources
- GitHub: github.com/docling-project/docling-mcp
- PyPI: pypi.org/project/docling-mcp
- MCP Registry: registry.modelcontextprotocol.io