Navigation
Voicevox MCP Server: AI Synthesis & Customization - MCP Implementation

Voicevox MCP Server: AI Synthesis & Customization

Voicevox MCP Server: Effortlessly craft lifelike voices for games, videos, and apps. High-quality AI synthesis, seamless integration, and endless customization. Elevate your content today!

Developer Tools
4.0(94 reviews)
141 saves
65 comments

Users create an average of 36 projects per month with this tool

About Voicevox MCP Server

What is Voicevox MCP Server: AI Synthesis & Customization?

Developed as a versatile middleware solution, the Voicevox MCP Server enables seamless integration of AI-driven text-to-speech systems like AivisSpeech, VOICEVOX, and COEIROINK via the Model Context Protocol (MCP). Designed for advanced agents like Cursor's Claude 3.7, this server acts as a bridge between powerful synthesis engines and end-user applications, offering robust customization options while maintaining compatibility with both native Windows setups and Dockerized environments.

How to Use Voicevox MCP Server: AI Synthesis & Customization?

Implementation follows a structured workflow:

  1. Environment Preparation: Install Node.js (v18+) and prerequisite tools (VLC for Windows, Docker/WSL2 for Linux).
  2. Repository Setup: Clone the repository and configure dependencies via npm.
  3. Configuration Tuning: Adjust the .env file to specify VOICEVOX_ENGINE endpoints and speaker IDs.
  4. Execution: Deploy either natively using npm scripts or via Docker with pulseaudio/SFML configurations.
  5. Integration: Update mcp.json with server endpoints and Docker-specific parameters for reliable connection handling.

Voicevox MCP Server Features

Key Features of Voicevox MCP Server: AI Synthesis & Customization?

  • Protocol Abstraction: Simplifies MCP integration through standardized JSON configurations.
  • Speaker Customization: Supports dynamic speaker switching via environment variables (e.g., default Shikoku Medatan or custom IDs).
  • Multi-Environment Resilience: Automatic reconnection logic for unstable Windows connections, Dockerized isolation for enterprise deployments.
  • Diagnostic Transparency: Clear error logging for API connectivity and audio playback issues.

Use Cases of Voicevox MCP Server: AI Synthesis & Customization?

Primarily leveraged in:

  • AI-powered chatbots requiring natural voice output
  • Content creation pipelines for automated audiobook generation
  • Research environments testing new TTS models
  • Education platforms needing customizable voice avatars
  • Legacy system upgrades through Docker encapsulation

Voicevox MCP Server FAQ

FAQ from Voicevox MCP Server: AI Synthesis & Customization?

Q: Why use MCP over direct API calls?
A: MCP's event-driven architecture provides superior real-time performance for agent workflows compared to REST-based polling.

Q: Docker audio issues persist?
A: Ensure PULSE_SERVER environment variables point to /mnt/wslg/PulseServer and SDL_AUDIODRIVER is set to pulseaudio.

Q: Speaker ID not working?
A: Verify IDs via VOICEVOX's /speakers endpoint - some IDs may require additional model installations.

Q: Can I use non-VOICEVOX engines?
A: While currently VOICEVOX-specific, the MCP framework allows protocol extensions for other engines through API adaptation.

Content

Voicevox MCP Server

VOICEVOX互換の音声合成サーバー(AivisSpeech / VOICEVOX / COEIROINK) を MCP (Model Context Protocol) 経由で利用するためのサーバーです。 Cursor等でのClaude 3.7を使ったエージェントモードでの音声合成に利用できます。

必要条件

Windows環境

Docker環境 (WSL2)

  • Docker と Docker Compose
  • WSL2
  • VOICEVOX ENGINE等 (ローカルまたはDockerで実行)
  • sudo apt install libsdl2-dev pulseaudio-utils pulseaudio されたLinux環境
  • /mnt/wslg へのアクセス権限

インストールと設定

  1. リポジトリをクローン
git clone https://github.com/Dosugamea/voicevox-mcp-server.git
cd voicevox-mcp-server
  1. 依存関係のインストール
npm install
  1. 環境変数の設定 .env_example をコピーして .env ファイルを作成し、必要に応じて設定を変更します:
VOICEVOX_API_URL=http://localhost:50021
VOICEVOX_SPEAKER_ID=1

実行方法

Windows環境での実行

エディタと別途で下記手順でサーバーを立ち上げてください。

npm run build
npm start

Docker環境での実行

エディタと別途での操作は不要です。 stdioモードで立ち上がるため直接実行することはできません。

設定方法

Windows環境での実行の場合

mcp.jsonに下記を追記してください。 接続が不安定なため切断されたら再接続してください。

        "voicevox": {
            "url": "http://localhost:10100/sse"
        }

Docker環境での実行の場合

mcp.jsonに下記を追記してください。 (作者環境での動作は確認できていません)

{
    "tools": {
        "voicevox": {
            "command": "cmd",
            "args": [
                "/c",
                "docker",
                "run",
                "-i",
                "--rm",
                "-v",
                "/mnt/wslg:/mnt/wslg",
                "-e",
                "PULSE_SERVER",
                "-e",
                "SDL_AUDIODRIVER",
                "-e",
                "VOICEVOX_API_URL",
                "-e",
                "VOICEVOX_SPEAKER_ID",
                "your-local-docker-image-name"
            ],
            "env": {
                "PULSE_SERVER": "unix:/mnt/wslg/PulseServer",
                "SDL_AUDIODRIVER": "pulseaudio",
                "VOICEVOX_API_URL": "http://host.docker.internal:50031",
                "VOICEVOX_SPEAKER_ID": "919692871"
            }
        }
    }
}

話者IDについて

話者IDは使用するVOICEVOXのモデルによって異なります。デフォルトでは「1」(四国めたん)を使用しています。 他の話者IDを使用する場合は、環境変数 VOICEVOX_SPEAKER_ID を変更してください。

話者IDの一覧は、VOICEVOX ENGINE APIの /speakers エンドポイントで確認できます。 例: curl http://localhost:50021/speakers

トラブルシューティング

  • VOICEVOXとの接続エラー : VOICEVOX ENGINEが起動していること、APIのURLが正しく設定されていることを確認してください。
  • 音声が再生されない : VLCが正しくインストールされていることと、パスが通っていることを確認してください。
  • Docker環境での音声出力問題 : pulseaudioの設定が正しいか確認してください。

開発者向け情報

  • ソースコードに貢献する場合は、Issueを作成するか、Pull Requestを送信してください。
  • バグ報告や機能リクエストは、GitHubのIssue機能をご利用ください。

ライセンス

MIT License

Related MCP Servers & Clients