@kajidog/mcp-tts-voicevox 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -3
- package/dist/index.js +552 -317
- package/dist/index.js.map +1 -1
- package/dist/mcp-app.html +40 -40
- package/dist/stdio.js +519 -311
- package/dist/stdio.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# VOICEVOX TTS MCP
|
|
2
2
|
|
|
3
|
+
**English** | [日本語](README.ja.md)
|
|
4
|
+
|
|
3
5
|
A text-to-speech MCP server using VOICEVOX
|
|
4
6
|
|
|
5
7
|
> 🎮 **[Try the Browser Demo](https://kajidog.github.io/mcp-tts-voicevox/)** — Test VoicevoxClient directly in your browser
|
|
@@ -7,7 +9,7 @@ A text-to-speech MCP server using VOICEVOX
|
|
|
7
9
|
## What You Can Do
|
|
8
10
|
|
|
9
11
|
- **Make your AI assistant speak** — Text-to-speech from MCP clients like Claude Desktop
|
|
10
|
-
- **UI Audio Player (MCP Apps)** — Play audio directly in the chat with an interactive player
|
|
12
|
+
- **UI Audio Player (MCP Apps)** — Play audio directly in the chat with an interactive player (ChatGPT / Claude Desktop / Claude Web etc.)
|
|
11
13
|
- **Multi-character conversations** — Switch speakers per segment in a single call
|
|
12
14
|
- **Smooth playback** — Queue management, immediate playback, prefetching, streaming
|
|
13
15
|
- **Cross-platform** — Works on Windows, macOS, Linux (including WSL)
|
|
@@ -43,7 +45,15 @@ Export behavior by environment:
|
|
|
43
45
|
|:---:|:---:|:---:|
|
|
44
46
|
|  |  |  |
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
### Supported Clients
|
|
49
|
+
|
|
50
|
+
| Client | Connection | Notes |
|
|
51
|
+
|--------|-----------|-------|
|
|
52
|
+
| **ChatGPT** | HTTP (remote) | Requires `VOICEVOX_PLAYER_DOMAIN` |
|
|
53
|
+
| **Claude Desktop** | stdio (local) | Works out of the box |
|
|
54
|
+
| **Claude Desktop** | HTTP (via mcp-remote) | Do not set `VOICEVOX_PLAYER_DOMAIN` |
|
|
55
|
+
|
|
56
|
+
> **Note:** `speak_player` requires a host that supports MCP Apps. In hosts without MCP Apps support, the tool is not available and `speak` (server-side playback) can be used instead.
|
|
47
57
|
|
|
48
58
|
### Player MCP Tools
|
|
49
59
|
|
|
@@ -257,6 +267,7 @@ export VOICEVOX_DISABLED_TOOLS=speak_player,synthesize_file
|
|
|
257
267
|
|
|
258
268
|
| Variable | Description | Default |
|
|
259
269
|
|----------|-------------|---------|
|
|
270
|
+
| `VOICEVOX_PLAYER_DOMAIN` | Widget domain for UI player (required for ChatGPT, e.g. `https://your-app.onrender.com`) | _(unset)_ |
|
|
260
271
|
| `VOICEVOX_AUTO_PLAY` | Auto-play audio in UI player | `true` |
|
|
261
272
|
| `VOICEVOX_PLAYER_EXPORT_ENABLED` | Enable track export(download) from UI player (`false` to disable) | `true` |
|
|
262
273
|
| `VOICEVOX_PLAYER_EXPORT_DIR` | Default output directory for exported tracks (also used as fallback when folder picker is unavailable) | `./voicevox-player-exports` |
|
|
@@ -275,6 +286,7 @@ export VOICEVOX_DISABLED_TOOLS=speak_player,synthesize_file
|
|
|
275
286
|
| `MCP_HTTP_HOST` | HTTP host | `0.0.0.0` |
|
|
276
287
|
| `MCP_ALLOWED_HOSTS` | Allowed hosts (comma-separated) | `localhost,127.0.0.1,[::1]` |
|
|
277
288
|
| `MCP_ALLOWED_ORIGINS` | Allowed origins (comma-separated) | `http://localhost,http://127.0.0.1,...` |
|
|
289
|
+
| `MCP_API_KEY` | Required API key for `/mcp` (sent via `X-API-Key` or `Authorization: Bearer`) | _(unset)_ |
|
|
278
290
|
|
|
279
291
|
</details>
|
|
280
292
|
|
|
@@ -325,6 +337,7 @@ npx @kajidog/mcp-tts-voicevox --disable-tools speak_player,synthesize_file
|
|
|
325
337
|
| `--host <value>` | HTTP host |
|
|
326
338
|
| `--allowed-hosts <hosts>` | Allowed hosts (comma-separated) |
|
|
327
339
|
| `--allowed-origins <origins>` | Allowed origins (comma-separated) |
|
|
340
|
+
| `--api-key <key>` | Required API key for `/mcp` |
|
|
328
341
|
|
|
329
342
|
</details>
|
|
330
343
|
|
|
@@ -363,6 +376,7 @@ With Claude Code, you can configure different default speakers per project using
|
|
|
363
376
|
| Header | Description |
|
|
364
377
|
|--------|-------------|
|
|
365
378
|
| `X-Voicevox-Speaker` | Default speaker ID for this project |
|
|
379
|
+
| `X-API-Key` | API key when `MCP_API_KEY` is configured |
|
|
366
380
|
|
|
367
381
|
**Example `.mcp.json`:**
|
|
368
382
|
|
|
@@ -373,7 +387,8 @@ With Claude Code, you can configure different default speakers per project using
|
|
|
373
387
|
"type": "http",
|
|
374
388
|
"url": "http://localhost:3000/mcp",
|
|
375
389
|
"headers": {
|
|
376
|
-
"X-Voicevox-Speaker": "113"
|
|
390
|
+
"X-Voicevox-Speaker": "113",
|
|
391
|
+
"X-API-Key": "your-api-key"
|
|
377
392
|
}
|
|
378
393
|
}
|
|
379
394
|
}
|
|
@@ -438,6 +453,60 @@ npx @kajidog/mcp-tts-voicevox --http --allowed-hosts "localhost,127.0.0.1,172.29
|
|
|
438
453
|
|
|
439
454
|
</details>
|
|
440
455
|
|
|
456
|
+
<details>
|
|
457
|
+
<summary><b>Using with ChatGPT</b></summary>
|
|
458
|
+
|
|
459
|
+
To use with ChatGPT, deploy the MCP server in HTTP mode to the cloud with access to a VOICEVOX Engine.
|
|
460
|
+
|
|
461
|
+
### 1. Deploy to the Cloud
|
|
462
|
+
|
|
463
|
+
Deploy with Docker to Render, Railway, etc. (Dockerfile included).
|
|
464
|
+
|
|
465
|
+
### 2. Set Up VOICEVOX Engine
|
|
466
|
+
|
|
467
|
+
Run VOICEVOX Engine locally and expose it via ngrok, or deploy it alongside the MCP server.
|
|
468
|
+
|
|
469
|
+
### 3. Configure Environment Variables
|
|
470
|
+
|
|
471
|
+
| Variable | Example | Description |
|
|
472
|
+
|----------|---------|-------------|
|
|
473
|
+
| `VOICEVOX_URL` | `https://xxxx.ngrok-free.app` | VOICEVOX Engine URL |
|
|
474
|
+
| `MCP_HTTP_MODE` | `true` | Enable HTTP mode |
|
|
475
|
+
| `MCP_ALLOWED_HOSTS` | `your-app.onrender.com` | Deployed hostname |
|
|
476
|
+
| `VOICEVOX_PLAYER_DOMAIN` | `https://your-app.onrender.com` | Widget domain for UI player (required for ChatGPT) |
|
|
477
|
+
| `VOICEVOX_DISABLED_TOOLS` | `speak` | Disable server-side playback (no audio device) |
|
|
478
|
+
| `VOICEVOX_PLAYER_EXPORT_ENABLED` | `false` | Disable export feature (files cannot be downloaded from cloud) |
|
|
479
|
+
|
|
480
|
+
### 4. Add Connector in ChatGPT
|
|
481
|
+
|
|
482
|
+
Go to ChatGPT Settings → Connectors → Add MCP server URL (`https://your-app.onrender.com/mcp`).
|
|
483
|
+
|
|
484
|
+
</details>
|
|
485
|
+
|
|
486
|
+
<details>
|
|
487
|
+
<summary><b>Using with Claude Web</b></summary>
|
|
488
|
+
|
|
489
|
+
The basic steps are the same as ChatGPT, but the `VOICEVOX_PLAYER_DOMAIN` value is different.
|
|
490
|
+
|
|
491
|
+
Claude Web requires `ui.domain` to be a **hash-based dedicated domain**. Compute it with the following command:
|
|
492
|
+
|
|
493
|
+
```bash
|
|
494
|
+
node -e "console.log(require('crypto').createHash('sha256').update('Your MCP server URL').digest('hex').slice(0,32)+'.claudemcpcontent.com')"
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
Example: If your MCP server URL is `https://your-app.onrender.com/mcp`:
|
|
498
|
+
|
|
499
|
+
```bash
|
|
500
|
+
node -e "console.log(require('crypto').createHash('sha256').update('https://your-app.onrender.com/mcp').digest('hex').slice(0,32)+'.claudemcpcontent.com')"
|
|
501
|
+
# Example output: 48fb73a6...claudemcpcontent.com
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
Set this output value as `VOICEVOX_PLAYER_DOMAIN`.
|
|
505
|
+
|
|
506
|
+
> **Note**: Since ChatGPT and Claude Web require different `VOICEVOX_PLAYER_DOMAIN` values, a single instance cannot serve both clients simultaneously. Deploy separate instances for each, or switch the environment variable depending on your target client.
|
|
507
|
+
|
|
508
|
+
</details>
|
|
509
|
+
|
|
441
510
|
---
|
|
442
511
|
|
|
443
512
|
## Troubleshooting
|