Integrates with LM Studio and other OpenAI-compatible API servers to translate SRT subtitle files from English to Japanese using local LLM models
translate-srt-mcp
SRT字幕ファイルを日本語に翻訳するMCPサーバー。LM Studioの翻訳モデルを使用して高品質な字幕翻訳を提供します。
主な機能
- SRT形式の完全サポート: タイムスタンプを保持したまま翻訳
- チャンクベース処理: 大きなファイルも効率的に処理
- LM Studio統合: ローカルLLMを使用した高品質な翻訳
- エラーハンドリング: 翻訳失敗時の自動リトライと詳細なエラー報告
- 統計情報: 翻訳履歴と使用状況の追跡
- 分析ツール: SRTファイルの検証と詳細分析
- 接続診断: LM Studioの状態確認機能
利用可能なツール
1. translate_srt
字幕を日本語に翻訳します。
2. analyze_srt
SRTファイルの統計情報を分析します。
3. check_lm_studio_status
LM Studioの接続状態を確認します。
4. preview_srt
字幕のプレビューを生成します。
5. get_server_info
サーバー情報と統計を取得します。
使用例
MCPクライアントでの実際の使用手順
必要要件
- Python 3.13以上
- LM Studio または OpenAI互換APIサーバー
- uv パッケージマネージャー(推奨)
インストール
方法1: uvx を使用(推奨・最も簡単)
インストール不要!mcp.jsonの設定だけで使用できます。
方法2: ローカルインストール
環境変数
Claude Codeでの設定例
To use this server with the Claude Desktop app, add the following configuration to the "MCP Servers" section of your Claude settings:
MCPクライアントでの使用時のベストプラクティス
- 使用前の準備
- LM Studioを起動し、適切なモデルをロード
check_lm_studio_status
で接続確認
- 大きなファイルの処理
analyze_srt
で事前にファイルサイズを確認- 適切な
chunk_size
を設定(500-2000を推奨)
- エラー対処
- 接続エラー: LM Studioの起動状態を確認
- モデルエラー: 正しいモデル名を指定
- 翻訳エラー: チャンクサイズを調整
- 品質向上のヒント
- 専門用語が多い場合は小さいチャンクサイズを使用
preserve_formatting=True
で元の改行を保持- 翻訳後に
preview_srt
で結果を確認
Development
Install dependencies:
For development with auto-reloading:
トラブルシューティング
LM Studioに接続できない
モデルが見つからない
翻訳が途中で止まる
- チャンクサイズを小さくする(例: 500)
- タイムアウト時���を増やす(translator.pyで設定)
ライセンス
MIT License
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables translation of SRT subtitle files from English to Japanese using local LLM servers like LM Studio. Parses SRT format files and returns translated subtitles in proper SRT format through OpenAI-compatible APIs.
Related MCP Servers
- -securityAlicense-qualityTranslates Japanese text into English using the Textra API service, enabling LLMs with limited Japanese understanding to process Japanese instructions.Last updated -MIT License
- -securityFlicense-qualityA server that enables real-time checking and automated correction suggestions for Japanese technical documents using textlint's linting capabilities.Last updated -1
- -securityFlicense-qualityEnables translation of JSON i18n files to multiple languages using various AI providers (Google Gemini, OpenAI, Ollama/DeepSeek) with intelligent caching and deduplication.Last updated -53
- -securityAlicense-qualityEnables AI models like Claude to easily access and utilize subtitle data from YouTube videos by extracting transcripts from video URLs with support for multiple languages.Last updated -1MIT License