SylphxAI/anymd

Any file → clean Markdown for AI agents: PDF, Word, PowerPoint, Excel, EPUB, HTML and web pages, images (OCR), audio and video (metadata, subtitles, transcripts). A fast Rust MCP server and CLI that runs on your machine. No API key.

anymd – Turn any file into clean Markdown for AI agents

What it does

  • A local, fast Rust‑based server/CLI that converts a huge range of document types (PDF, Word, PowerPoint, Excel, EPUB, HTML, images, audio, video, etc.) into structured Markdown. The output includes page‑level citation anchors, headings, tables, images, and optional OCR/ASR, all designed to be token‑efficient for LLM prompts.

Why it matters for AI agents

  • Agents (Claude, Gemini, Cursor, etc.) need clean, well‑structured text that fits within token limits. anymd provides that in a single call, preserving reading order, tables, and citations, while keeping everything on‑device (no API keys, no data upload).

Key features

  • Speed – Parallel Rust conversion; benchmark shows 212× faster than docling on a 38‑doc suite (11.5 s total).
  • Accuracy – Layout engine rebuilds words from glyph gaps, handles two‑column papers, recovers borderless tables, and keeps superscripts/subscripts.
  • Token‑lean output – Small front‑matter, <!-- page N --> anchors, compact tables.
  • One‑call multi‑format support – PDF, DOCX, PPTX, XLSX/ODS, CSV/TSV, EPUB, HTML, images, audio, video, plus URLs and whole directories.
  • Local‑only – No cloud service; OCR uses local doc‑VLM models or Tesseract, ASR uses bundled Qwen3‑ASR.
  • MCP integration – Exposes four Model‑Context‑Protocol tools (outline, read, search, inspect) that any MCP‑compatible client can call.
  • Pro add‑ons – For $29 you get video timeline frames and a cite‑check tool that verifies quoted locations in PDFs.

How to use it

  • Install via a single npx -y @sylphx/anymd setup command; this registers the binary with every MCP client on the machine (Claude Code, Codex, Cursor, VS Code, etc.).
  • CLI examples: anymd report.pdf > report.md, anymd https://example.com/article, anymd scan.png --ocr vlm.
  • Run as an MCP server (anymd mcp or anymd with no args) so agents can request read, search, etc., over stdio.
  • Packages are available on npm, PyPI, Docker, and crates.io; pre‑built binaries are shipped for all major platforms.

Benchmarks

  • Overall score 96.4 / 100 on the open AgentDocBench (beats docling, kreuzberg, unstructured, etc.).
  • Table‑cell F1 92.2 %, reading‑order 98.8 %.
  • Total conversion time 11.5 s for 38 diverse documents (vs. 2,432 s for docling).

Security & privacy

  • All processing happens locally; URLs are fetched with strict address checks.
  • Optional --allow-dir limits file‑system access.
  • Images are cached in a private directory and limited to 50 MP.
  • External tools (tesseract, ffmpeg) are run without a shell, with timeouts.

Where to learn more

License – MIT (core is free and open‑source; Pro is a paid add‑on).

Related

  • Project
  • Project
  • Project
  • Project
  • Project