Translationx Mcp Server

Translationx Mcp Server

By Deep-Intelligent-Pharma GitHub

MCP Server for Translationx

Overview

What is TranslationX MCP Server?

TranslationX MCP Server is a Python-based server designed for managing translation tasks using the Model Context Protocol (MCP). It allows users to set up a virtual environment and run translation services efficiently.

How to use TranslationX MCP Server?

To use the TranslationX MCP Server, you need to set up a Python virtual environment using uv, install the necessary dependencies, and configure your local project to run the MCP server.

Key features of TranslationX MCP Server?

  • Easy setup of a Python virtual environment using uv.
  • Support for managing translation tasks through MCP.
  • Ability to run and test the server locally.

Use cases of TranslationX MCP Server?

  1. Managing translation workflows in software development.
  2. Integrating translation services into applications.
  3. Testing and validating translation processes in a controlled environment.

FAQ from TranslationX MCP Server?

  • What is the minimum Python version required?

The minimum required Python version is 3.13.

  • How do I verify if the MCP dependencies are installed successfully?

You can run the command uv run mcp to check for successful installation.

  • Can I use other methods to create a Python virtual environment?

Yes, you can also use tools like Anaconda to create your virtual environment.

Content

TranslationX MCP Server (Python)

搭建Python虚拟环境

我们推荐通过uv构建虚拟环境来运行MCP server,关于`uv你可以在这里找到一些说明。

按照官方流程,你会安装Python包管理工具uv。除此之外,你也可以尝试其他方法(如Anaconda)来创建你的Python虚拟环境。

通过uv添加mcp依赖

uv add "mcp[cli]"

验证mcp依赖是否安装成功,执行如下命令

uv run mcp

当出现下图时代表安装成功

通过uv安装python,最低版本要求为3.13

uv python install 3.13

获取 MCP Server

前往TranslationX Mcp Server 官方开源仓库下载

配置本地项目

通过uv创建一个项目

uv init mcp_server_translation

src文件夹拷贝到该目录下,通过如下命令测试mcp server是否正常运行

uv run --with mcp[cli] mcp run {YOUR_PATH}/src/main.py
# 如果是mac,需要加转义符
uv run --with mcp\[cli\] mcp run {YOUR_PATH}/src/main.py

如果没有报错则MCP Server启动成功

在Cursor中使用

打开Cursor配置,在MCP中添加MCP Server

在文件中添加如下内容后保存, TRANSLATIONX_TOKEN 可以在X-DOC中获取

{
  "mcpServers": {
    "translationx": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "{YOUR_PATH}/src/main.py"
      ],
      "env": {
        "token": "<YOUR_TRANSLATIONX_TOKEN>"
      }
    }
  }
}

回到配置,此时TranslationX MCP Server已经启用

测试

创建项目,并创建文件夹,然后文件到文件夹中,并提交翻译:

No tools information available.
No content found.