VOICEVOX MCP server

Connects AI systems to VOICEVOX text-to-speech engine for Japanese voice synthesis, supporting both default transport and Server-Sent Events with configurable speaker options.
Back to servers
Provider
Dosugamea
Release date
Mar 24, 2025
Language
TypeScript
Stats
4 stars

This MCP server enables you to use VOICEVOX-compatible voice synthesis servers (AivisSpeech, VOICEVOX, COEIROINK) through the Model Context Protocol. It allows for voice synthesis in agent mode with Claude 3.7 in tools like Cursor.

Requirements

Windows Environment

  • Node.js 18 or higher
  • VOICEVOX ENGINE or similar (running locally on http://localhost:50000, etc.)
  • VLC media player (must be in your PATH)

Docker Environment (WSL2)

  • Docker and Docker Compose
  • WSL2
  • VOICEVOX ENGINE or similar (running locally or in Docker)
  • Linux environment with sudo apt install libsdl2-dev pulseaudio-utils pulseaudio
  • Access permissions to /mnt/wslg

Installation

  1. Clone the repository
git clone https://github.com/Dosugamea/voicevox-mcp-server.git
cd voicevox-mcp-server
  1. Install dependencies
npm install
  1. Configure environment variables Copy .env_example to create a .env file and modify settings as needed:
VOICEVOX_API_URL=http://localhost:50021
VOICEVOX_SPEAKER_ID=1

Running the Server

In Windows Environment

Launch the server separately from your editor using:

npm run build
npm start

In Docker Environment

No separate operation required alongside the editor. Cannot be directly executed as it runs in stdio mode.

Configuration

For Windows Environment

Add the following to your mcp.json file. If the connection becomes unstable, reconnect as needed:

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

For Docker Environment

Add the following to your mcp.json file (not verified in author's environment):

{
    "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"
            }
        }
    }
}

Speaker IDs

Speaker IDs vary depending on the VOICEVOX model being used. By default, ID "1" (Shikoku Metan) is used. To use a different speaker ID, change the VOICEVOX_SPEAKER_ID environment variable.

You can check the list of available speaker IDs through the VOICEVOX ENGINE API's /speakers endpoint:

curl http://localhost:50021/speakers

Troubleshooting

  • Connection errors with VOICEVOX: Ensure the VOICEVOX ENGINE is running and the API URL is correctly configured.
  • No audio playback: Verify that VLC is properly installed and in your PATH.
  • Audio output issues in Docker environment: Check your pulseaudio configuration.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later