Meet the Docling team at IBM TechXchange 2026 · Atlanta, GA · October 26–29, 2026See our sessions
DoclingDocling for IBM watsonx
AI Assistants

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

Lightweight installation that connects to your Docling Service:

pip install docling-mcp

Configure 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=remote

Local Mode

For users without Docling Service access (processes documents locally):

pip install docling-mcp[local]

Configure environment:

export DOCLING_MCP_CONVERSION_MODE=local

Hybrid 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=true

Quick 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-http

Client 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:

Add to LM Studio

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:

VariableDefaultDescription
DOCLING_MCP_CONVERSION_MODEremoteremote 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_TIMEOUT300.0Request timeout in seconds
DOCLING_MCP_FALLBACK_TO_LOCALfalseFall back to local if service unavailable
DOCLING_MCP_KEEP_IMAGESfalseRetain page images in output
DOCLING_MCP_DO_OCRtrueEnable OCR pipeline
DOCLING_MCP_DO_TABLE_STRUCTUREtrueDetect 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

On this page