
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 分