PDF Math Translate

v1.0.0Search & Data Extractionstable

[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero

chinesedocumenteditenglishjapanese
Share:
33,924
Stars
0
Downloads
0
Weekly
0/5

What is PDF Math Translate?

PDF Math Translate is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to [emnlp 2025 demo] pdf scientific paper translation with preserved formats - 基于 ai 完整保留排版的 pdf 文档全文双语翻译,支持 google/deepl/ollama/openai 等服务,提供 cli/gui/mcp/docker/zotero

[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP protocol support

Use Cases

Scientific paper translation
Format preservation
Multi-language support
LicenseAGPL-3.0
Languagepython
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx pdfmathtranslate

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use PDF Math Translate

PDF Math Translate (pdf2zh) is a scientific document translation tool that preserves the original layout, formulas, charts, and tables of PDF papers during translation. It supports Google Translate, DeepL, Ollama, OpenAI, and other translation backends, and can output side-by-side bilingual PDFs. Crucially for AI workflows, it exposes an MCP server mode (both STDIO and SSE) so AI assistants can invoke document translation as a tool call, enabling automated multilingual research workflows without losing mathematical formatting.

Prerequisites

  • Python 3.12 recommended (3.10+ required), with pip or uv available
  • For MCP STDIO mode: an MCP-compatible client such as Claude Desktop or Cursor
  • For cloud translation backends: API keys for your chosen service (e.g. DeepL API key, OpenAI API key)
  • For Ollama backend: Ollama installed and running locally with a translation-capable model pulled
1

Install pdf2zh

Install the package using uv (recommended for Python 3.12) or pip. The uv method pins the exact Python version.

# Recommended:
uv tool install --python 3.12 pdf2zh

# Alternative:
pip install pdf2zh
2

Verify the installation

Run a quick test to confirm pdf2zh is accessible and shows the help output.

pdf2zh --help
3

Translate a PDF from the command line

Run a basic translation to make sure the tool works before integrating it via MCP.

# Translate using Google Translate (default, no API key needed)
pdf2zh document.pdf

# Translate with DeepL
pdf2zh document.pdf --service deepl --apikey YOUR_DEEPL_API_KEY
4

Start the MCP server in STDIO mode

Launch pdf2zh as an MCP STDIO server. Your MCP client (Claude Desktop, Cursor, etc.) will manage this process automatically using the config below.

pdf2zh --mcp
5

Add to your MCP client configuration

Configure your MCP client to start pdf2zh as an MCP server so AI assistants can call the translation tool directly.

{
  "mcpServers": {
    "pdfmathtranslate": {
      "command": "pdf2zh",
      "args": ["--mcp"]
    }
  }
}
6

Optional: Start the MCP server in SSE mode

For network-accessible deployments, start the server in SSE mode. The client then connects over HTTP rather than stdio.

pdf2zh --mcp --sse

PDF Math Translate Examples

Client configuration

Claude Desktop config entry for PDF Math Translate in MCP STDIO mode.

{
  "mcpServers": {
    "pdfmathtranslate": {
      "command": "pdf2zh",
      "args": ["--mcp"],
      "env": {
        "HF_ENDPOINT": "https://hf-mirror.com"
      }
    }
  }
}

Prompts to try

Prompts for using PDF Math Translate through an MCP client to automate scientific paper translation.

- "Translate the PDF at /home/user/papers/attention_is_all_you_need.pdf from English to Chinese, preserving the equations"
- "Translate this paper to Japanese using DeepL and produce a bilingual side-by-side PDF output"
- "Batch translate all PDF files in the /papers folder from English to Korean"
- "Translate this arxiv paper to French, keeping all LaTeX math formatting intact"

Troubleshooting PDF Math Translate

AI model download fails or is very slow during first run

pdf2zh downloads layout detection models from HuggingFace on first use. If you are in a region with restricted HuggingFace access, set HF_ENDPOINT=https://hf-mirror.com in your environment before running pdf2zh.

Translated PDF has garbled characters or missing math formulas

Ensure you are using Python 3.12 as recommended. Some font rendering issues occur with older Python versions. Also verify your PDF is not a scanned image — pdf2zh requires text-based (searchable) PDFs to preserve formula structure.

MCP server fails to start because 'pdf2zh' command is not found

When installed via 'uv tool install', the binary is placed in the uv tools bin directory. Run 'uv tool list' to confirm the install, then add the uv tools bin directory to your PATH, or use the full absolute path in the MCP client args field.

Frequently Asked Questions about PDF Math Translate

What is PDF Math Translate?

PDF Math Translate is a Model Context Protocol (MCP) server that [emnlp 2025 demo] pdf scientific paper translation with preserved formats - 基于 ai 完整保留排版的 pdf 文档全文双语翻译,支持 google/deepl/ollama/openai 等服务,提供 cli/gui/mcp/docker/zotero It connects AI assistants to external tools and data sources through a standardized interface.

How do I install PDF Math Translate?

Follow the installation instructions on the PDF Math Translate GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with PDF Math Translate?

PDF Math Translate works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is PDF Math Translate free to use?

Yes, PDF Math Translate is open source and available under the AGPL-3.0 license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "pdfmathtranslate": { "command": "npx", "args": ["-y", "pdfmathtranslate"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use PDF Math Translate?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides