Kokoro Text to Speech MCP Server
Kokoro テキスト読み上げ (TTS) MCP サーバー
S3 にアップロードするオプションを備えた .mp3 ファイルを生成する Kokoro Text to Speech MCP サーバー。
使用場所: https://huggingface.co/spaces/hexgrad/Kokoro-TTS
Related MCP server: Speech MCP Server
構成
ローカルリポジトリにクローンします。
kokoro-v1.0.onnxとvoices-v1.0.binのKokoro Onnx Weightsをダウンロードし、同じリポジトリに保存します。
MCP 設定に以下を追加してください。ご自身の値に更新してください。
"kokoro-tts-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/toyourlocal/kokoro-tts-mcp",
"run",
"mcp-tts.py"
],
"env": {
"TTS_VOICE": "af_heart",
"TTS_SPEED": "1.0",
"TTS_LANGUAGE": "en-us",
"AWS_ACCESS_KEY_ID": "",
"AWS_SECRET_ACCESS_KEY": "",
"AWS_REGION": "us-east-1",
"AWS_S3_FOLDER": "mp3",
"S3_ENABLED": "true",
"MP3_FOLDER": "/path/to/mp3"
}
}ffmmegをインストールする
これは.wavファイルを.mp3ファイルに変換するために必要です
Macの場合:
brew install ffmpegローカルで実行するには、これらを.envファイルに追加してください。env.exampleを参照し、.envにコピーして、ご自身の値に変更してください。
サポートされている環境変数
AWS_ACCESS_KEY_ID: AWSアクセスキーIDAWS_SECRET_ACCESS_KEY: AWSシークレットアクセスキーAWS_S3_BUCKET_NAME: S3バケット名AWS_S3_REGION: S3リージョン(例:us-east-1)AWS_S3_FOLDER: S3バケット内のフォルダパスAWS_S3_ENDPOINT_URL: S3互換ストレージのオプションのカスタムエンドポイントURLMCP_HOST: サーバーをバインドするホスト (デフォルト: 0.0.0.0)MCP_PORT: リッスンするポート (デフォルト: 9876)MCP_CLIENT_HOST: サーバーへのクライアント接続のホスト名 (デフォルト: localhost)DEBUG: デバッグモードを有効にする(「true」または「1」に設定)S3_ENABLED: S3アップロードを有効にする(「true」または「1」に設定)MP3_FOLDER: MP3ファイルを保存するパス(デフォルトはスクリプトディレクトリ内の「mp3」フォルダ)MP3_RETENTION_DAYS: MP3ファイルを自動的に削除するまで保存する日数DELETE_LOCAL_AFTER_S3_UPLOAD: S3アップロードが成功した後にローカルのMP3ファイルを削除するかどうか(「true」または「1」に設定)TTS_VOICE: TTSクライアントのデフォルトの音声(デフォルト: af_heart)TTS_SPEED: TTSクライアントのデフォルト速度(デフォルト: 1.0)TTS_LANGUAGE: TTSクライアントのデフォルト言語(デフォルト: en-us)
ローカルでサーバーを実行する
推奨される方法はUVを使用する
uv run mcp-tts.pyTTSクライアントの使用
mcp_client.pyスクリプトを使用すると、TTS リクエストをサーバーに送信できます。使い方は以下です。
接続設定
サーバーとクライアントを同じマシン上で実行する場合:
サーバーは
0.0.0.0(すべてのインターフェース) または127.0.0.1(ローカルホストのみ) にバインドする必要がありますクライアントは
localhostまたは127.0.0.1に接続する必要があります
基本的な使い方
python mcp_client.py --text "Hello, world!"ファイルからテキストを読み込む
python mcp_client.py --file my_text.txt音声と速度のカスタマイズ
python mcp_client.py --text "Hello, world!" --voice "en_female" --speed 1.2S3アップロードを無効にする
python mcp_client.py --text "Hello, world!" --no-s3コマンドラインオプション
python mcp_client.py --helpMP3ファイル管理
TTSサーバーはMP3ファイルを生成し、ローカルに保存するか、オプションでS3にアップロードします。これらのファイルの管理方法を設定できます。
ローカルストレージ
.envファイルでMP3_FOLDERを設定して、MP3ファイルが保存される場所を指定します。ファイルは自動的に削除されない限りこのフォルダに保存されます
自動クリーンアップ
MP3_RETENTION_DAYS=30(または任意の数字)を設定すると、その日数より古いファイルが自動的に削除されます。DELETE_LOCAL_AFTER_S3_UPLOAD=trueを設定すると、S3 アップロードが成功した直後にローカルファイルを削除します。
S3統合
S3_ENABLED=trueまたはDISABLE_S3=trueで S3 アップロードを有効/無効にする.envファイルで AWS 認証情報とバケット設定を構成するS3アップロードはクライアントの
--no-s3オプションを使用してリクエストごとに無効にすることができます。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Flicense-qualityDmaintenanceA server providing text-to-speech and speech-to-text functionalities using Windows' native speech services without external dependencies.6
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides text-to-speech capabilities using the Kokoro TTS model, offering multiple voice options and customizable speech parameters.4311MIT
- Alicense-qualityCmaintenanceA text-to-speech MCP server with 48 voices across 9 languages, supporting emotion spans, SFX tags, and multi-speaker dialogue. Deployable via a single npx command with built-in guardrails and swappable backends.MIT
- Alicense-qualityDmaintenanceAn OpenAI-compatible text-to-speech API server that enables voice cloning, long-form generation, and can be used as a Claude Code tool for speech synthesis.MIT
Related MCP Connectors
MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)
Hosted pay-per-use TTS: 54 neural voices, 9 languages incl. Brazilian Portuguese. $10 free credits.
AI-manageable audio CDN: upload, transcode, normalize, stream & deliver audio, plus grounded docs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mberg/kokoro-tts-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server