基于小牛翻译 API 提供文本翻译工具和语种目录,覆盖多种小语种翻译方向。
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add a36c86 --env NIUTRANS_API_KEY='<NIUTRANS_API_KEY>' -- uv tool run mcp-translation-text~/.codex/config.toml
[mcp_servers.a36c86]
command = "uv"
args = ["tool", "run", "mcp-translation-text"]
env = { NIUTRANS_API_KEY = "<NIUTRANS_API_KEY>" }
# codex mcp add a36c86 --env NIUTRANS_API_KEY='<NIUTRANS_API_KEY>' -- uv tool run mcp-translation-text~/.cursor/mcp.json
{
"mcpServers": {
"a36c86": {
"command": "uv",
"args": [
"tool",
"run",
"mcp-translation-text"
],
"env": {
"NIUTRANS_API_KEY": "<NIUTRANS_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"a36c86": {
"type": "stdio",
"command": "uv",
"args": [
"tool",
"run",
"mcp-translation-text"
],
"env": {
"NIUTRANS_API_KEY": "<NIUTRANS_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"a36c86": {
"command": "uv",
"args": [
"tool",
"run",
"mcp-translation-text"
],
"env": {
"NIUTRANS_API_KEY": "<NIUTRANS_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"a36c86": {
"command": "uv",
"args": [
"tool",
"run",
"mcp-translation-text"
],
"env": {
"NIUTRANS_API_KEY": "<NIUTRANS_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"a36c86": {
"command": "uv",
"args": [
"tool",
"run",
"mcp-translation-text"
],
"env": {
"NIUTRANS_API_KEY": "<NIUTRANS_API_KEY>"
}
}
}
}Environment variables
NIUTRANS_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.