
all2md
io.github.thomas-villani由 GitHub 帳號 thomas-villani 發布v1.19.0更新於 Nov 7, 2026
Read, convert, search, diff and outline PDF, Word, PowerPoint, HTML and 40+ formats as Markdown.
概覽
本機 MCP 伺服器,讓助理以 Markdown 讀取、轉換、搜尋、比對與產生 PDF、Word、PowerPoint 等 40 多種格式文件的大綱,並可寫回文件。
- 可以做什麼
- 以 Markdown 讀取文件,涵蓋 PDF、Word、PowerPoint、Excel、HTML、EPUB、郵件與壓縮檔
- 從 Markdown 寫入並就地編輯文件,儲存回 Word 等格式
- 在混合格式的資料夾中搜尋文件內容,並比較兩個版本
- 取得文件大綱,並把文件切分為 JSONL 供檢索流程使用
- 適用情境
- 當助理需要處理它本身無法開啟的本機文件(例如 PDF、簡報或 Word 檔)時適用;也適合把多種格式轉成 Markdown,以便摘要、搜尋或送入 RAG 流程。
- 執行需求
- 透過 stdio 在本機執行,可使用 Claude Desktop 擴充檔案,或以 uvx / uv 工具安裝帶 mcp 附加項的 all2md 套件。未宣告任何帳號、API 金鑰或環境變數。部分格式需要選用附加項(例如掃描版 PDF 的 OCR,可能需要 Tesseract 系統程式)。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 all2md,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
all2md
Read, convert, search, and chunk PDFs, Office files, e-books, emails, and 40+ other formats, as Markdown and back again. From Python, from your terminal, or from your AI assistant.
[PyPI version]
[Python Versions]
[CI]
[codecov]
[Documentation]
[License]
[uv]
[Ruff]
[Checked with mypy]
[Downloads]
[MCP server]
[GitHub Action]
A Word document, read in the terminal with all2md read.
Try it in ten seconds
With uv there is nothing to install first:
Keep it around as a tool, with all2md, rcat and the all2md-mcp server on your PATH:
Or use it as a library:
Pick your path
Read documents in your terminal
rcat is cat for documents. It renders PDFs, Word and PowerPoint files (the 97-2003 .doc and .ppt too), spreadsheets, e-books, emails, notebooks, man pages and every other format all2md reads, with headings, tables, syntax-highlighted code, links with their targets, footnotes, math and admonitions. No browser, no office suite, and it works over SSH. If you reach for glow to read Markdown or doxx to read Word files, rcat is the same idea for every format.
For anything longer, all2md read (or rcat -i) opens the interactive viewer shown above: an outline beside the text, jumps between headings, the links on screen, and, given a folder, a tree of the documents in it.
When you would rather have a browser, all2md view report.docx opens a styled HTML preview, all2md view ./docs -r browses a whole folder with on-demand conversion, and all2md edit notes.md opens a browser editor that saves back to the file.
Styling needs the cli_extras extra and the viewer needs tui; all2md[all] includes both. More in the viewer documentation.
Convert documents from the command line
Any supported format to Markdown, and Markdown back to DOCX, PDF, PPTX, HTML, EPUB and more:
Every option of every converter is a CLI flag (all2md --help) or a key in a config file (all2md config generate). Every file command reads stdin and writes stdout with -, so all2md slots into pipelines. Word documents come out as Word shows them: tracked changes resolved by policy, comments with their anchors, footnotes, field results, merged cells, and the list numbers Word actually prints.
See the CLI reference and the cheat sheet.
Python API
to_markdown() handles the common case; convert() goes between any two formats; to_ast() gives you the parsed document to work with.
The core has no dependencies; each format's extra pulls in only what that format needs. Options are typed dataclasses (PdfOptions, DocxOptions, …) or plain keyword arguments, and AST transforms (remove-images, heading-offset, your own) slot in between parsing and rendering. New formats and transforms plug in through entry points.
If you are an LLM with a coding environment, all2md llm-help prints usage guidance written for you, and all2md install-skills installs it as a skill for Claude Code, Cursor and others.
See the Python API guide, the AST guide, and examples/python.
Search inside any document
grep doesn't look inside a PDF or a .docx. all2md grep does, across any mix of formats, with the usual flags:
Vector and hybrid search need the search extra. Add --cache (or ALL2MD_CACHE=1) to reuse parsed documents across repeated runs.
RAG and chunking
all2md chunk converts and splits in one step. Each chunk carries its section heading and source page span, so answers can cite where they came from.
There are 11 strategies (semantic, heading, section, token, sentence, paragraph, code, …). Tables and code blocks are kept whole, and the output is JSONL ready for any vector store. Real token counts use tiktoken from the chunk extra. See the chunk command.
Give your AI assistant your documents
all2md ships a Model Context Protocol server, so an assistant like Claude can read your PDFs and Office files, write Word documents, edit them in place, search a folder, and compare two versions. You don't need to write any code.
In Claude Desktop (no Python or terminal needed):
- Download
all2md.mcpbfrom the latest release. - Open Claude Desktop → Settings → Extensions and drag the file onto the page.
- Choose the folder all2md may work in, and whether it may write files.
- Ask Claude about the documents in that folder.
Other MCP clients, and the developer configuration
The server is in the MCP Registry as io.github.thomas-villani/all2md. To run it yourself, use uvx (nothing to install):
or install it with uv tool install "all2md[mcp]" and use "command": "all2md-mcp". The [mcp] extra covers PDF, Word, PowerPoint, Excel, HTML, EPUB, ODF and reStructuredText; use [all] for everything.
Tools: read_document_as_markdown, save_document_from_markdown, edit_document, plus the read-only search_documents, diff_documents and get_document_outline.
See the MCP documentation for the options and the security model.
Measured fidelity
all2md's conversion quality is measured against independent ground truth, not asserted. Each benchmark lane is published with a control that shows what the measurement looks like when it should fail:
- Born-digital PDFs: publisher PDFs from PubMed Central, scored against the JATS XML deposited beside them.
- Scanned pages: 981 OmniDocBench pages against human annotation, for the OCR path.
- Round trips: Markdown → format → Markdown must hold fidelity 100 for this repository's own docs, on every pull request.
Against other converters, on a sealed holdout of 103 PubMed Central articles scored with the same instruments (reading of 2026-08-29):
Docling's learned table model still leads on tables. The comparison lane has the full results, the ground rules, and the caveats that bound them. Conversion Fidelity has the rest.
You can measure your own documents the same way:
CI quality gate
The same scores run as a GitHub Action, which fails the build when your documents stop converting cleanly:
It fails rather than passing quietly when no files match, no threshold is set, or a document cannot be converted at all, and it warns when a threshold sits so far below your real floor that it could never fire. See the action's documentation.
Supported formats
- Documents: PDF, DOCX, DOC, PPTX, PPT, ODT, ODP, RTF, EPUB, FB2, CHM
- Web & markup: HTML, MHTML, Markdown, reStructuredText, AsciiDoc, Org-Mode, LaTeX, MediaWiki, Textile, DokuWiki, BBCode, man pages
- Data & spreadsheets: XLSX, ODS, CSV/TSV, JSON, YAML, TOML, INI, OpenAPI/Swagger
- Email: EML, MBOX, Outlook (MSG/PST/OST), Evernote (ENEX)
- Notebooks & code: Jupyter, plus nearly 200 source-code and config file types
- Archives: ZIP, TAR, 7Z, RAR and more;
.gz,.bz2and.xzconvert as the file they hold - Custom output: any text format through Jinja2 templates
Full format matrix (input / output / required extra)
Run all2md list-formats to see what your install supports, or browse the formats documentation.
Installation
all2md check-deps shows which formats your install can handle.
One-click install scripts, OCR, layout analysis and other extras
Install scripts. These set up uv (installing it if needed) and install the CLI globally with the all extra.
To slim it down, download the script and pass the extras you want: sh install.sh pdf,docx,html or .\install.ps1 -Extras pdf,docx,html.
Extras for specific needs:
See the installation guide for the full list.
FAQ
How is all2md different from Pandoc? all2md is Python-native and built for programmatic use, LLM pipelines and reading documents in the terminal. Pandoc has more publishing breadth and scholarly features such as citations. They complement each other well.
Does it work with scanned PDFs?
Yes. Install all2md[pdf,ocr] (or ocr-easyocr for no system binary) and pass --pdf-ocr-enabled. all2md report tells you when a PDF has no text layer.
Can I output something other than Markdown? Yes: DOCX, PDF, PPTX, HTML, EPUB, ODT, RST, LaTeX and more, or any text format through Jinja2 templates.
How do I add a format?
Write a parser, describe it with ConverterMetadata, and register it under the all2md.converters entry point. See examples/plugins.
Contributing
Bug reports, feature requests, docs and code are all welcome. See CONTRIBUTING.md for the development setup. Parser changes are judged against the benchmark lanes; see Conversion Fidelity.
Questions and bugs go to GitHub Issues. Full documentation is on Read the Docs.
License
MIT. See LICENSE.
來源:README.md,提交 48b294f
工具
0版本歷史
4- v1.19.0最新Nov 7, 2026
- v1.18.1Oct 31, 2026
- v1.18.0Oct 26, 2026
- v1.17.0Oct 15, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分