Textra Japanese to English Translator
Translates Japanese text into English using the Textra API service, enabling LLMs with limited Japanese understanding to process Japanese instructions.
README
Textra Japanese to English Translator MCP Server
Overview
This project provides a Model Context Protocol (MCP) server that translates Japanese text into English using the textra translation API service.
It is particularly useful for interacting with LLMs that have limited Japanese language understanding. By routing Japanese instructions through this MCP server, the input can be translated into English before being passed to the LLM.
This server is built using the fastmcp framework.
Setup
-
Clone the repository:
git clone <repository_url> cd <repository_directory> -
Create and activate a virtual environment:
uv venv source .venv/bin/activate(On Windows, use
.venv\Scripts\activate) -
Install dependencies: Install the necessary libraries for running the project and for development/testing.
# Install runtime dependencies only uv pip install . # Install runtime and development/testing dependencies uv pip install '.[dev]'(Dependencies are installed based on
pyproject.toml.) -
Set Environment Variables: This server requires the following environment variables to be set with your Textra API credentials:
TEXTRA_API_KEY: Your Textra API Key.TEXTRA_API_SECRET: Your Textra API Secret.TEXTRA_USER_NAME: Your Textra Login ID.
It is strongly recommended to set these variables in your shell's configuration file (e.g.,
~/.bashrc,~/.zshrc,~/.config/fish/config.fish) rather than using a.envfile. This ensures the variables are available when the MCP server is run by client applications.Example for
.zshrcor.bashrc:export TEXTRA_API_KEY="your_api_key" export TEXTRA_API_SECRET="your_api_secret" export TEXTRA_USER_NAME="your_username"Remember to source the file (e.g.,
source ~/.zshrc) or restart your shell after adding these lines.Optional Variables:
TEXTRA_JA_EN_API_URL: Overrides the default translation API endpoint.TEXTRA_TOKEN_URL: Overrides the default OAuth token endpoint.
(See
.env.examplefor variable names and default values. While using a.envfile is possible for local development, especially withfastmcp dev, setting system-wide environment variables is more robust for MCP server deployment.)
Running Tests
Ensure your virtual environment is activated.
pytest
or
uv run test
Usage
Ensure your virtual environment is activated and the required environment variables (TEXTRA_API_KEY, TEXTRA_API_SECRET, TEXTRA_USER_NAME) are correctly set in your shell environment.
Running the Server Locally
There are two main ways to run the server locally:
-
Using
fastmcp dev(Recommended for development): This command provides features like auto-reloading on code changes.fastmcp dev server.py -
Using
uvx: This command runs the server script directly within a temporary environment managed byuv, installing dependencies as needed. It's useful for quick execution without installation.uvx python server.py
Both commands will start the server, listening for MCP connections via stdio by default. You can then connect to it using an MCP client like the MCP Inspector.
- Using
uvxdirectly from GitHub (Requiresuvinstalled): You can run the server directly from the GitHub repository without cloning it first. This is useful for integrating with MCP clients that support custom commands.uvxwill handle fetching the code and installing dependencies in a temporary environment.
Note: This method might take longer to start initially compared to running from a local clone.uvx python server.py --git https://github.com/hokupod/textra-ja-to-en-mcp.git
Installing the Server for MCP Clients (e.g., Claude Desktop)
Use the fastmcp install command to make the server available to MCP client applications on your system.
fastmcp install server.py --name "Japanese to English Translator"
After installation, MCP clients like Claude Desktop should be able to discover and use the "Japanese to English Translator" tool.
Alternatively, if your MCP client supports defining servers via commands (like Claude Desktop's mcp_servers.json), you can configure it to run the server directly from GitHub using uvx:
{
"mcpServers": {
"textra-translator": {
"command": "uvx",
"args": [
"python",
"server.py",
"--git", "https://github.com/hokupod/textra-ja-to-en-mcp.git"
// Optionally specify a branch or commit:
// "--git", "https://github.com/hokupod/textra-ja-to-en-mcp.git#main"
]
}
}
}
(Ensure uv is installed and accessible in the client's environment.)
When interacting with an LLM through such a client, if you provide input in Japanese, the LLM (if configured to use this tool appropriately based on its description) should automatically invoke this server to translate the text to English before processing the request further. The translated English text will then be treated as the user's original request.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。