mcpField
D
docling

docling

github.com/docling-projectDocuments69.8k42 installsUpdated 1d ago
Repository

About docling

A document-conversion skill for developers and users who need to read or process varied files. It describes CLI, Python SDK, structured extraction, chunking, and service-based conversion to Markdown or JSON.

Key features

  1. 01Convert diverse document formats
  2. 02Export Markdown or structured JSON
  3. 03Use CLI or Python SDK
  4. 04Extract typed fields and chunk documents
  5. 05Send conversion to a service

Use cases

  1. 01Read a PDF or URL from the shell
  2. 02Batch-convert documents with custom pipelines
  3. 03Prepare document chunks for retrieval

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/docling-project/docling --skill docling

After installing, type/doclingin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
cli.md
extraction.md
python-sdk.md
rag.md
service-client.md
slim-packaging.md

Details

From the project README

Docling

Docling converts documents — PDF, DOCX, PPTX, XLSX, HTML, Markdown, AsciiDoc, CSV, images, audio, and XML — into a single unified representation, the DoclingDocument, which you can export as Markdown (human-readable) or JSON (structured, lossless). Reach for Docling whenever you need to understand the content of a file you cannot read directly, especially PDFs (including scanned ones, via OCR or a vision-language model).

The fastest thing that works: the CLI

If you just need to read a document's content, run the CLI. It is installed with the docling package and accepts a local path or a URL:

docling report.pdf --to md --output /tmp/        # → /tmp/report.md
docling https://example.com/paper.pdf --to json --output /tmp/

Output files are named after the input (report.pdf → report.md). Default output directory is the current directory. This handles the majority of "what's in this file" requests. See references/cli.md for pipelines (standard vs VLM vs native), OCR engines, tables, scanned PDFs, passwords, and every flag.

Choosing how to use Docling

You need to…UseReference
Read / convert a file once, from the shellCLI (docling …)references/cli.md
Convert programmatically, tune the pipeline, batch, ASR, export images/tablesPython SDK (DocumentConverter + PipelineOptions)references/python-sdk.md
Pull specific typed fields out of a document (not the whole doc)DocumentExtractor (structured extraction, beta)references/extraction.md
Chunk documents for retrieval / feed a RAG indexChunking + framework loadersreferences/rag.md
Offload conversion to a remote service — low latency, scalable, no local ML deps or GPUService Client (self-hosted or managed docling-serve)references/service-client.md
Install only the dependencies you actually usedocling-slim extrasreferences/slim-packaging.md

Rules of thumb:

  • Local, one-off, no code → CLI.
  • Custom pipeline, chunking, structure analysis, embedding in an app → Python SDK.
  • Many documents, low-latency, no GPU/ML install to manage, scale on demand → Service Client against a docling-serve endpoint (self-hosted or the managed Docling for IBM watsonx service).
  • Minimize install size / avoid pulling torch and OCR engines you don't need → docling-slim with targeted extras.

Running without installing (uvx)

You can run the CLI without a persistent install:

uvx --from docling docling report.pdf --to md --output /tmp/

Output conventions

  • Always report the conversion status and (for PDFs) the page count.
  • If the user does not specify a format, ask whether they want Markdown (readable) or JSON / DoclingDocument (structured, lossless).
  • For tables, prefer export_to_markdown() / export_to_dataframe() on the table item (Python) — see references/python-sdk.md.
  • If a converted PDF comes back near-empty, repeated, or full of �, the source is likely scanned or complex layout — retry with OCR or --pipeline vlm (see references/cli.md).

Comments

Markdown supported