Polyglot - Model Contexts Protocol for Translation
Polyglot is an open-source implementation of the Model Contexts Protocol (MCP) focused on translation services. It provides a standardized way to handle translation requests across multiple languages using Claude Sonnet 3.5.
Supported Languages
Arabic (ar)
Chinese (zh)
English (en)
French (fr)
Russian (ru)
Spanish (es)
Related MCP server: Lara Translate MCP Server
Features
Standardized translation request format
Support for multiple domains (legal, medical, general)
Formality level control (formal/informal)
Claude Sonnet 3.5 integration
MCP protocol server (via FastMCP)
API key authentication
Installation
Using uv (Recommended)
Using pip
Configuration
Create a
.envfile in your project root:
Make sure to keep your API key secure and never commit it to version control.
Running the MCP Server
To run the MCP server, use the following command:
This will start the server on the configured port (default: 8001).
Testing the MCP Server
You can test the MCP server using a simple client script. For example, to test the health check resource, create a file named test_client.py with the following content:
Run the test client with:
You should see the output: "Service is healthy".
Environment Variables
Make sure to set your Anthropic API key in a .env file in the project root:
Additional Notes
The server uses the Model Context Protocol (MCP) to expose tools and resources.
Ensure all dependencies are installed using
uvorpip.For more details, refer to the project documentation.
Protocol Specification
The translation request follows this JSON structure:
Development
To set up the development environment:
License
MIT License