PDFMathTranslate (pdf2zh)

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

What it does

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.

What it needs

RuntimePython

Tools 1

translate_pdf
Translate a PDF or Word document given its absolute path and source and target language codes (source may be auto); writes mono and dual PDFs next to it and returns their paths.

Similar servers