@kajidog/mcp-tts-voicevox 0.7.1 → 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 ADDED
@@ -0,0 +1,583 @@
1
+ # VOICEVOX TTS MCP
2
+
3
+ **English** | [日本語](README.ja.md)
4
+
5
+ A text-to-speech MCP server using VOICEVOX
6
+
7
+ > 🎮 **[Try the Browser Demo](https://kajidog.github.io/mcp-tts-voicevox/)** — Test VoicevoxClient directly in your browser
8
+
9
+ ## What You Can Do
10
+
11
+ - **Make your AI assistant speak** — Text-to-speech from MCP clients like Claude Desktop
12
+ - **UI Audio Player (MCP Apps)** — Play audio directly in the chat with an interactive player (ChatGPT / Claude Desktop / Claude Web etc.)
13
+ - **Multi-character conversations** — Switch speakers per segment in a single call
14
+ - **Smooth playback** — Queue management, immediate playback, prefetching, streaming
15
+ - **Cross-platform** — Works on Windows, macOS, Linux (including WSL)
16
+
17
+ ## UI Audio Player (MCP Apps)
18
+
19
+ ![UI Audio Player](docs/images/player.png)
20
+
21
+ The `voicevox_speak_player` tool uses [MCP Apps](https://github.com/modelcontextprotocol/ext-apps) to render an interactive audio player directly inside the chat. Unlike the standard `voicevox_speak` tool which plays audio on the server, **audio is played on the client side (in the browser/app)** — no audio device needed on the server.
22
+
23
+ ### Features
24
+
25
+ - **Client-side playback** — Audio plays in Claude Desktop's chat, not on the server. Works even over remote connections.
26
+ - **Play/Pause controls** — Full playback controls embedded in the conversation
27
+ - **Multi-speaker dialogue** — Sequential playback of multiple speakers in one player with track navigation
28
+ - **Speaker switching** — Change the voice of any segment directly from the player UI
29
+ - **Segment editing** — Adjust speed, volume, intonation, pause length, and pre/post silence per segment
30
+ - **Accent phrase editing** — Edit accent positions and mora pitch directly in the UI
31
+ - **Add / delete / reorder segments** — Drag-and-drop track reordering; add new segments inline
32
+ - **WAV export** — Save all tracks as numbered WAV files and open the output folder automatically
33
+ - **User dictionary manager** — Add, edit, and delete VOICEVOX user dictionary words with preview playback
34
+ - **Cross-session state restore** — Player state is persisted on the server; reopening the chat restores previous tracks
35
+
36
+ Export behavior by environment:
37
+ - `Save and open` always exports WAV files. If opening the file explorer is not supported, export still succeeds and the save path is shown in the UI.
38
+ - `Choose output folder` uses a native directory picker on Windows/macOS. On unsupported environments, this action falls back to the default export directory.
39
+
40
+ | Multi-speaker playback | Track list | Segment editing |
41
+ |:---:|:---:|:---:|
42
+ | ![Multi-speaker player](docs/images/multi-player.png) | ![Track list](docs/images/list-player.png) | ![Segment editing](docs/images/edit-player.png) |
43
+
44
+ | Speaker selection | Dictionary manager | WAV export |
45
+ |:---:|:---:|:---:|
46
+ | ![Speaker selection](docs/images/select-player.png) | ![Dictionary manager](docs/images/dictionary-player.png) | ![WAV export](docs/images/export-player.png) |
47
+
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.
57
+
58
+ ### Player MCP Tools
59
+
60
+ | Tool | Description |
61
+ |------|-------------|
62
+ | `speak_player` | Create a new player session and display the UI. Returns `viewUUID`. |
63
+ | `resynthesize_player` | Update all segments for an existing player (new `viewUUID` each call). |
64
+ | `get_player_state` | Read the current player state (paginated) for AI tuning. |
65
+ | `open_dictionary_ui` | Open the user dictionary manager UI. |
66
+
67
+ ## Quick Start
68
+
69
+ ### Requirements
70
+
71
+ - Node.js 18.0.0 or higher (or [Bun](https://bun.sh/)) **or Docker**
72
+ - [VOICEVOX Engine](https://voicevox.hiroshiba.jp/) (must be running; included in Docker Compose)
73
+ - ffplay (optional, recommended — not needed with Docker)
74
+
75
+ #### Installing FFplay
76
+
77
+ ffplay is a lightweight player included with FFmpeg that supports playback from stdin. When available, it automatically enables low-latency streaming playback.
78
+
79
+ > 💡 **FFplay is optional.** Without it, playback falls back to temp file-based playback (Windows: PowerShell, macOS: afplay, Linux: aplay, etc.).
80
+
81
+ - Easy setup: One-liner installation for each OS (see steps below)
82
+ - Required: `ffplay` must be in PATH (restart terminal/apps after installation)
83
+
84
+ <details>
85
+ <summary>FFplay Installation and PATH Setup</summary>
86
+
87
+ Installation examples:
88
+
89
+ - Windows (any of these)
90
+ - Winget: `winget install --id=Gyan.FFmpeg -e`
91
+ - Chocolatey: `choco install ffmpeg`
92
+ - Scoop: `scoop install ffmpeg`
93
+ - Official builds: Download from https://www.gyan.dev/ffmpeg/builds/ or https://github.com/BtbN/FFmpeg-Builds and add the `bin` folder to PATH
94
+
95
+ - macOS
96
+ - Homebrew: `brew install ffmpeg`
97
+
98
+ - Linux
99
+ - Debian/Ubuntu: `sudo apt-get update && sudo apt-get install -y ffmpeg`
100
+ - Fedora: `sudo dnf install -y ffmpeg`
101
+ - Arch: `sudo pacman -S ffmpeg`
102
+
103
+ PATH Setup:
104
+
105
+ - Windows: Add `...\ffmpeg\bin` to environment variables, then restart PowerShell/terminal and editor (Claude/VS Code, etc.)
106
+ - Verify: `powershell -c "$env:Path"` should include the ffmpeg path
107
+ - macOS/Linux: Usually auto-detected. Check with `echo $PATH` if needed, restart shell.
108
+ - MCP clients (Claude Desktop/Code): Restart the app to reload PATH.
109
+
110
+ Verification:
111
+
112
+ ```bash
113
+ ffplay -version
114
+ ```
115
+
116
+ If version info is displayed, installation is complete. CLI/MCP will automatically detect ffplay and use stdin streaming playback.
117
+
118
+ </details>
119
+
120
+
121
+ ### 3 Steps to Get Started
122
+
123
+ **1. Start VOICEVOX Engine**
124
+
125
+ **2. Add to Claude Desktop config file**
126
+
127
+ Config file location:
128
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
129
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
130
+
131
+ ```json
132
+ {
133
+ "mcpServers": {
134
+ "tts-mcp": {
135
+ "command": "npx",
136
+ "args": ["-y", "@kajidog/mcp-tts-voicevox"]
137
+ }
138
+ }
139
+ }
140
+ ```
141
+
142
+ > 💡 **If using Bun**, just replace `npx` with `bunx`:
143
+ > ```json
144
+ > "command": "bunx", "args": ["@kajidog/mcp-tts-voicevox"]
145
+ > ```
146
+
147
+ **3. Restart Claude Desktop**
148
+
149
+ That's it! Ask Claude to "say hello" and it will speak!
150
+
151
+ ### Quick Start with Docker
152
+
153
+ You can run both the MCP server and VOICEVOX Engine with a single command using Docker Compose. No Node.js or VOICEVOX installation required.
154
+
155
+ **1. Start the containers**
156
+
157
+ ```bash
158
+ docker compose up -d
159
+ ```
160
+
161
+ This starts the VOICEVOX Engine and the MCP server (HTTP mode on port 3000).
162
+
163
+ **2. Add to Claude Desktop config file (using mcp-remote)**
164
+
165
+ ```json
166
+ {
167
+ "mcpServers": {
168
+ "tts-mcp": {
169
+ "command": "npx",
170
+ "args": ["-y", "mcp-remote", "http://localhost:3000/mcp"]
171
+ }
172
+ }
173
+ }
174
+ ```
175
+
176
+ **3. Restart Claude Desktop**
177
+
178
+ > **Limitations (Docker):** The Docker container has no audio device, so the `voicevox_speak` tool (server-side playback) is disabled by default. Use `voicevox_speak_player` instead — it plays audio on the client side (in Claude Desktop) and works without any audio device on the server. See [UI Audio Player](#ui-audio-player-mcp-apps) for details.
179
+
180
+ ---
181
+
182
+ ## MCP Tools
183
+
184
+ ### `voicevox_speak` — Text-to-Speech
185
+
186
+ The main feature callable from Claude.
187
+
188
+ | Parameter | Description | Default |
189
+ |-----------|-------------|---------|
190
+ | `text` | Text to speak (multiple segments separated by newlines) | Required |
191
+ | `speaker` | Speaker ID | 1 |
192
+ | `speedScale` | Playback speed | 1.0 |
193
+ | `immediate` | Immediate playback (clears queue) | true |
194
+ | `waitForEnd` | Wait for playback completion | false |
195
+
196
+ **Examples:**
197
+
198
+ ```javascript
199
+ // Simple text
200
+ { "text": "Hello" }
201
+
202
+ // Specify speaker
203
+ { "text": "Hello", "speaker": 3 }
204
+
205
+ // Different speakers per segment
206
+ { "text": "1:Hello\n3:Nice weather today" }
207
+
208
+ // Wait for completion (synchronous processing)
209
+ { "text": "Wait for this to finish before continuing", "waitForEnd": true }
210
+ ```
211
+
212
+ <details>
213
+ <summary>Other Tools</summary>
214
+
215
+ | Tool | Description |
216
+ |------|-------------|
217
+ | `voicevox_speak_player` | Speak with UI audio player (disable with `--disable-tools`) |
218
+ | `voicevox_ping` | Check VOICEVOX Engine connection |
219
+ | `voicevox_get_speakers` | Get list of available speakers |
220
+ | `voicevox_stop_speaker` | Stop playback and clear queue |
221
+ | `voicevox_synthesize_file` | Generate audio file |
222
+
223
+ </details>
224
+
225
+ ---
226
+
227
+ ## Configuration
228
+
229
+ <details>
230
+ <summary><b>Environment Variables</b></summary>
231
+
232
+ ### VOICEVOX Settings
233
+
234
+ | Variable | Description | Default |
235
+ |----------|-------------|---------|
236
+ | `VOICEVOX_URL` | Engine URL | `http://localhost:50021` |
237
+ | `VOICEVOX_DEFAULT_SPEAKER` | Default speaker ID | `1` |
238
+ | `VOICEVOX_DEFAULT_SPEED_SCALE` | Playback speed | `1.0` |
239
+
240
+ ### Playback Options
241
+
242
+ | Variable | Description | Default |
243
+ |----------|-------------|---------|
244
+ | `VOICEVOX_USE_STREAMING` | Streaming playback (requires `ffplay`) | `false` |
245
+ | `VOICEVOX_DEFAULT_IMMEDIATE` | Immediate playback | `true` |
246
+ | `VOICEVOX_DEFAULT_WAIT_FOR_START` | Wait for playback start | `false` |
247
+ | `VOICEVOX_DEFAULT_WAIT_FOR_END` | Wait for playback end | `false` |
248
+
249
+ ### Restriction Settings
250
+
251
+ Restrict AI from specifying certain options.
252
+
253
+ | Variable | Description |
254
+ |----------|-------------|
255
+ | `VOICEVOX_RESTRICT_IMMEDIATE` | Restrict `immediate` option |
256
+ | `VOICEVOX_RESTRICT_WAIT_FOR_START` | Restrict `waitForStart` option |
257
+ | `VOICEVOX_RESTRICT_WAIT_FOR_END` | Restrict `waitForEnd` option |
258
+
259
+ ### Disable Tools
260
+
261
+ ```bash
262
+ # Disable unnecessary tools
263
+ export VOICEVOX_DISABLED_TOOLS=speak_player,synthesize_file
264
+ ```
265
+
266
+ ### UI Player Settings
267
+
268
+ | Variable | Description | Default |
269
+ |----------|-------------|---------|
270
+ | `VOICEVOX_PLAYER_DOMAIN` | Widget domain for UI player (required for ChatGPT, e.g. `https://your-app.onrender.com`) | _(unset)_ |
271
+ | `VOICEVOX_AUTO_PLAY` | Auto-play audio in UI player | `true` |
272
+ | `VOICEVOX_PLAYER_EXPORT_ENABLED` | Enable track export(download) from UI player (`false` to disable) | `true` |
273
+ | `VOICEVOX_PLAYER_EXPORT_DIR` | Default output directory for exported tracks (also used as fallback when folder picker is unavailable) | `./voicevox-player-exports` |
274
+ | `VOICEVOX_PLAYER_CACHE_DIR` | Directory for player cache files (`*.txt`) and default player state file | `./.voicevox-player-cache` |
275
+ | `VOICEVOX_PLAYER_AUDIO_CACHE_ENABLED` | Enable persistent audio cache on disk (`false` disables disk cache writes/reads) | `true` |
276
+ | `VOICEVOX_PLAYER_AUDIO_CACHE_TTL_DAYS` | Audio cache retention in days (`0`: disable disk cache, `-1`: no TTL cleanup) | `30` |
277
+ | `VOICEVOX_PLAYER_AUDIO_CACHE_MAX_MB` | Audio cache size cap in MB (`0`: disable disk cache, `-1`: unlimited) | `512` |
278
+ | `VOICEVOX_PLAYER_STATE_FILE` | Path of persisted player state JSON | `<VOICEVOX_PLAYER_CACHE_DIR>/player-state.json` |
279
+
280
+ ### Server Settings
281
+
282
+ | Variable | Description | Default |
283
+ |----------|-------------|---------|
284
+ | `MCP_HTTP_MODE` | Enable HTTP mode | `false` |
285
+ | `MCP_HTTP_PORT` | HTTP port | `3000` |
286
+ | `MCP_HTTP_HOST` | HTTP host | `0.0.0.0` |
287
+ | `MCP_ALLOWED_HOSTS` | Allowed hosts (comma-separated) | `localhost,127.0.0.1,[::1]` |
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)_ |
290
+
291
+ </details>
292
+
293
+ <details>
294
+ <summary><b>Command Line Arguments</b></summary>
295
+
296
+ Command line arguments take priority over environment variables.
297
+
298
+ ```bash
299
+ # Basic settings
300
+ npx @kajidog/mcp-tts-voicevox --url http://192.168.1.100:50021 --speaker 3 --speed 1.2
301
+
302
+ # HTTP mode
303
+ npx @kajidog/mcp-tts-voicevox --http --port 8080
304
+
305
+ # With restrictions
306
+ npx @kajidog/mcp-tts-voicevox --restrict-immediate --restrict-wait-for-end
307
+
308
+ # Disable tools
309
+ npx @kajidog/mcp-tts-voicevox --disable-tools speak_player,synthesize_file
310
+ ```
311
+
312
+ | Argument | Description |
313
+ |----------|-------------|
314
+ | `--help`, `-h` | Show help |
315
+ | `--version`, `-v` | Show version |
316
+ | `--url <value>` | VOICEVOX Engine URL |
317
+ | `--speaker <value>` | Default speaker ID |
318
+ | `--speed <value>` | Playback speed |
319
+ | `--use-streaming` / `--no-use-streaming` | Streaming playback |
320
+ | `--immediate` / `--no-immediate` | Immediate playback |
321
+ | `--wait-for-start` / `--no-wait-for-start` | Wait for start |
322
+ | `--wait-for-end` / `--no-wait-for-end` | Wait for end |
323
+ | `--restrict-immediate` | Restrict immediate |
324
+ | `--restrict-wait-for-start` | Restrict waitForStart |
325
+ | `--restrict-wait-for-end` | Restrict waitForEnd |
326
+ | `--disable-tools <tools>` | Disable tools |
327
+ | `--auto-play` / `--no-auto-play` | Auto-play in UI player |
328
+ | `--player-export` / `--no-player-export` | Enable/disable track export(download) in UI player |
329
+ | `--player-export-dir <dir>` | Default output directory for exported tracks |
330
+ | `--player-cache-dir <dir>` | Player cache directory |
331
+ | `--player-state-file <path>` | Persisted player state file path |
332
+ | `--player-audio-cache` / `--no-player-audio-cache` | Enable/disable disk audio cache for player |
333
+ | `--player-audio-cache-ttl-days <days>` | Audio cache retention days (`0`: disable, `-1`: no TTL cleanup) |
334
+ | `--player-audio-cache-max-mb <mb>` | Audio cache size cap in MB (`0`: disable, `-1`: unlimited) |
335
+ | `--http` | HTTP mode |
336
+ | `--port <value>` | HTTP port |
337
+ | `--host <value>` | HTTP host |
338
+ | `--allowed-hosts <hosts>` | Allowed hosts (comma-separated) |
339
+ | `--allowed-origins <origins>` | Allowed origins (comma-separated) |
340
+ | `--api-key <key>` | Required API key for `/mcp` |
341
+
342
+ </details>
343
+
344
+ <details>
345
+ <summary><b>HTTP Mode</b></summary>
346
+
347
+ For remote connections:
348
+
349
+ **Start Server:**
350
+
351
+ ```bash
352
+ # Linux/macOS
353
+ MCP_HTTP_MODE=true MCP_HTTP_PORT=3000 npx @kajidog/mcp-tts-voicevox
354
+
355
+ # Windows PowerShell
356
+ $env:MCP_HTTP_MODE='true'; $env:MCP_HTTP_PORT='3000'; npx @kajidog/mcp-tts-voicevox
357
+ ```
358
+
359
+ **Claude Desktop Config (using mcp-remote):**
360
+
361
+ ```json
362
+ {
363
+ "mcpServers": {
364
+ "tts-mcp-proxy": {
365
+ "command": "npx",
366
+ "args": ["-y", "mcp-remote", "http://localhost:3000/mcp"]
367
+ }
368
+ }
369
+ }
370
+ ```
371
+
372
+ ### Per-Project Speaker Settings
373
+
374
+ With Claude Code, you can configure different default speakers per project using custom headers in `.mcp.json`:
375
+
376
+ | Header | Description |
377
+ |--------|-------------|
378
+ | `X-Voicevox-Speaker` | Default speaker ID for this project |
379
+ | `X-API-Key` | API key when `MCP_API_KEY` is configured |
380
+
381
+ **Example `.mcp.json`:**
382
+
383
+ ```json
384
+ {
385
+ "mcpServers": {
386
+ "tts": {
387
+ "type": "http",
388
+ "url": "http://localhost:3000/mcp",
389
+ "headers": {
390
+ "X-Voicevox-Speaker": "113",
391
+ "X-API-Key": "your-api-key"
392
+ }
393
+ }
394
+ }
395
+ }
396
+ ```
397
+
398
+ This allows each project to use a different voice character automatically.
399
+
400
+ **Priority order:**
401
+ 1. Explicit `speaker` parameter in tool call (highest)
402
+ 2. Project default from `X-Voicevox-Speaker` header
403
+ 3. Global `VOICEVOX_DEFAULT_SPEAKER` setting (lowest)
404
+
405
+ </details>
406
+
407
+ <details>
408
+ <summary><b>WSL to Windows Host Connection</b></summary>
409
+
410
+ Connecting from WSL to an MCP server running on Windows:
411
+
412
+ ### 1. Get Windows Host IP from WSL
413
+
414
+ ```bash
415
+ # Method 1: From default gateway
416
+ ip route show | grep -oP 'default via \K[\d.]+'
417
+ # Usually in the format 172.x.x.1
418
+
419
+ # Method 2: From /etc/resolv.conf (WSL2)
420
+ cat /etc/resolv.conf | grep nameserver | awk '{print $2}'
421
+ ```
422
+
423
+ ### 2. Start Server on Windows
424
+
425
+ Add the WSL gateway IP to `MCP_ALLOWED_HOSTS` to allow access from WSL:
426
+
427
+ ```powershell
428
+ $env:MCP_HTTP_MODE='true'
429
+ $env:MCP_ALLOWED_HOSTS='localhost,127.0.0.1,172.29.176.1'
430
+ npx @kajidog/mcp-tts-voicevox
431
+ ```
432
+
433
+ Or with CLI arguments:
434
+
435
+ ```powershell
436
+ npx @kajidog/mcp-tts-voicevox --http --allowed-hosts "localhost,127.0.0.1,172.29.176.1"
437
+ ```
438
+
439
+ ### 3. WSL Configuration (.mcp.json)
440
+
441
+ ```json
442
+ {
443
+ "mcpServers": {
444
+ "tts": {
445
+ "type": "http",
446
+ "url": "http://172.29.176.1:3000/mcp"
447
+ }
448
+ }
449
+ }
450
+ ```
451
+
452
+ > ⚠️ Within WSL, `localhost` refers to WSL itself. Use the WSL gateway IP to access the Windows host.
453
+
454
+ </details>
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
+
510
+ ---
511
+
512
+ ## Troubleshooting
513
+
514
+ <details>
515
+ <summary><b>Audio is not playing</b></summary>
516
+
517
+ **1. Check if VOICEVOX Engine is running**
518
+
519
+ ```bash
520
+ curl http://localhost:50021/speakers
521
+ ```
522
+
523
+ **2. Check platform-specific playback tools**
524
+
525
+ | OS | Required Tool |
526
+ |----|---------------|
527
+ | Linux | One of `aplay`, `paplay`, `play`, `ffplay` |
528
+ | macOS | `afplay` (pre-installed) |
529
+ | Windows | PowerShell (pre-installed) |
530
+
531
+ </details>
532
+
533
+ <details>
534
+ <summary><b>Not recognized by MCP client</b></summary>
535
+
536
+ - Check package installation: `npm list -g @kajidog/mcp-tts-voicevox`
537
+ - Verify JSON syntax in config file
538
+ - Restart the client
539
+
540
+ </details>
541
+
542
+ ---
543
+
544
+ ## Package Structure
545
+
546
+ | Package | Description |
547
+ |---------|-------------|
548
+ | `@kajidog/mcp-tts-voicevox` | MCP server |
549
+ | [`@kajidog/voicevox-client`](https://www.npmjs.com/package/@kajidog/voicevox-client) | General-purpose VOICEVOX client library (can be used independently) |
550
+ | `@kajidog/player-ui` | React-based audio player UI for browser playback |
551
+
552
+ ---
553
+
554
+ <details>
555
+ <summary><b>Developer Information</b></summary>
556
+
557
+ ### Setup
558
+
559
+ ```bash
560
+ git clone https://github.com/kajidog/mcp-tts-voicevox.git
561
+ cd mcp-tts-voicevox
562
+ pnpm install
563
+ ```
564
+
565
+ ### Commands
566
+
567
+ | Command | Description |
568
+ |---------|-------------|
569
+ | `pnpm build` | Build all packages |
570
+ | `pnpm test` | Run tests |
571
+ | `pnpm lint` | Run lint |
572
+ | `pnpm dev` | Start dev server |
573
+ | `pnpm dev:stdio` | Dev with stdio mode |
574
+ | `pnpm dev:bun` | Start dev server with Bun |
575
+ | `pnpm dev:bun:http` | Start HTTP dev server with Bun |
576
+
577
+ </details>
578
+
579
+ ---
580
+
581
+ ## License
582
+
583
+ ISC