anymd

io.github.SylphxAI由 GitHub 帳號 SylphxAI 發布v8.5.11更新於 Nov 8, 2026

Any file → clean Markdown for AI agents: PDF, Office, EPUB, HTML, images, audio/video. Local MCP.

概覽

AI 產生的概覽

本機 MCP 伺服器,把 PDF、Office、EPUB、HTML、圖片與影音檔案轉成乾淨的 Markdown,供助理閱讀、產生大綱與搜尋。

可以做什麼
  • 把檔案、網址或資料夾讀取為 Markdown,附頁碼/投影片/工作表標記、token 預算與續讀游標
  • 產生文件標題樹(含穩定節點 id),再依節點 id 讀取單一章節
  • 在單一檔案、目錄或網址中搜尋文字,回傳頁碼定位,無精確符合時改用 BM25 排序
  • 進一步檢視 PDF:將頁面轉成 PNG、擷取區域、OCR 頁面、輸出結構化 JSON、比對版本
  • 處理圖片(中繼資料、EXIF、OCR)與影音(中繼資料、章節、字幕、可選的本機轉錄)
適用情境
適合助理需要處理非純文字的本機文件或媒體時使用:閱讀報告、論文、簡報、試算表或掃描檔,依章節瀏覽長篇 PDF,或在某個資料夾的文件中尋找語句。
執行需求
透過 npx 以 stdio 在本機執行;只需 Node 18+,npm 會安裝對應平台的原生二進位檔。不需 API 金鑰或帳號。OCR 需要一次性安裝本機模型或已安裝的 tesseract;字幕與轉錄依賴 ffprobe/ffmpeg,ASR 模型下載需明確同意。
安裝前請注意
除非傳入網址,文件不會離開本機;傳入網址時只會抓取該網址。內嵌圖片只寫入伺服器自己的快取目錄。可選的 OCR/ASR 安裝會下載較大的本機模型(OCR 約 2 GB),且需明確同意。影片時間軸與引用核驗屬付費 Pro 功能,需一次性購買並提供授權權杖;託管的 Sylphx AI parse 服務則是另一回事,依頁計費。可用允許目錄選項限制檔案存取範圍。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 anymd,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[anymd — any file → clean Markdown for AI agents]

anymd

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 is the free, local mode of the same crates that run Sylphx AI parse, the hosted document-parse service: the same crates, hosted and metered per page for callers that want no local runtime.

[npm] [downloads] [stars] [MCP registry] [license] [OpenSSF Scorecard] [agent-ready 93/100]

Install · Benchmarks · Tools · CLI · Formats · Docs · Pro

Formerly pdf-reader-mcp. Migrating from pdf-reader-mcp

[Real terminal session: anymd converts a PDF page with its table, searches a folder, reads a spreadsheet, then Claude Code answers from the PDF through the anymd MCP server]

A real, unedited terminal recording (asciinema + agg, script). The last command is Claude Code answering from the PDF through the anymd MCP server.

bash
npx -y @sylphx/anymd setup              # add anymd to every MCP client on this machinenpx -y @sylphx/anymd report.pdf > report.md   # or convert from the shell

Why anymd

  • Fast. Native Rust converts in parallel, page by page. On the 38 benchmark documents, anymd takes 11.5 s in total; docling 2,432.4 s (212×), markitdown 75.6 s (7×); marker converted 30 of them in 7,104.5 s, against anymd's 4.64 s on the same 30 (1,532×).
  • Accurate. A layout engine rebuilds words from glyph gaps, puts two-column papers in reading order, and recovers tables, including borderless ones. The text stays exactly as printed, with no glued words and no scrambled columns.
  • Lean on tokens. Pages come back as Markdown with <!-- page 3 --> citation anchors, a small front-matter header, and compact tables. A token budget and a cursor keep large documents within your agent's context.
  • Every format, one call. One tool reads every format listed below. It also accepts web URLs and whole directories, and search looks across all of them.
  • Local and private. Nothing is uploaded. OCR uses installed local doc-VLM models or tesseract; transcripts use ffmpeg and bundled Qwen3-ASR. OCR setup and ASR model downloads require explicit opt-in.

Install

Add anymd to every MCP client on your machine (Claude Code, Codex, Cursor, VS Code, Claude Desktop, Windsurf, Gemini CLI) with one command:

bash
npx -y @sylphx/anymd setup     # --dry-run to preview, --remove to undo

Or add it by hand: every MCP client runs the same command, npx -y @sylphx/anymd. Node 18+ is the only requirement; npm installs the native binary for your platform.

Claude Code
bash
claude mcp add anymd -- npx -y @sylphx/anymd

Or as a plugin, with the anymd skill: /plugin marketplace add SylphxAI/anymd, then /plugin install anymd@anymd.

Codex
bash
codex mcp add anymd -- npx -y @sylphx/anymd

or in ~/.codex/config.toml:

toml
[mcp_servers.anymd]command = "npx"args = ["-y", "@sylphx/anymd"]
Cursor

[Add to Cursor]

or in .cursor/mcp.json:

json
{ "mcpServers": { "anymd": { "command": "npx", "args": ["-y", "@sylphx/anymd"] } } }
VS Code

Install in VS Code with one click, or from a terminal:

bash
code --add-mcp '{"name":"anymd","command":"npx","args":["-y","@sylphx/anymd"]}'

or in .vscode/mcp.json:

json
{ "servers": { "anymd": { "type": "stdio", "command": "npx", "args": ["-y", "@sylphx/anymd"] } } }
Claude Desktop

One click: download anymd-<version>.mcpb from the latest release and open it. Or, by hand:

Add to claude_desktop_config.json (Settings → Developer → Edit Config):

json
{ "mcpServers": { "anymd": { "command": "npx", "args": ["-y", "@sylphx/anymd"] } } }
Windsurf, Zed, Cline, and other clients

Any client that speaks MCP over stdio: command npx, args ["-y", "@sylphx/anymd"]. To keep the server inside one folder, add --allow-dir=/path/to/docs.

CLI only
bash
npm install -g @sylphx/anymd     # or run it once with: npx -y @sylphx/anymd <file>

Python wheels carry the same prebuilt binary and are on PyPI as anymd from the first release after publication.

Use npm on Windows, macOS and Linux. On macOS and Linux, Homebrew is also available:

bash
brew install sylphxai/tap/anymd

Docker (amd64 and arm64):

bash
docker run --rm -v "$PWD:/data" ghcr.io/sylphxai/anymd report.pdf > report.mddocker run -i --rm ghcr.io/sylphxai/anymd        # MCP server on stdio

Or build it from crates.io (Rust 1.95+, CMake and a C++ compiler; doc-VLM OCR and local ASR are included):

bash
cargo install anymd

npm, pip and Docker ship a prebuilt binary, while cargo install compiles one on your machine.

Benchmarks

AgentDocBench is an open benchmark for document → Markdown conversion for agents: license-clean documents in 12 categories (math papers, two-column papers, financial tables, forms, scans, CJK, slides, spreadsheets, Word, EPUB, HTML), scored on verbatim sentences, text F1, reading order, and table cells, with time and output tokens. Every tool runs on the same kind of GitHub-hosted runner (4 CPUs):

anymddoclingkreuzbergunstructuredmarkitdownmarkerpdftotext
Overall score96.493.081.781.276.871.042.2
Table cells F192.289.938.438.457.260.90.0
Reading order98.894.496.893.985.576.852.0
Docs converted38/3838/3838/3838/3838/3830/3823/38
Time, all docs11.5 s2,432.4 s16.0 s346.5 s75.6 s7,104.5 s0.90 s

The generated leaderboard, per-category scores (including where anymd loses), and method are in the benchmark guide. The corpus, ground truth, adapters, and raw results are in bench/, and the Benchmark workflow reruns everything; new tools can join with a single adapter file.

Image and video extraction

Image and video benchmarks cover page-image OCR and embedded video subtitles separately:

DatasetanymdReference alternative
OmniDocBench v1.6 (1,651 page images), overall ↑21.4 (8.1.0, English tesseract)TeleOCR 96.91 (author-reported, not our same-run measurement)
MP4 mov_text fixtures (4 clips, 12 cues), text/start recall ↑91.7% (8.5.1, 11/12)FFmpeg 100% (12/12)
Matroska SubRip fixtures (4 clips, 12 cues), text/start recall ↑91.7% (8.5.1, 11/12)FFmpeg 100% (12/12)

The image score is historical, not a score for the current OCR model. The video scores were measured on 2026-10-08 using small authored regression datasets, not films or lectures; anymd drops a repeated caption at a different timestamp. They measure embedded subtitle extraction, not visual understanding or ASR. The guide links the alternative selection, limitations, timings, raw outputs and reproduction harness.

MCP tools

anymd exposes four tools.

ToolUse it toKey arguments
outlineNavigate a heading tree, with node ids and unit/Markdown rangessource, format (json · tree)
readTurn a file, URL, or folder into Markdownsource, pages ("1-5,8"), max_tokens (default 20000), cursor, ocr, images (refs · none), revisions (markup · accept · reject), transcript, download_asr_model
searchFind text across files, folders, and URLsquery, sources, mode (auto · literal · ranked), glob, max_results
inspectGo deeper on a PDFoperation: render_page, extract_regions, ocr_pages, structure (JSON with geometry), compare, inspect, cite_check (quote and location support, anymd Pro)

A read answer looks like this:

markdown
---source: papers/attention.pdftitle: Attention Is All You Needpages: 15showing: pages 1-9---
<!-- page 1 -->
# Attention Is All You Need…
<!-- page 8 -->
|Model|BLEU EN-DE|BLEU EN-FR||-|-|-||Transformer (big)|28.4|41.8|…
<!-- Stopped at the 20000-token budget. Continue with cursor: "10", or pick pages, or raise max_tokens. -->

search answers with one line per hit:

markdown
5 matches for "masked language model" (2 files, 31 sections searched)
### papers/bert.pdf (5)- p.1: …by using a “**masked language model**” (MLM) pre-training objective, inspired by the Cloze task…- p.2: …In addition to the **masked language model**, we also use a “next sentence prediction” task…

If nothing matches exactly, search falls back to BM25-ranked passages, so a question like "how does bidirectional pretraining work" still finds the right page.

CLI

The same binary is a command-line converter, like MarkItDown but much faster:

bash
anymd report.pdf > report.md                 # a fileanymd deck.pptx notes.docx budget.xlsx        # several files, each with a headeranymd https://example.com/article            # a web page (main content only)cat scan.png | anymd - --ocr                 # stdin, with OCRanymd setup ocr                             # one-time: install the OCR engine and pinned local models (~2 GB)anymd scan.png --ocr vlm                    # tables as Markdown, formulas as LaTeXanymd paper.pdf --pages 1-3 --max-tokens 4000anymd search "indemnification" contracts/ --glob '*.pdf'anymd doctor                                 # lists the optional tools anymd found

Run with no arguments from an MCP client (piped stdin), or as anymd mcp, and it serves MCP over stdio.

Formats

InputWhat you get
PDFReading-order Markdown: headings, paragraphs, lists, tables, sub/superscripts, <!-- page N --> markers, bookmarks as an outline. Running headers and page numbers are removed. Image-only pages use local doc-VLM OCR after explicit model setup, otherwise installed tesseract. Embedded figures are saved to the anymd cache and marked in place with their caption (images: "refs", the default).
Word .docxHeadings, bold/italic, links, nested lists, tables with merged cells, footnotes, equations as LaTeX, embedded pictures as image files, tracked changes and comments as CriticMarkup
PowerPoint .pptxOne section per slide in deck order, titles, bullets, tables, chart data, speaker notes, pictures as image files
Excel .xlsx .xls .ods · CSV/TSVOne table per sheet, dates as ISO strings, capped at 2,000 rows per sheet
EPUBOne section per chapter in spine order, plus title and author; pictures as image files
HTML and URLsThe main article only: navigation, cookie banners, and sidebars are dropped. Relative links are resolved, and code keeps its language.
Markdown, text, JSONReturned unchanged, with pagination
ImagesDimensions and EXIF (camera, date, GPS), plus local doc-VLM OCR after model setup, or installed tesseract
Audio / videoDuration, streams, chapters, embedded and sidecar subtitles (via ffprobe/ffmpeg). Local Qwen3-ASR transcript with transcript: true; download_asr_model: true implies a transcript; transcript: true alone never downloads weights.

How it works

For PDFs, anymd reads glyph positions rather than text runs. Glyphs are grouped into lines by baseline, which tolerates super- and subscripts. Word spaces come from the gaps between glyphs, measured against the font size and adjusted for letter tracking. A column-aware XY cut finds gutters between running text. Tables come from drawn lines where a table has them (a missing line between two cells makes a merged cell) and from aligned columns of whitespace where it does not. Wrapped cell text stays in its cell, stacked header lines become one header, and a header over several columns is kept with each of them. Text a reader cannot see (invisible text, or text in the colour of the box behind it) is left out. Pages are processed in parallel and isolated from each other, so one malformed page never fails the whole document. The other formats are parsed natively in Rust (zip/XML, calamine, html5ever); no Python, LibreOffice, or cloud service is involved.

anymd Pro

The anymd core is free and open source (MIT), and nothing that was free has moved to Pro. anymd Pro (current one-time price, from 8.4.0) adds exactly two things for agents that must show their evidence: video timelines with exact, hashed frames (inspect video_timeline and render_frame, and the timeline option of read and outline) and cite-check, which verifies a quote at a page and location in a PDF. Licences are checked offline; no account. Pro funds anymd's development. Buy anymd Pro for instant delivery after payment: copy your licence token from the checkout confirmation page, or recover it through the product's recovery page. Buy from the terminal: anymd pro buy opens the checkout in your browser and turns the payment into a licence token on this machine, so there is nothing to copy. See anymd Pro.

Local and hosted

anymd has two modes, and only one of them runs on your machine:

  • Local (free, MIT, this repository). The anymd binary, the MCP server, the CLI and the anymd-core, anymd-pdf and anymd-formats crates. It converts on your machine, uploads nothing, and needs no API key.
  • Hosted (Sylphx AI parse, metered). The same crates, pinned at the published version and imported unchanged, serve document parsing for Sylphx AI callers that do not want a local runtime. The call is billed per page and needs a Sylphx AI account. This is the paid mode; there is no licence key and nothing in the local binary is gated by it.

Sylphx AI parse is not a different parser and not a fork: the hosted service imports these crates, so a fix here reaches both modes and the two never drift into separate engines. Only the free local binary lives in this repository; the hosted service lives in the Sylphx platform.

For importers, the anymd-core, anymd-pdf and anymd-formats crate APIs are stable within a major version: no breaking change ships without a major version bump, so the service's pinned version keeps working and is moved forward deliberately, never forced by a patch or minor release.

Security

  • Local-first: documents never leave your machine unless you pass a URL, and even then only that URL is fetched.
  • URL fetches block private and loopback addresses, and every redirect hop is checked again, pinned to its resolved address.
  • --allow-dir=<path> (repeatable) or MCP_PDF_ALLOWED_DIRS confines the server to the directories you list.
  • Embedded images are written only to anymd's own cache directory (ANYMD_CACHE_DIR, else the platform cache), never next to the source document, and refused over 50 megapixels.
  • External tools (tesseract, ffprobe, ffmpeg) are optional. anymd runs them without a shell, with a timeout and an output cap.

See SECURITY.md to report a vulnerability.

Also from Sylphx

  • repomap: A map of your codebase for AI agents: code graph, search, call paths and change impact.
  • lockdocs: Exact-version library docs from your lockfile. Local, offline, no rate limits.
  • skills: Battle-tested agent skills for Claude Code and Codex, installed in one command.
  • readme-mark: Beautiful README images from one URL: banners, badges, icons and stats cards.
  • Sylphx apps: Apps and tools from Sylphx.

More from Sylphx: https://sylphx.com/open-source

Star history

[Star History Chart]

License

MIT © Sylphx

來源:README.md,提交 6fecf03

工具

4

inspect

Document and media evidence when Markdown is not enough. video_timeline (bounded scene/cue timeline) and render_frame (actual decoded frames), and cite_check (quote/location support, not semantic truth), are anymd Pro; PDF operations: inspect (page facts, metadata), render_page (PNG images), extract_regions (crop bounding boxes), ocr_pages / analyze_regions (configured OCR or vision provider), structure (JSON with document map, elements, geometry; profile quality|research adds trust and accessibility reports), compare (page-level diff of sources[0] vs sources[1]).

輸入參數ocrscaleprofilesources必填timelinecitationslanguagesmax_pagesoperation必填timeout_mstranscriptmax_regions另有 8 個

outline

Return a document heading tree with stable node ids, title paths, page/slide/chapter ranges and Markdown byte ranges. PDF bookmarks or detected headings, Word headings, PowerPoint slides, EPUB chapters and headings, HTML and Markdown. format json (default) or tree. Pass a node id to read to fetch that section.

輸入參數ocrformatimagessource必填timelinerevisions

read

Read any document as clean Markdown: PDF, Word (DOCX), PowerPoint (PPTX), Excel (XLSX/XLS/ODS), CSV, EPUB, HTML or a web URL, Markdown/text, images (metadata + OCR), audio/video (metadata, chapters, subtitles). Pages/slides/sheets carry <!-- page N --> style markers for citation. Long documents stop at max_tokens (default 20000) and end with a cursor to continue; choose pages with pages: "1-5,8". A directory returns its readable files.

輸入參數ocrnodepagescursorimagessource必填timelinerevisionsmax_tokenstranscriptdownload_asr_model

版本歷史

15
  1. v8.5.11最新Nov 7, 2026
  2. v8.5.9Nov 3, 2026
  3. v8.5.7Oct 30, 2026
  4. v8.5.6Oct 30, 2026
  5. v8.5.5Oct 19, 2026
  6. v8.5.4Oct 16, 2026
  7. v8.5.3Oct 11, 2026
  8. v8.5.1Oct 3, 2026
  9. v8.4.0Oct 2, 2026
  10. v8.3.0Oct 1, 2026
  11. v8.2.0Oct 1, 2026
  12. v8.1.0Sep 26, 2026
  13. v8.0.0Sep 26, 2026
  14. v7.1.1Sep 25, 2026
  15. v7.1.0Sep 25, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分