io.github.jolucashornung/live-translate-mcp

السجل الرسمي الوسائط والتصميم

MCP server for local speech translation (EN ↔ 中文) via Whisper + Claude + Piper

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package live-translate-mcp
Claude Code
claude mcp add live-translate-mcp -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- npx -y live-translate-mcp@0.1.5
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "live-translate-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "live-translate-mcp@0.1.5"
            ],
            "env": {
                "ANTHROPIC_API_KEY": "<your anthropic_api_key>"
            }
        }
    }
}

متغيرات البيئة

  • ANTHROPIC_API_KEY إلزامي سري Your Anthropic API key

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. live-translate-mcp
  2. What it does
  3. Tools
  4. Installation
  5. Claude Desktop setup
  6. Claude Code setup
  7. Usage examples
  8. Supported languages
  9. How it compares
  10. Environment variables
  11. Related
  12. Licence

live-translate-mcp

Real-time English ↔ Mandarin speech translation for Claude — powered by Whisper, Claude AI, and Piper TTS.

Give Claude the ability to listen, translate, and speak. live-translate-mcp is a Model Context Protocol (MCP) server that adds speech translation as a native tool inside Claude Desktop and Claude Code. Hand it an audio file, and it transcribes, translates, synthesises, and plays the result — entirely on your machine, with Claude handling the translation.


What it does

StepTechnologyWhere it runs
Speech → TextOpenAI Whisper (via @huggingface/transformers)Local
Text → TranslationClaude (Opus 4.8)Anthropic API
Translation → SpeechPiper TTS (ONNX)Local

Audio never leaves your machine except for the translated text sent to the Claude API. ASR and TTS run fully on-device.


Tools

translate_file

Translate a WAV audio file. Pass an absolute path — the server transcribes it, translates the text via Claude, synthesises speech, saves <name>_translated.wav next to the original, and plays it automatically.

Translate /Users/alice/meeting_clip.wav

Returns: original text, translation, and the path to the saved output file.

translate_speech

Translate raw audio passed as a base64-encoded WAV string. Returns the transcription, translation, and synthesised audio as base64 WAV — useful for programmatic workflows.

health_check

Verify that all dependencies (Whisper model cache, Piper voice files, espeak-ng) are present and ready before making a translation request.


Installation

No installation required. Run it directly with npx:

npx -y live-translate-mcp

Or install globally:

npm install -g live-translate-mcp

Prerequisites:

  • Node.js 18+
  • An Anthropic API key
  • espeak-ng — for TTS phonemisation (brew install espeak-ng on macOS, apt install espeak-ng on Linux)

The Whisper model (~150 MB) and Piper voice models (~200 MB) download automatically on first use and are cached in ~/.live-translate/.


Claude Desktop setup

Add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "live-translate": {
      "command": "npx",
      "args": ["-y", "live-translate-mcp"],
      "env": {
        "ANTHROPIC_API_KEY": "your-api-key-here"
      }
    }
  }
}

Restart Claude Desktop. You'll see live-translate appear in the tools panel.


Claude Code setup

claude mcp add live-translate -- npx -y live-translate-mcp

Then set your API key in the environment before starting Claude Code, or pass it via the MCP env config.


Usage examples

Once configured, just ask Claude naturally:

"Translate this audio file for me: /Users/alice/recording.wav"

"Use translate_file on /tmp/interview.wav"

"Check if live-translate is ready"

Claude will call the appropriate tool automatically.


Supported languages

LanguageASRTranslationTTS
English✓✓✓
Mandarin Chinese (普通话)✓✓✓

Language is detected automatically from the audio — no need to specify it.


How it compares

live-translate-mcpCloud speech APIs
ASRLocal (Whisper)Remote
TranslationClaude APIRemote
TTSLocal (Piper)Remote
Audio privacyAudio stays on deviceAudio uploaded
CostClaude API onlyPer-minute pricing
OfflinePartially (ASR + TTS)No

Environment variables

VariableDefaultDescription
ANTHROPIC_API_KEY—Required. Your Anthropic API key.
PIPER_VOICE_DIR~/.live-translate/voicesPath to Piper .onnx voice files.

  • live-translate — the standalone CLI for push-to-talk translation with no API key required, using local models end-to-end.
  • Model Context Protocol — the open standard this server implements.
  • Piper TTS — the local TTS engine powering speech synthesis.

Licence

MIT

الأسئلة الشائعة

ما هو io.github.jolucashornung/live-translate-mcp؟

MCP server for local speech translation (EN ↔ 中文) via Whisper + Claude + Piper

كيف أثبّت io.github.jolucashornung/live-translate-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add live-translate-mcp -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- npx -y live-translate-mcp@0.1.5. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.jolucashornung/live-translate-mcp إلى مفتاح API؟

نعم. يتطلب ANTHROPIC_API_KEY، وتضبطها في إعداداته.

هل io.github.jolucashornung/live-translate-mcp مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.jolucashornung/live-translate-mcp؟

ينشره waxberry-dev. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.