Huoshui Pdf Translator

io.github.huoshuiai42由 GitHub 账号 huoshuiai42 发布v1.0.0更新于 Oct 24, 2026

An MCP server that provides PDF translation service

已验证STDIO仅桌面文件与存储AI 与机器学习

概览

AI 生成的概览

一个本地 MCP 服务器,用于翻译 PDF 文档,尤其擅长保留公式与版式的学术论文。

可以做什么
翻译 PDF 文件,可指定输出路径,生成双语版和译文版并保留公式与版式。读取 PDF 信息,返回路径、大小和页数。检查底层翻译工具是否已安装及其版本与状态。提前下载所需字体和模型,避免首次翻译超时。
适用场景
适合让助手翻译 PDF,尤其是含公式的中英文学术或技术论文,并希望保留原始排版。最适用于文件与助手位于同一台桌面电脑的场景。
运行要求
以 Python 包形式在桌面机器本地运行(例如通过 uvx、pipx 或 uv tool)。至少首次下载字体和模型(约 50MB)时需要网络访问。缺少底层 pdf2zh-next 工具时会自动安装。PDF 大小上限为 200MB。
安装前请注意
它会读取你提供的路径下的 PDF 并向磁盘写入翻译后的文件,请只指向愿意处理的文档。它可能自动安装 pdf2zh-next 包并从网络下载模型和字体。翻译质量及底层翻译引擎发送的数据取决于该引擎的配置。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Huoshui Pdf Translator,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Huoshui PDF Translator

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.

🌟 Features

Core Translation Capabilities

  • 📚 Academic Papers: Excellent handling of mathematical formulas and equations
  • 🔬 Technical Documents: Preserves formatting and technical terminology
  • 🌐 Multi-language Support: Auto-detection with Chinese ↔ English specialization
  • 🎨 Layout Preservation: Maintains original PDF structure and formatting

Smart Assistant Features

  • 🧠 Context-Aware Prompts: Multiple specialized prompts for different scenarios
  • 🛠️ Tool Status Checking: Verify translation tool installation and availability
  • 📊 PDF Analysis: Get detailed information about PDF files before translation
  • 🔍 Flexible Path Handling: Support for both absolute and relative file paths
  • ⚡ Progress Reporting: Real-time progress updates during translation
  • 🚨 Intelligent Error Handling: Comprehensive error diagnosis and troubleshooting

MCP Features

  • 📋 Resources: Translation capability listings and PDF file information
  • 🎯 Tools: Translation, PDF analysis, and tool status checking
  • 💬 Prompts: Role definitions, path guidance, options explanation, and error troubleshooting
  • 🔒 Security: Safe path validation with system directory protection

🚀 Quick Start

Installation

From MCP Registry (Recommended)

This server is available in the Model Context Protocol Registry. Install it using your MCP client.

mcp-name: io.github.huoshuiai42/huoshui-pdf-translator

Using uvx
bash
uvx huoshui-pdf-translator

Claude Desktop Setup

Add this to your Claude Desktop MCP configuration:

json
{  "mcpServers": {    "huoshui-pdf-translator": {      "command": "uvx",      "args": ["huoshui-pdf-translator"]    }  }}

Alternative Installation Methods

Via pipx:

bash
pipx install huoshui-pdf-translator

Via UV tools:

bash
uv tool install huoshui-pdf-translator

Claude Desktop config for UV tools:

json
{  "mcpServers": {    "huoshui-pdf-translator": {      "command": "uv",      "args": ["tool", "run", "huoshui-pdf-translator"]    }  }}

📖 Usage

First-Time Setup

  1. Warm up (downloads fonts/models): Use warm_up_translator tool
  2. Check status: Use check_translation_tool tool
  3. Translate: Use translate_pdf tool with your PDF path

MCP Tools

translate_pdf

Translates PDF documents while preserving mathematical formulas and layout.

python
# Basic usagetranslate_pdf(pdf_path="Desktop/paper.pdf")
# With custom output pathtranslate_pdf(    pdf_path="Documents/research.pdf",    output_path="Documents/translated/research_cn.pdf")
pdf_get

Retrieves detailed information about a PDF file.

python
pdf_info = pdf_get(path="Desktop/document.pdf")# Returns: PDFResource with path, size_bytes, page_count
warm_up_translator

Downloads required assets and models. Run this first to avoid timeouts.

python
warm_up_translator()# Downloads fonts and models (~50MB) for faster subsequent translations
check_translation_tool

Verifies PDFMathTranslate-next installation and status.

python
status = check_translation_tool()# Returns: status, version, message

MCP Prompts

  • role_and_rules: Core identity and operational rules
  • explain_pdf_paths: Help with file path specifications
  • explain_translation_options: Available options and best practices
  • troubleshoot_translation_error: Error diagnosis and solutions
  • explain_translation_result: Result explanation and next steps

File Path Examples

The assistant supports flexible path specifications:

bash
# Absolute paths/Users/john/Desktop/research.pdfC:\Users\John\Documents\paper.pdf
# Relative to home directoryDesktop/research.pdfDocuments/papers/study.pdf
# Simple filenames (assumes home directory)paper.pdf

🎯 Translation Workflow

  1. Install: uvx huoshui-pdf-translator
  2. Setup Claude Desktop: Add MCP configuration
  3. Warm up: Run warm_up_translator tool (first time only)
  4. Translate: Use translate_pdf with your PDF path
  5. Review: Two files created (dual-language and Chinese-only)

⚡ Performance

  • First translation: 2-5 minutes (downloads fonts/models)
  • Subsequent translations: 30-60 seconds
  • File size limit: 200MB maximum
  • Cache size: ~50MB for fonts and models

🔍 Troubleshooting

Common Issues

Translation Tool Not Available

The tool automatically installs pdf2zh-next when needed. If issues occur:

bash
# Check status# Use check_translation_tool in Claude Desktop
# Manual install if neededpip install pdf2zh-next
First Translation Timeout
bash
# Run warmup first# Use warm_up_translator tool in Claude Desktop
PDF File Not Found
  • Verify file path is correct
  • Use absolute paths for clarity
  • Check file hasn't been moved or deleted
Network Issues
  • Ensure internet connection (required for first-time font downloads)
  • Check firewall settings

Error Diagnosis

The assistant provides intelligent error diagnosis with specific solutions for:

  • File not found errors
  • Invalid PDF files
  • Translation tool issues
  • Network connectivity problems
  • File size limitations

🛠️ Development

For Developers

Install from source:

bash
git clone https://github.com/huoshuiai/huoshui-pdf-translator.gitcd huoshui-pdf-translatoruv syncuv run python -m huoshui_pdf_translator.main

Build and publish:

bash
uv builduv run twine upload dist/*

Project Structure

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

🔄 Updates

Update to latest version:

bash
uvx install --upgrade huoshui-pdf-translator# oruv tool upgrade huoshui-pdf-translator

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

🙏 Acknowledgments

  • PDFMathTranslate-next: Core translation engine
  • FastMCP: Framework for intelligent assistant capabilities
  • Anthropic: MCP protocol and ecosystem
  • UV & PyPI: Modern Python packaging and distribution

来源:README.md,提交 4681ece

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。