all2md

io.github.thomas-villaniPublished by GitHub account thomas-villaniv1.19.0Updated Nov 7, 2026

Read, convert, search, diff and outline PDF, Word, PowerPoint, HTML and 40+ formats as Markdown.

Overview

AI-generated overview

Local MCP server that lets an assistant read, convert, search, diff and outline PDF, Word, PowerPoint and 40+ other formats as Markdown, and write documents…

What you can do
  • Read documents as Markdown, including PDF, Word, PowerPoint, Excel, HTML, EPUB, email and archives
  • Write and edit documents in place from Markdown, saving back to Word and other formats
  • Search inside a folder of mixed-format documents and compare two versions
  • Get a document outline, and chunk documents into JSONL for retrieval pipelines
When to use it
Useful when an assistant needs to work with local documents it cannot otherwise open, such as PDFs, slide decks or Word files, or when you want Markdown output from mixed formats for summarising, searching or feeding a RAG pipeline.
Requirements
Runs locally over stdio, either as the Claude Desktop extension file or via uvx / a uv tool install of the all2md package with the mcp extra. No accounts, API keys or environment variables are declared. Some formats need optional extras (for example OCR for scanned PDFs, which may need the Tesseract system binary).
Before you install
The server can write and edit files, so grant it only a folder you are willing to have modified and consider disabling write access. It reads whatever documents are in that folder, which may contain confidential material. Optional OCR and layout extras download models on first use.

Installation

In SourceWeft

  1. Open all2md in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[all2md logo]

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]

[all2md read showing a Word document in the terminal, with an outline, a table, code and a list of links]

A Word document, read in the terminal with all2md read.

Try it in ten seconds

With uv there is nothing to install first:

bash
uvx --from "all2md[all]" rcat report.pdf          # read any document in the terminaluvx --from "all2md[all]" all2md report.docx       # print it as Markdown

Keep it around as a tool, with all2md, rcat and the all2md-mcp server on your PATH:

bash
uv tool install "all2md[all]"

Or use it as a library:

bash
uv add "all2md[pdf,docx]"      # or: pip install "all2md[pdf,docx]"
python
from all2md import to_markdown
markdown = to_markdown("report.pdf")

Pick your path

I want to…Start withRead
Read documents without leaving the terminalrcat report.docx, all2md read docs/Read in the terminal
Convert files, one or a thousand, in either directionall2md ./inbox -r --output-dir ./mdConvert
Parse documents in my Python codeto_markdown("report.pdf")Python API
Find text inside PDFs, Word files and slide decksall2md grep "deadline" contracts/ -rSearch
Feed documents to a RAG pipelineall2md chunk handbook.pdfRAG and chunking
Let Claude or another assistant work with my filesthe one-click Claude Desktop extensionAI assistants (MCP)
Know how far to trust the outputall2md report scan.pdfMeasured fidelity

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.

bash
rcat report.docx                              # read a Word documentrcat deck.pptx --outline                      # just the slide titlesrcat handbook.pdf --extract "Installation"    # one section, by headingrcat contract.pdf --pager                     # page through itcurl -sL https://example.com/spec.pdf | rcat -

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.

bash
all2md read handbook.pdfall2md read docs/            # choose from the documents in a folder

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:

bash
all2md report.pdf > report.md                     # to Markdown on stdoutall2md answer.md --out answer.docx                # Markdown (an LLM's output, say) to Wordall2md ./inbox -r --output-dir ./markdown -p 4    # a whole tree, four at a timeall2md ./inbox -r --output-dir ./markdown --watch # keep converting as files arriveall2md scan.pdf --pdf-ocr-enabled                 # scanned pages, through OCR

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.

python
from all2md import to_markdown, convert, to_ast, from_ast
markdown = to_markdown("report.pdf", pages="1-3", flavor="gfm")convert("notes.md", "notes.docx", target_format="docx")
doc = to_ast("report.docx")          # a typed document treehtml = from_ast(doc, target_format="html")

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:

bash
all2md grep -i "termination" contracts/ -r            # every format in the treeall2md grep -C 2 "deadline" contracts/ -r --rich      # with context, highlightedall2md search "renewal terms" ./contracts --keyword   # ranked BM25 searchall2md search "who approved the budget" ./minutes --hybridall2md diff draft-v1.docx draft-v2.pdf                # a colored diff, across formats

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.

bash
all2md chunk handbook.pdf --strategy semantic --max-tokens 512 --overlap 64 > chunks.jsonl
python
import all2md
for c in all2md.chunk("handbook.pdf", strategy="semantic", max_tokens=512, overlap=64):    print(c.chunk_id, c.section_heading, c.page, c.token_count)

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):

  1. Download all2md.mcpb from the latest release.
  2. Open Claude Desktop → Settings → Extensions and drag the file onto the page.
  3. Choose the folder all2md may work in, and whether it may write files.
  4. 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):

json
{  "mcpServers": {    "all2md": {      "command": "uvx",      "args": ["--from", "all2md[all]", "all2md-mcp", "--temp", "--enable-from-md"]    }  }}

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):

all2mdpymupdf4llm 1.28.2Docling 2.120.3
Recall of attainable text97.3%97.1%96.2%
Invented text (lower is better)0.55%6.26%2.05%
Table text preserved73.1%60.7%79.3%

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:

bash
all2md report scan.pdf                        # a reference-free "quality card"all2md roundtrip notes.md --via docx          # convert, parse back, score what survivedall2md optimize hard.pdf --sample-pages 5     # auto-tune the settings for a difficult file

CI quality gate

The same scores run as a GitHub Action, which fails the build when your documents stop converting cleanly:

yaml
- uses: thomas-villani/[email protected]  with:    paths: docs/**/*.md    roundtrip-fail-under: 97

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, .bz2 and .xz convert as the file they hold
  • Custom output: any text format through Jinja2 templates
Full format matrix (input / output / required extra)
FormatFile ExtensionsInput (Parse)Output (Render)Dependencies Extra
PDF.pdf✅✅pdf, pdf_render
Word Document.docx✅✅docx
Word 97-2003 Document.doc, .dot✅(N/A)(built-in)
PowerPoint Presentation.pptx✅✅pptx
PowerPoint 97-2003.ppt, .pps, .pot✅(N/A)(built-in)
HTML.html, .htm✅✅html
MHTML Web Archive.mhtml, .mht✅(N/A)html
Email Message.eml✅(N/A)(built-in)
MBOX Mailbox Archive.mbox, .mbx✅(N/A)(built-in)
Outlook Message/Archive.msg, .pst, .ost✅(N/A)outlook
Jupyter Notebook.ipynb✅✅(built-in)
EPUB E-book.epub✅✅epub
FictionBook 2.0 (FB2).fb2✅(N/A)fb2
CHM (Compiled HTML Help).chm✅(N/A)chm
OpenDocument Text.odt✅✅odf
OpenDocument Presentation.odp✅✅odf
OpenDocument Spreadsheet.ods✅(N/A)odf
Excel Spreadsheet.xlsx✅(N/A)xlsx
CSV / TSV.csv, .tsv✅✅(built-in)
Rich Text Format.rtf✅✅rtf
LaTeX.tex, .latex✅✅latex
AsciiDoc.adoc, .asciidoc, .asc✅✅(built-in)
reStructuredText.rst✅✅rst
Org-Mode.org✅✅org
MediaWiki.wiki, .mw✅✅wiki
Textile.textile✅✅(built-in)
BBCode.bbcode, .bb✅(N/A)(built-in)
DokuWiki.doku, .dokuwiki✅✅(built-in)
Man Page (man(7)).1 to .9, .man✅✅(built-in)
Evernote Export.enex✅(N/A)enex
Safari Web Archive.webarchive✅(N/A)html
JSON.json✅✅(built-in)
YAML.yaml, .yml✅✅(built-in)
TOML.toml✅✅(built-in)
INI / Config.ini, .cfg, .conf✅✅(built-in)
OpenAPI/Swagger.yaml, .yml, .json✅(N/A)openapi
Plain Text.txt, .text✅✅(built-in)
Source Codenearly 200 extensions (.py, .js, etc.)✅(N/A)(built-in)
Archive Formats.tar, .tgz, .7z, .rar, etc.✅(N/A)(built-in)
Single Compressed File.gz, .bz2, .xz (e.g. ls.1.gz)✅(N/A)(built-in)
ZIP Archive.zip✅(N/A)(built-in)
Jinja2 Templates (Custom)User-defined (.jinja2, .j2)❌✅jinja2

Run all2md list-formats to see what your install supports, or browse the formats documentation.

Installation

You are…Install
Using the CLI and vieweruv tool install "all2md[all]"
Trying it onceuvx --from "all2md[all]" rcat FILE
Building with the libraryuv add "all2md[pdf,docx,html]" or pip install "all2md[pdf,docx,html]"
Running the MCP serverthe Claude Desktop extension above, or uv tool install "all2md[mcp]"

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.

bash
# macOS / Linuxcurl -LsSf https://raw.githubusercontent.com/thomas-villani/all2md/main/scripts/install.sh | sh
powershell
# Windows (PowerShell)powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/thomas-villani/all2md/main/scripts/install.ps1 | iex"

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:

bash
uv add "all2md[cli_extras]"     # terminal styling for --rich / rcat, progress bars, watch modeuv add "all2md[tui]"            # the interactive viewer, all2md readuv add "all2md[pdf,ocr]"        # OCR for scanned PDFs (Tesseract; needs the system binary)uv add "all2md[pdf,ocr-easyocr]" # ...or binary-free EasyOCR (downloads models on first use)uv add "all2md[pdf_layout]"     # ML layout analysis for difficult PDFsuv add "all2md[search]"         # vector and hybrid searchuv add "all2md[chunk]"          # real token counts for chunkinguv add "all2md[outlook]"        # Outlook MSG (PST/OST also need: pip install libpff-python)

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.

Source: README.md at commit 48b294f

Tools

0
SourceWeft started this package once in an isolated sandbox, without credentials, to list its tools. That failed: the server did not start.

Version history

4
  1. v1.19.0LatestNov 7, 2026
  2. v1.18.1Oct 31, 2026
  3. v1.18.0Oct 26, 2026
  4. v1.17.0Oct 15, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts