Translationx-mcp-server
TranslationX MCP Server is an MCP server built in Python, facilitating the setup of virtual environments and dependency management. It particularly allows for easy setup using uv, enabling smooth startup and testing of the MCP server. This efficiency helps developers progress their work effectively.
GitHub Stars
4
User Rating
Not Rated
Favorites
0
Views
62
Forks
0
Issues
0
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已经启用

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


