# Directory Structure
```
├── .cursor
│ └── rules
│ └── general.mdc
├── .env_example
├── .gitignore
├── docker-compose.yml
├── Dockerfile
├── LICENSE
├── package-lock.json
├── package.json
├── README.md
├── src
│ ├── index.ts
│ └── tools
│ └── VoicevoxTool.ts
├── tmp
│ └── .placehold
└── tsconfig.json
```
# Files
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
```
node_modules
logs
dist
*.wav
```
--------------------------------------------------------------------------------
/.env_example:
--------------------------------------------------------------------------------
```
VOICEVOX_API_URL=http://localhost:50031
VOICEVOX_SPEAKER_ID=919692871
```
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
```yaml
services:
voicevox-mcp-python:
build: .
environment:
- PULSE_SERVER=/mnt/wslg/PulseServer
- VOICEVOX_API_URL=http://host.docker.internal:50031
- VOICEVOX_SPEAKER_ID=919692871
volumes:
- /mnt/wslg:/mnt/wslg
```
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
```typescript
import { MCPServer } from "mcp-framework";
if (process.platform != "win32") {
const server = new MCPServer();
server.start();
} else {
const server = new MCPServer({
transport: {
type: "sse",
options: {
port: 10100,
endpoint: "/sse",
},
},
});
server.start();
}
```
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
```json
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules"
]
}
```
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
```json
{
"name": "voicevox-mcp-server",
"description": "",
"license": "MIT",
"author": "Dosugamea",
"version": "1.0.0",
"type": "module",
"bin": {
"voicevox-mcp-server": "./dist/index.js"
},
"scripts": {
"build": "tsc && mcp-build",
"watch": "tsc --watch",
"start": "node dist/index.js"
},
"files": [
"dist"
],
"keywords": [
"voicevox",
"mcp",
"server"
],
"devDependencies": {
"typescript": "^5.8.2",
"vite": "^6.2.2"
},
"dependencies": {
"axios": "^1.8.4",
"child_process": "^1.0.2",
"mcp-framework": "^0.1.29",
"zod": "^3.24.2"
}
}
```