Skip to main content

MCP server for translating Markdown to Chinese via DeepSeek

Project description

deepseek-translate MCP Server

将 Markdown 文本翻译为中文的 MCP server,基于 DeepSeek API。

安装

uv sync

运行

uv run deepseek-translate-server
# 或安装后
uvx deepseek-translate-server

环境变量

  • DEEPSEEK_API_KEY:必需,DeepSeek API key。

uvx 启动时不会自动加载 pdf2md 目录下的 .env。需要在 MCP host 配置里通过 env 传入,或在启动 server 的 shell 环境中 export。

工具

translate_md

翻译单段 Markdown 文本或单个文件。

参数:

  • text: Markdown 文本(与 file_path 二选一)
  • file_path: 本地 Markdown 文件路径(与 text 二选一)
  • model: DeepSeek 模型,默认 deepseek-v4-flash
  • temperature: 采样温度,默认 0.3
  • thinking: 是否开启 reasoning,默认 False

返回:翻译后的 Markdown 文本。

translate_md_dir

并发翻译目录下所有 Markdown 文件。

参数:

  • dir_path: 目录路径
  • pattern: 文件匹配模式,默认 *.md
  • model: DeepSeek 模型,默认 deepseek-v4-flash
  • temperature: 采样温度,默认 0.3
  • thinking: 是否开启 reasoning,默认 False
  • concurrency: 最大并发数,默认 10

行为:

  • 优先翻译 dir_path/pages/ 下的文件;若不存在则翻译 dir_path 根目录文件
  • 对每个匹配文件生成 {stem}_trans.md,放在与源文件相同目录
  • 按文件名排序合并为 dir_path/full_trans.md
  • 返回合并后的文件路径

接入 MCP Host

{
  "mcpServers": {
    "deepseek-translate": {
      "command": "uvx",
      "args": ["deepseek-translate-server"],
      "env": {
        "DEEPSEEK_API_KEY": "your-api-key"
      }
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepseek_translate_server-0.1.2.tar.gz (62.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepseek_translate_server-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file deepseek_translate_server-0.1.2.tar.gz.

File metadata

  • Download URL: deepseek_translate_server-0.1.2.tar.gz
  • Upload date:
  • Size: 62.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for deepseek_translate_server-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a409330ab593f563994376750bd9140b98b025978ca2b0837d91a752152589bd
MD5 57e40c1716abccbd2328a7c33f86d3d1
BLAKE2b-256 57a93073fbc2ed6915a69b8ecfe0a7442cc85c578ff23ddbf712d38ec74207d7

See more details on using hashes here.

File details

Details for the file deepseek_translate_server-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: deepseek_translate_server-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for deepseek_translate_server-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3917b6d99b64a45f0ee164f8c170c11523d5c83e080fa0365679847d638b1965
MD5 a8dbec54ab19f91081e3c1abc8996512
BLAKE2b-256 0e672daaac1e36f7b5e1d9de818887ef4a8300ea64ac3e457854d41784c7f311

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page