anymd
Local converter that turns PDFs, Office files, EPUB, web pages, images and media into Markdown
Lets an assistant translate a local PDF or Word document while keeping its layout, formulas and figures.
By PDF Math Translate Python Local · stdio MediaAI and ML
46 popularity score ★ 38k ↓ 8.0k/mo
PDFMathTranslate (command pdf2zh) translates scientific papers and other PDFs while preserving the original layout: formulas, charts, tables of contents and annotations stay in place. It produces two files, a translated-only PDF and a bilingual side-by-side PDF. Besides the command line, a GUI, Docker and Zotero integration, it can run as an MCP server with pdf2zh --mcp.
The MCP server offers one tool, translate_pdf, which takes the absolute path of a PDF or Word document and the source and target language codes (the source can be auto). It writes the two translated PDFs next to the input file and returns their paths. The project's docs suggest pairing it with a filesystem MCP server so the assistant can find the file to translate.
Install the Python package pdf2zh (for example with pip or uv) and run pdf2zh --mcp over stdio, or add --sse to serve SSE on 127.0.0.1:3001. Layout detection uses an ONNX model (DocLayout-YOLO) run locally.
| Runtime | Python |
|---|
translate_pdf