About Voicevox MCP Server
Voicevox MCP Server uses Voicevox Engine to synthesize text as speech and play it, for users who want AI tools to read messages aloud. It provides synthesis and playback through MCP's JSON-RPC over stdio interface.
Key features
- 01Converts text to Audio Query
- 02Converts Audio Query to WAV
- 03Plays generated speech
- 04Configures Engine host, port, and speaker
Use cases
- 01Have AI tools read generated text aloud
- 02Synthesize speech with a local or remote Voicevox Engine
MCP support
The MCP server provides text-to-speech and playback tools, such as synthesizeAndPlay, to MCP clients over JSON-RPC via stdio. It connects to a running local or remote Voicevox Engine.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEVoicevox MCP Server
Model Context Protocol (MCP)に準拠したVoicevoxクライアントサーバー
概要
- このプロジェクトは、Voicevox Engineを利用して音声合成を行い、その結果を再生するMCPサーバーを提供します。CursorやClineなどのAIツールから呼び出し可能なエンドポイントを提供し、テキストを音声に変換して再生する機能を実現します。
- 注意)voicevoxのデフォルトの仕様ですが、英単語や全て英文字一字毎にアルファベットを発声します。回避するには、独自辞書を用意し登録する場合と、投入するテキストに単語をカタカナ化する方法の2通り存在します。
LLMにカタカナ語に自動変換を指示しても現時点では全ては上手くはいかないかと思います。独自辞書作成インタフェースは現時点では未実装です。
機能
- テキストから音声クエリ(Audio Query)への変換
- 音声クエリからWAVデータへの変換
- 生成した音声データの再生
- MCPプロトコルに準拠したJSON-RPC over stdioインターフェース
必要条件
- Python 3.10以上
- Voicevox Engine(ローカルまたはリモートで実行中)
- 必要なPythonパッケージ(requirements.txtを参照)
インストール
-
リポジトリをクローン
git clone https://github.com/yourusername/voicevox-mcp-vc1.git cd voicevox-mcp-vc1 -
依存関係のインストール
uv sync -
Voicevox Engineの起動
# CPU版 Dockerを使用する場合 docker pull voicevox/voicevox_engine:cpu-latest docker run --rm -p '127.0.0.1:50021:50021' voicevox/voicevox_engine:cpu-latest# GPU版 Dockerを使用する場合 docker pull voicevox/voicevox_engine:nvidia-latest docker run --rm --gpus all -p '127.0.0.1:50021:50021' voicevox/voicevox_engine:nvidia-latest
使用方法
CLINE / Roo code
- デフォルト起動の場合(http://127.0.0.1:50021 spaker id:1)
{
"mcpServers": {
"voicevox-mcp-light": {
"disabled": false,
"command": "uv",
"args": [
"run",
"--directory",
"/full path/voicevox_mcp_light/",
"python",
"-m",
"src.main"
],
"transportType": "stdio",
"alwaysAllow": [],
"env": {
"PULSE_SERVER": "/run/user/1000/pulse/native"
}
}
}
}
"voicevox-mcp-light": {
"disabled": false,
"command": "/full path/uv",
"args": [
"run",
"--directory",
"/full path/voicevox_mcp_light/",
"python",
"-m",
"src.main",
"--speaker",
"8"
],
"transportType": "stdio",
"alwaysAllow": [],
"env": {
"PULSE_SERVER": "/run/user/1000/pulse/native"
}
}
- PULSE_SERVER の内容は下記コマンドで調べた結果を転記してください
# パルスオーディオのステータスを確認
pactl info
Windows / Mac の場合は env の中身は不要とClaude回答でした。現在未テストです。 Ubuntu 22.04 で開発テストを実施。
Roo codeの場合、MCP CLientがDEBUG情報を吐き出します。これは開発時にデバッグ情報をLLMに埋め込ませたことによるもので、放置していますのでご容赦ください。CLINEでは表示されません。 Claude Desktopでは現時点未検証です。
オプション
--host: Voicevox EngineのホストIPアドレス(デフォルト: 127.0.0.1)--port: Voicevox Engineのポート番号(デフォルト: 50021)--speaker: 音声モデルID(デフォルト: 3) 音声モデルID を参照してください。
MCPクライアントからの使用
このサーバーは、MCPプロトコルに準拠したJSON-RPC over stdioインターフェースを提供します。 Claude DesktopやCursorなどのMCPクライアントから以下のように使用できます:
# MCPサーバーのインストール(Claude Desktopの場合)
mcp install src/main.py
# ツールの呼び出し例
synthesizeAndPlay(message="こんにちは、世界!")
開発
テストの実行
python -m pytest
コードスタイル
このプロジェクトはPEP 8コーディング規約に従っています。
ライセンス
謝辞
- VOICEVOX - 高品質な音声合成エンジン
- VOICEVOX Engine Github
- Model Context Protocol - LLMとのコンテキスト共有のための標準プロトコル
- Model Context Protocol (MCP) サーバを使ってみた・作ってみた - MCP全般の基礎として
- notion-mcp-light - NotionMCP Light 構造解析し Vibe Coding に
- PythonとVOICEVOXで音声合成 - voicevox の知識として
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.