voicevox-mcp

voicevox-mcp

3.2

If you are the rightful owner of voicevox-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

VOICEVOX-MCP is a Model Context Protocol server that integrates with the VOICEVOX engine for voice synthesis and speaker information retrieval, implemented in TypeScript using the MCP SDK.

voicevox-mcp

このプロジェクトは、VOICEVOXエンジンと連携して音声合成やスピーカー情報の取得ができるMCP(Model Context Protocol)サーバーです。TypeScriptで実装されており、MCP SDKを利用しています。

機能

  • VOICEVOXエンジンのスピーカー情報取得(/speakers)
  • 指定したスピーカーでテキストを音声合成し、ローカルで再生(/speak)
    • Macのみ対応

セットアップ

VOICEVOXエンジンの起動(Docker推奨)

docker compose up -d

これで localhost:50021 でVOICEVOXエンジンが起動します。

依存パッケージのインストール & ビルド

npm install
npm run build 

使い方

Cursorの設定例

{
  "mcpServers": {
    "voicevox-mcp": {
      "command": "node",
      "args": ["${Path to Repository}/dist/index.js"],
      "env": {
        "SPEAKER_ID": 8,
        "SPEED_SCALE": 1.2,
        "VOICEVOX_API_URL": "http://localhost:50021" 
      }
    }
  }
}

VOICEVOX_API_URLは必要に応じて設定

  • MCPクライアントから speakers ツールでスピーカー一覧を取得できます。
  • speak ツールでテキストを音声合成し、ローカルで再生できます(afplayコマンドを使用しているため、Mac環境推奨)。

主な依存パッケージ

  • @modelcontextprotocol/sdk
  • zod
  • typescript

注意事項

  • 今後改善
    • VOICEVOXエンジンが localhost:50021 で動作していないと音声合成は利用できません。
    • Mac以外の環境では afplay の部分を適宜変更してください。

ライセンス

MIT License