A server for text-to-speech generation using the AivisSpeech engine.
๐ Special Thanks
This project is based on mcp-simple-voicevox by @t09tanaka.
We deeply appreciate their excellent work in creating the original MCP server for VOICEVOX, which served as the foundation for this AivisSpeech adaptation.
A Model Context Protocol (MCP) server for seamless integration with AivisSpeech text-to-speech engine. This project enables AI assistants and applications to convert text to natural-sounding Japanese speech with customizable voice parameters.
http://127.0.0.1:10101
(default port)When using Claude Code, start the MCP server manually before using it.
Using npx ensures you always get the latest version automatically. No manual updates needed.
npx @shinshin86/mcp-simple-aivisspeech@latest
claude mcp add aivisspeech -e AIVISSPEECH_URL=http://127.0.0.1:10101 -- npx @shinshin86/mcp-simple-aivisspeech@latest
By default, the server is added to the local scope (current project only). To make it available across all projects, use the -s user
option:
claude mcp add aivisspeech -s user -e AIVISSPEECH_URL=http://127.0.0.1:10101 -- npx @shinshin86/mcp-simple-aivisspeech@latest
You can also add voice notifications to your CLAUDE.md file to automate task completion notifications:
## Task Completion Behavior
- When all tasks are completed, always use the aivisspeech mcp tool to announce "Tasks completed" via voice
- When user input or decision is needed, use the aivisspeech mcp tool to announce "Awaiting your decision" via voice
### Notification Timings
- When asking the user a question
- When all tasks are completed
- When errors or issues occur
claude mcp list
# Or launch Claude Code and use
/mcp
If aivisspeech
is displayed, the setup was successful.
๐ก Tip: Claude Code doesn't auto-execute commands for safety. If you forget to start the server, the tools won't appear. During development, keep the above
npx
command running in a terminal, or use process managers likepm2
orsystemd --user
for persistent operation.
For manual configuration with Claude Desktop, you can simply add the following configuration:
Using npx ensures you always get the latest version automatically. No manual updates needed.
{
"mcpServers": {
"aivisspeech": {
"command": "npx",
"args": ["@shinshin86/mcp-simple-aivisspeech@latest"],
"env": {
"AIVISSPEECH_URL": "http://127.0.0.1:10101"
}
}
}
}
Before using this MCP server, complete these setup steps to ensure AivisSpeech is running locally.
http://127.0.0.1:10101/docs
# Run the MCP server
npm start
# For development with hot reload
npm run dev
# Check if everything is working
npm test
For cloning the repository, installing dependencies, and building:
# Clone repository
git clone https://github.com/shinshin86/mcp-simple-aivisspeech.git
cd mcp-simple-aivisspeech
# Install dependencies
npm install
# Build the project
npm run build
speak
Convert text to speech and play audio with customizable voice parameters.
This tool accepts several configuration parameters, including the following options:
text
(required): Text to convert to speechspeaker
(optional): Speaker/voice ID (default: 888753760
- Anneli ใใผใใซ)speedScale
(optional): Speech speed multiplier (0.5
-2.0
, default: 1.0
)pitchScale
(optional): Pitch adjustment (-0.15
-0.15
, default: 0.0
)volumeScale
(optional): Volume level (0.0
-2.0
, default: 1.0
)playAudio
(optional): Whether to play the generated audio (default: true
)Example usage:
{
"text": "ใใใซใกใฏใไธ็๏ผ",
"speaker": 888753760,
"speedScale": 1.2,
"pitchScale": 0.05,
"volumeScale": 1.5
}
get_speakers
Retrieve a list of all available voice characters and their styles.
This function returns: List of speakers with their IDs, names, and available voice styles.
notify_completion
Play a voice notification when tasks are completed.
This tool accepts several configuration parameters, including the following options:
message
(optional): Completion message to announce (default: "ๅฆ็ใๅฎไบใใพใใ"
)speaker
(optional): Speaker ID for the notification voice (default: 888753760
- Anneli ใใผใใซ)Example usage:
{
"message": "ใใผใฟๅฆ็ใๅฎไบใใพใใ",
"speaker": 888753760
}
check_engine_status
Check the current status and version of the AivisSpeech engine.
This function returns: Engine status, version information, and connectivity details.
Platform | Audio Command | Requirements |
---|---|---|
macOS | afplay | Built-in (no additional setup) |
Windows | PowerShell Media.SoundPlayer | Windows PowerShell |
Linux | aplay | ALSA utils (sudo apt install alsa-utils ) |
# Development & Building
npm run dev # Run with hot reload (tsx)
npm run build # Compile TypeScript to dist/
npm start # Run compiled server
# Code Quality
npm run lint # Run ESLint
npm run test # Run Vitest tests (single run)
npm run test:watch # Run tests in watch mode
npm run test:ui # Run tests with UI
npm run test:coverage # Run tests with coverage
# Utilities
npm run clean # Clean dist/ directory
When using MCP clients in production, use npx @shinshin86/mcp-simple-aivisspeech@latest
in your MCP configuration. No local setup is required, and you always get the latest version.
For development, clone the repository and use npm run dev
for hot reload, or npm run build && npm start
for testing production builds.
mcp-simple-aivisspeech/
โโโ src/
โ โโโ index.ts # MCP server & tool handlers
โ โโโ aivisspeech-client.ts # AivisSpeech API client
โโโ tests/
โ โโโ aivisspeech-client.test.ts # Unit tests
โโโ dist/ # Compiled output
โโโ docs/ # Documentation
โโโ config files # TS, ESLint, Vitest configs
The AivisSpeechClient
class offers comprehensive functionality, providing several key capabilities:
src/index.ts
CallToolRequestSchema
AivisSpeechClient
classaivisspeech-client.ts
Error: Failed to get version: connect ECONNREFUSED 127.0.0.1:10101
Consider these troubleshooting approaches to resolve this issue: Ensure AivisSpeech Engine is running on the correct port.
Error: Audio player exited with code 1
Consider these troubleshooting approaches to resolve this issue:
afplay
is availablesudo apt install alsa-utils
)Error: spawn afplay EACCES
Consider these troubleshooting approaches to resolve this issue: Check file permissions and system audio settings.
To enable verbose logging, run the following command:
DEBUG=mcp-aivisspeech npm run dev
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
We welcome contributions from the community. Contributors can get started by completing these essential steps:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)Made with โค๏ธ for the Japanese TTS community
Provides audio input and output capabilities for AI assistants.
An AI-to-AI consultation system for complex problem-solving and reasoning, using OpenRouter for model access.
An IMAP Model Context Protocol (MCP) server to expose IMAP operations as tools for AI assistants.
integrates with Bluesky API to query and search feeds and posts.
An MCP server for Claude that integrates with the Evolution API for WhatsApp automation.
Allows AI assistants to request information and receive responses from humans via Slack.
Enables AI assistants to send push notifications via the Pushover service.
Post to the Bluesky social network using the AT Protocol.
Enables interactive LLM workflows by adding local user prompts and chat capabilities directly into the MCP loop.
A read-only MCP server by CData that enables LLMs to query live SendGrid data. Requires the external CData JDBC Driver for SendGrid.