A fast, pure-Rust document parser built for agents & RAG. Extract positioned, structured content from 12+ formats β every chunk citable with page + bbox.
Like fast, dependency-free infra? β a star helps others find it.
It takes the structure-extraction fast path β interpreting PDF content streams for coordinates instead of rendering pages to pixels β so output is byte-identical and parses are sub-10 ms.
~29 MB, zero runtime deps, <10 ms warm parse (~700 pages/s). Drop it on a server, a laptop, or a CI box β no environment to set up.
Every chunk carries page + bbox + heading breadcrumbs. Reverse locate(x, y) lookup, with 100% coverage β answers that point back to the exact spot on the page.
CLI Β· library Β· MCP (stdio) Β· REST β and the output is byte-identical across all four. Wire it straight into an agent.
--ocr runs ONNX on tract (PP-OCRv6 tiny by default). Digital-text pages pass through; routed PDF pages use embedded pixels or render their final appearance on demand. ~7 MB fetched on first use.
Merged-cell table structure, formula β LaTeX, full-page transcription (UniRec-0.1B), plus PP-DocLayoutV2 / DocLayout-YOLO layout. None of it baked into the binary.
Hidden-text filtering (flagged & auditable, never silently dropped), zip-bomb & page-count guards, per-page complexity profiling. The deterministic core stands alone.
# build once β no toolchain zoo, just cargo
$ cargo build --release
# full IR: provenance + coordinates
$ docparse input.pdf -f json
# clean Markdown
$ docparse input.pdf -f markdown
# RAG chunks β page + bbox + breadcrumbs
$ docparse input.pdf -f chunks
# OCR pages without machine-readable text
$ docparse scan.pdf --ocr
No JVM, no C++ build chain, no Python venv. Build the binary, point it at a file, pick an output format. Born-digital PDFs and every other format parse with zero downloads.
Full quick start βRegister it as an MCP server, or run the local REST endpoint. Same parser, same byte-identical output β pick the surface that fits your stack.
Integration docs β# MCP tools: parse_document / get_chunks / locate
$ claude mcp add docparse -- docparse mcp
# local REST (binds 127.0.0.1)
$ docparse serve --port 8642
$ curl -F "file=@doc.pdf" \
"http://127.0.0.1:8642/parse?format=chunks"
# Python / LangChain β zero-dep thin client
from docparse_client.langchain import DocparseLoader
docs = DocparseLoader("paper.pdf").load()
Evaluated on OmniDocBench (CVPR 2025) using the embedded UniRec models. Text and formula land near paper level.
A proxy βOverallβ β 75 puts docparse-rs in the pipeline-tool tier (Marker 78, Docling ~80β85) β all from one zero-dependency binary. Full method, caveats & leaderboard β
The same job other tools do with a JVM, PDFium/Tesseract C++ deps, or a multi-GB Python env β in one self-contained Rust binary.
| docparse-rs | liteparse | Docling | MarkItDown | |
|---|---|---|---|---|
| Deploy | pure-Rust ~29 MB, zero deps | Rust + PDFium/Tesseract (C++) | Python + models (GB env) | Python |
| PDF engine | own content-stream interpreter | wraps PDFium | own | delegates |
| Determinism | byte-identical default path | deterministic | not strictly | deterministic |
| Citations | page+bbox both ways, 100% | bbox per text element | element-level | none |
| Output | JSON / MD / text / RAG chunks | JSON / text / PNG | Markdown / JSON | Markdown |
| Formats | 12, all in-process | PDF native; rest external | 15+ | 20+ |
| Speed (born-digital) | <10 ms / ~700 pg/s | fast | seconds/page | fast |
Honest about tradeoffs: Docling's neural layout has a higher ceiling on the hardest layouts; MarkItDown covers more long-tail formats; non-zh/en OCR (RTL / Korean) isn't covered yet. Detailed comparison β
A Cargo workspace of 17 crates. The deterministic core stands alone; neural models attach only where they earn their keep.
Enhancer boundary.Open source, Apache-2.0, pure Rust. Stars help others find it β and tell us to keep pushing.