translator-mcp

miwidot/translator-mcp
0 starsCommunity

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables AI to translate database content from English to German directly in a live database with read-only and column-whitelisted security.

README.md

Translation MCP Server

A secure MCP server that allows AI to translate database content from English to German directly in your live database.

📚 Full Documentation - Complete guide with architecture, security details, and deployment instructions

Security Features

  • Read-only by default: Only SELECT and UPDATE permissions on specific columns
  • No DELETE permissions: Cannot remove any data
  • Column whitelisting: Only specified German columns can be updated
  • Audit logging: All translations are logged with timestamps and session IDs
  • Connection pooling: Limited concurrent connections to prevent overload
  • Input validation: All inputs are validated with Zod schemas
  • Transaction support: Bulk updates use transactions for data integrity

Setup

1. Database Setup

Run the SQL script to create a restricted user:

mysql -u root -p < database-setup.sql

2. Install Dependencies

npm install

3. Configure Environment

Copy .env.example to .env and update with your database credentials:

cp .env.example .env

4. Build the Server

npm run build

5. Configure MCP Client

Add to your MCP client settings (e.g., Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "translation-server": {
      "command": "node",
      "args": ["/absolute/path/to/translatemcp/dist/index.js"],
      "env": {
        "DB_HOST": "your-server.com",
        "DB_USER": "mcp_translator",
        "DB_PASSWORD": "secure_password",
        "DB_NAME": "your_database",
        "ALLOWED_TABLES": "{...your config...}"
      }
    }
  }
}

Usage with AI

Once configured, AI can use these tools:

  1. get_translation_items: Fetch items needing translation
  2. update_translation: Update a single item's German translations
  3. bulk_update_translations: Update multiple items in one transaction
  4. get_translation_progress: Check translation statistics

Example AI conversation: `` You: "Please translate the first 10 products from English to German" AI: [Uses get_translation_items to fetch products] AI: [Translates each item] AI: [Uses bulk_update_translations to save all translations] ``

Documentation

Monitoring

Check translation audit logs:

SELECT * FROM translation_audit 
WHERE translated_at > DATE_SUB(NOW(), INTERVAL 1 DAY)
ORDER BY translated_at DESC;

Check translation progress:

SELECT table_name, COUNT(DISTINCT record_id) as records_translated
FROM translation_audit
GROUP BY table_name;

Related MCP servers

Browse all →