A Text-to-Speech server that integrates with an external VOICEVOX engine.
English | 日本語
A text-to-speech MCP server using VOICEVOX
@kajidog/voicevox-client
npm install -g @kajidog/mcp-tts-voicevox
Start the VOICEVOX Engine and have it wait on the default port (http://localhost:50021
).
Standard I/O mode (recommended):
npx @kajidog/mcp-tts-voicevox
HTTP server mode:
# Linux/macOS
MCP_HTTP_MODE=true npx @kajidog/mcp-tts-voicevox
# Windows PowerShell
$env:MCP_HTTP_MODE='true'; npx @kajidog/mcp-tts-voicevox
speak
- Text-to-speechConverts text to speech and plays it.
Parameters:
text
: String (multiple texts separated by newlines, speaker specification in "1:text" format)speaker
(optional): Speaker IDspeedScale
(optional): Playback speedimmediate
(optional): Whether to start playback immediately (default: true)waitForStart
(optional): Whether to wait for playback to start (default: false)waitForEnd
(optional): Whether to wait for playback to end (default: false)Examples:
// Simple text
{ "text": "Hello\nIt's a nice day today" }
// Speaker specification
{ "text": "Hello", "speaker": 3 }
// Per-segment speaker specification
{ "text": "1:Hello\n3:It's a nice day today" }
// Immediate playback (bypass queue)
{
"text": "Emergency message",
"immediate": true,
"waitForEnd": true
}
// Wait for playback to complete (synchronous processing)
{
"text": "Wait for this audio playback to complete before next processing",
"waitForEnd": true
}
// Add to queue but don't auto-play
{
"text": "Wait for manual playback start",
"immediate": false
}
immediate: true
)Play audio immediately by bypassing the queue:
waitForEnd: true
)Wait for playback completion to synchronize processing:
// Example 1: Play urgent message immediately and wait for completion
{
"text": "Emergency! Please check immediately",
"immediate": true,
"waitForEnd": true
}
// Example 2: Step-by-step audio guide
{
"text": "Step 1: Please open the file",
"waitForEnd": true
}
// Next processing executes after the above audio completes
generate_query
- Generate query for speech synthesissynthesize_file
- Generate audio filestop_speaker
- Stop playback and clear queueget_speakers
- Get speaker listget_speaker_detail
- Get speaker detailsAdd the following configuration to your claude_desktop_config.json
file:
{
"mcpServers": {
"tts-mcp": {
"command": "npx",
"args": ["-y", "@kajidog/mcp-tts-voicevox"]
}
}
}
If you need speech synthesis in SSE mode, you can use mcp-remote
for SSE↔Stdio conversion:
Claude Desktop Configuration
{
"mcpServers": {
"tts-mcp-proxy": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3000/sse"]
}
}
}
Starting SSE Server
Mac/Linux:
MCP_HTTP_MODE=true MCP_HTTP_PORT=3000 npx @kajidog/mcp-tts-voicevox
Windows:
$env:MCP_HTTP_MODE='true'; $env:MCP_HTTP_PORT='3000'; npx @kajidog/mcp-tts-voicevox
### AivisSpeech Configuration Example
```json
{
"mcpServers": {
"tts-mcp": {
"command": "npx",
"args": ["-y", "@kajidog/mcp-tts-voicevox"],
"env": {
"VOICEVOX_URL": "http://127.0.0.1:10101",
"VOICEVOX_DEFAULT_SPEAKER": "888753764"
}
}
}
}
VOICEVOX_URL
: VOICEVOX Engine URL (default: http://localhost:50021
)VOICEVOX_DEFAULT_SPEAKER
: Default speaker ID (default: 1
)VOICEVOX_DEFAULT_SPEED_SCALE
: Default playback speed (default: 1.0
)VOICEVOX_DEFAULT_IMMEDIATE
: Whether to start playback immediately when added to queue (default: true
)VOICEVOX_DEFAULT_WAIT_FOR_START
: Whether to wait for playback to start (default: false
)VOICEVOX_DEFAULT_WAIT_FOR_END
: Whether to wait for playback to end (default: false
)Usage Examples:
# Example 1: Wait for completion for all audio playback (synchronous processing)
export VOICEVOX_DEFAULT_WAIT_FOR_END=true
npx @kajidog/mcp-tts-voicevox
# Example 2: Wait for both playback start and end
export VOICEVOX_DEFAULT_WAIT_FOR_START=true
export VOICEVOX_DEFAULT_WAIT_FOR_END=true
npx @kajidog/mcp-tts-voicevox
# Example 3: Manual control (disable auto-play)
export VOICEVOX_DEFAULT_IMMEDIATE=false
npx @kajidog/mcp-tts-voicevox
These options allow fine-grained control of audio playback behavior according to application requirements.
MCP_HTTP_MODE
: Enable HTTP server mode (set to true
to enable)MCP_HTTP_PORT
: HTTP server port number (default: 3000
)MCP_HTTP_HOST
: HTTP server host (default: 0.0.0.0
)Configuration method for connecting from WSL environment to Windows host MCP server.
Starting MCP server with AivisSpeech and PowerShell:
$env:MCP_HTTP_MODE='true'; $env:MCP_HTTP_PORT='3000'; $env:VOICEVOX_URL='http://127.0.0.1:10101'; $env:VOICEVOX_DEFAULT_SPEAKER='888753764'; npx @kajidog/mcp-tts-voicevox
Check Windows host IP address:
# Get Windows host IP address from WSL
ip route show | grep default | awk '{print $3}'
Usually in the format 172.x.x.1
.
Claude Code .mcp.json configuration example:
{
"mcpServers": {
"tts": {
"type": "sse",
"url": "http://172.29.176.1:3000/sse"
}
}
}
Important Points:
localhost
or 127.0.0.1
refers to WSL internal, so cannot access Windows host services172.x.x.1
) to access Windows hostConnection Test:
# Check connection to Windows host MCP server from WSL
curl http://172.29.176.1:3000
If normal, 404 Not Found
will be returned (because root path doesn't exist).
VOICEVOX Engine is not running
curl http://localhost:50021/speakers
Audio is not playing
aplay
, paplay
, play
, ffplay
afplay
(pre-installed)Not recognized by MCP client
npm list -g @kajidog/mcp-tts-voicevox
ISC
Instructions for developing this repository locally.
git clone https://github.com/kajidog/mcp-tts-voicevox.git
cd mcp-tts-voicevox
pnpm install
You can run the following commands in the project root.
pnpm build
pnpm test
pnpm lint
pnpm dev
pnpm dev:stdio
These commands will also properly handle processing for related packages within the workspace.
Send push notifications via the Pushinator service. Requires an API token from your Pushinator account.
Interact with Wizzypedia through the MediaWiki API, supporting both read-only and authenticated operations.
integrates with Bluesky API to query and search feeds and posts.
An MCP service for device communication and PWM control via the MQTT protocol.
A read-only MCP server by CData that enables LLMs to query live SendGrid data. Requires the external CData JDBC Driver for SendGrid.
Official MCP Server to interact with Pearl API. Connect your AI Agents with 12,000+ certified experts instantly.
An MCP server for interacting with the Freshdesk API v2, enabling management of customer support tickets and contacts.
Interact with any other SaaS applications on behalf of your customers.
Tools for common Gmail operations, such as sending emails.
Integrates with Mailtrap Email API.