Wraps PDFMathTranslate-next to translate academic PDFs while preserving mathematical formulas and layout. Exposes three main tools: translate_pdf for converting documents between Chinese and English, pdf_get for inspecting file metadata like page count and size, and warm_up_translator to preload fonts and models before your first translation. The server handles relative and absolute paths, reports progress during translation, and generates both dual-language and target-language-only outputs. First run downloads about 50MB of assets, then translations run in under a minute for typical papers. Reach for this when you need to translate technical documents with equations without mangling the formatting or spending time configuring translation pipelines yourself.
Version: 0.1.0
Powered by: FastMCP & PDFMathTranslate-next
PyPI Package: huoshui-pdf-translator
An intelligent PDF translation assistant that specializes in academic papers with mathematical formulas. Built using the FastMCP framework and powered by PDFMathTranslate-next, it provides comprehensive translation capabilities with context-aware assistance.
This server is available in the Model Context Protocol Registry. Install it using your MCP client.
mcp-name: io.github.huoshuiai42/huoshui-pdf-translator
uvx huoshui-pdf-translator
Add this to your Claude Desktop MCP configuration:
{
"mcpServers": {
"huoshui-pdf-translator": {
"command": "uvx",
"args": ["huoshui-pdf-translator"]
}
}
}
Via pipx:
pipx install huoshui-pdf-translator
Via UV tools:
uv tool install huoshui-pdf-translator
Claude Desktop config for UV tools:
{
"mcpServers": {
"huoshui-pdf-translator": {
"command": "uv",
"args": ["tool", "run", "huoshui-pdf-translator"]
}
}
}
warm_up_translator toolcheck_translation_tool tooltranslate_pdf tool with your PDF pathtranslate_pdfTranslates PDF documents while preserving mathematical formulas and layout.
# Basic usage
translate_pdf(pdf_path="Desktop/paper.pdf")
# With custom output path
translate_pdf(
pdf_path="Documents/research.pdf",
output_path="Documents/translated/research_cn.pdf"
)
pdf_getRetrieves detailed information about a PDF file.
pdf_info = pdf_get(path="Desktop/document.pdf")
# Returns: PDFResource with path, size_bytes, page_count
warm_up_translatorDownloads required assets and models. Run this first to avoid timeouts.
warm_up_translator()
# Downloads fonts and models (~50MB) for faster subsequent translations
check_translation_toolVerifies PDFMathTranslate-next installation and status.
status = check_translation_tool()
# Returns: status, version, message
role_and_rules: Core identity and operational rulesexplain_pdf_paths: Help with file path specificationsexplain_translation_options: Available options and best practicestroubleshoot_translation_error: Error diagnosis and solutionsexplain_translation_result: Result explanation and next stepsThe assistant supports flexible path specifications:
# Absolute paths
/Users/john/Desktop/research.pdf
C:\Users\John\Documents\paper.pdf
# Relative to home directory
Desktop/research.pdf
Documents/papers/study.pdf
# Simple filenames (assumes home directory)
paper.pdf
uvx huoshui-pdf-translatorwarm_up_translator tool (first time only)translate_pdf with your PDF pathThe tool automatically installs pdf2zh-next when needed. If issues occur:
# Check status
# Use check_translation_tool in Claude Desktop
# Manual install if needed
pip install pdf2zh-next
# Run warmup first
# Use warm_up_translator tool in Claude Desktop
The assistant provides intelligent error diagnosis with specific solutions for:
Install from source:
git clone https://github.com/huoshuiai/huoshui-pdf-translator.git
cd huoshui-pdf-translator
uv sync
uv run python -m huoshui_pdf_translator.main
Build and publish:
uv build
uv run twine upload dist/*
huoshui-pdf-translator/
├── huoshui_pdf_translator/
│ ├── __init__.py # Package metadata
│ └── main.py # FastMCP server implementation
├── pyproject.toml # Package configuration
├── README.md # This file
└── LICENSE # Apache-2.0 license
Update to latest version:
uvx install --upgrade huoshui-pdf-translator
# or
uv tool upgrade huoshui-pdf-translator
Contributions are welcome! Please:
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
csoai-org/pdf-document-mcp
xt765/mcp-document-converter
io.github.xjtlumedia/markdown-formatter
io.github.ai-aviate/better-notion
suekou/mcp-notion-server
meterlong/mcp-doc