中文 | English
docdistill
Document → text via VLM. An independent Python MCP server with two tools:
document_to_pdf (Office→PDF via real renderers) and analyze_doc (PDF→Markdown/LaTeX/JSON
via MinerU's VLM). Local file paths only, no CDN, images localized.
Predecessor: seed-viz's
analyze_doc(Node), now independent and pure-Python.
Repo: https://gitcode.com/Joe-zhouman/docdistill
Install
In your MCP client (.mcp.json):
{
"mcpServers": {
"docdistill": {
"command": "uvx",
"args": ["docdistill"],
"env": { "BACKEND": "mineru-official", "AUTH": "<your-mineru-token>" }
}
}
}
Get a free MinerU token (1000/day): https://mineru.net/apiManage/token
PyPI: https://pypi.org/project/docdistill/
Backends
BACKEND |
What it hits | AUTH |
ENDPOINT |
|---|---|---|---|
mineru-official (default) |
mineru.net cloud | required (MinerU token) | optional (default mineru.net) |
mineru-tasks-v3.2 |
your self-hosted mineru-api | none | required (e.g. http://127.0.0.1:5580) |
mineru-tasks-v3.2 is for users who self-host MinerU (e.g. an intranet-shared deployment:
one install serves a whole campus LAN). No rate limits, no auth, data stays local.
Platform support (v1)
- PDF extraction (
analyze_doc): all platforms (hosted backend, any networked machine). - Office→PDF (
document_to_pdf): Linux (LibreOffice) + Windows (Word/PowerPoint COM) only. macOS users get an honest error for Office files — export to PDF manually, thenanalyze_doc.
CLI
docdistill document-to-pdf paper.docx # → paper.pdf, hint to use analyze_doc
docdistill analyze-doc paper.pdf # → .docdistill/paper.md + .docdistill/images-<hash>/
docdistill analyze-doc thesis.pdf --output-format latex
docdistill analyze-doc doc.pdf --backend mineru-tasks-v3.2 --endpoint http://127.0.0.1:5580
Output lands in .docdistill/ next to the source. The images directory uses a
short hash name (images-<hash>) rather than the source filename, so image
references render correctly even when the source PDF has spaces/non-ASCII in
its name. PDFs >180 pages auto-paginate concurrently; partial page failures
don't abort the whole run. Files over 200MB get an honest error (split manually).
Known behavior: VLM splits multi-subfigure figures
The VLM extracts purely from visual content and does semantic segmentation, not pixel-chopping. On a large figure with several subfigures (e.g. a paper's "Fig. 4 (a)–(e)"), it tends to split it into one image block per visually bounded subfigure. Conversely, a region that looks like a table (clear grid lines) is extracted as a Markdown table rather than an image — which is usually what you want.
This is the VLM's own behavior, not a docdistill bug, and there is no API
switch to disable it. Switching to the non-VLM pipeline model avoids the
split but noticeably degrades text quality, so docdistill uses VLM. If you need
the original single-image figure, refer to the source PDF.
Status
0.2.0 beta. Interface may change before 1.0.
Metadata
Release files for docdistill 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| docdistill-0.2.0.tar.gz | 108.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docdistill-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 129.8 kB
Release files / docdistill-0.2.0.tar.gz
| Download URL | docdistill-0.2.0.tar.gz |
|---|---|
| Size | 108.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
719e4a95956be5555ce14d4d03eda1debaa064c4192b524040c6d5b501bf8d3c
|
|
BLAKE2b-256 checksum How to use checksums |
a7f30c757be8f70aa5aa63052cd489ba858938f242fd6459301b984d3031a22f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"20.04","id":"focal","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / docdistill-0.2.0-py3-none-any.whl
| Download URL | docdistill-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4a1bff003adf6fb1132e9c9f37a06c5244fef981ecfc784a2366d7226b4bef7
|
|
BLAKE2b-256 checksum How to use checksums |
aa8677893460a056fc7f1e560a2ce9b0d6f1b37d68b128ccd9039709de96fe3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"20.04","id":"focal","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|