Text Translation

Provides text translation via NiuTrans API and language catalog for MCP clients.
  • python

4

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "niutrans-mcp-texttranslation": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "mcp-translation-text"
      ],
      "env": {
        "NIUTRANS_API_KEY": "YOUR_NIUTRANS_API_KEY"
      }
    }
  }
}

This MCP server provides translation capabilities powered by the NiuTrans API. It exposes a text translation tool and a language catalog that you can reference from MCP clients to translate content and map language codes to human-friendly names.

How to use

You access the translation features by loading the MCP provider into your client and invoking the translate_text tool. First, ensure you have an MCP client that can load and call tools from MCP servers. Then reference language://catalog to map language names to codes before calling translate_text. The translate_text tool returns both the translated text and the original input, along with the source and target language codes.

How to install

Prerequisites: you need Python installed on your machine, and you should have the UV tool available for MCP providers.

Install the MCP provider runtime via the UV tool and install the translation provider package.

uv tool install mcp-translation-text

Configuration and usage notes

Set your NiuTrans API key as an environment variable before starting the provider. This key authorizes calls to the translation API.

Create your MCP configuration to expose the translation provider via a local stdio server using the provided command and environment variable mapping.

{
  "mcpServers": {
    "translation": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "tool",
        "run",
        "mcp-translation-text"
      ],
      "env": {
        "NIUTRANS_API_KEY": "${env.NIUTRANS_API_KEY}"
      }
    }
  }
}

Tools and resources you will use

  • translate_text: translates a given piece of text from a source language to a target language. You pass the text, source language code or alias, and target language code or alias.

  • language://catalog: provides available languages and their aliases so you can map language names to codes before translation.

Available tools

translate_text

Translates input text from a source language to a target language, returning source/target codes and both original and translated text.

language_catalog

Provides a catalog of available languages and aliases to map human-friendly language names to codes.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational