Logotipo de AivisSpeech

AivisSpeech

Comunidad
shinshin86

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.

Editorshinshin86
Repositoriomcp-simple-aivisspeech
IdiomaJavaScript
Forks
3
Estrellas
8
Herramientas disponibles
1
Tipo de transportestdio
Categorías
LicenciaApache-2.0
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    AivisSpeech ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 1 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    8 estrellas y 3 forks en el repositorio enlazado.

MCP Simple AivisSpeech

Project Logo

English | 日本語

🙏 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.

✨ Features

  • Text-to-Speech Conversion - High-quality Japanese speech synthesis using AivisSpeech
  • Multiple Voice Characters - Support for various speakers and voice styles (default: Anneli ノーマル)
  • Configurable Parameters - Adjust speed, pitch, volume, and intonation
  • Cross-Platform Audio - Automatic audio playback on macOS, Windows, and Linux
  • Task Notifications - Voice notifications for process completion
  • Easy Integration - Simple MCP protocol for AI assistant integration
  • Engine Status Monitoring - Real-time status checking of AivisSpeech engine
  • Smart Error Handling - Helpful error messages with speaker suggestions

📋 Prerequisites

  • Node.js - Version 18.0.0 or higher
  • AivisSpeech Engine - Running on http://127.0.0.1:10101 (default port)
  • Audio System - System audio capabilities for playback

MCP Simple AivisSpeech Configuration

Using Claude Code

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.

  1. Start the AivisSpeech MCP server manually in a separate terminal from the one where you're using Claude Code
bash
npx @shinshin86/mcp-simple-aivisspeech@latest
  1. Register the MCP server with Claude Code
bash
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:

bash
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:

md
## 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
  1. Verify the tools are recognized
bash
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 like pm2 or systemd --user for persistent operation.

Using Claude Desktop

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.

json
{
  "mcpServers": {
    "aivisspeech": {
      "command": "npx",
      "args": ["@shinshin86/mcp-simple-aivisspeech@latest"],
      "env": {
        "AIVISSPEECH_URL": "http://127.0.0.1:10101"
      }
    }
  }
}

⚙️ AivisSpeech Engine Setup

Before using this MCP server, complete these setup steps to ensure AivisSpeech is running locally.

  1. Download AivisSpeech from https://aivis-project.com/
  2. Launch AivisSpeech on your local machine
  3. The engine will start on the default port 10101
  4. Verify the engine is running by visiting http://127.0.0.1:10101/docs

📖 Other Usage Methods

For Local Development

bash
# 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:

bash
# 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

🛠️ Available Tools

🎤 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 speech
  • speaker (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:

json
{
  "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:

json
{
  "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 Support

Audio Playback Systems

PlatformAudio CommandRequirements
macOSafplayBuilt-in (no additional setup)
WindowsPowerShell Media.SoundPlayerWindows PowerShell
LinuxaplayALSA utils (sudo apt install alsa-utils)

Tested Environments

  • macOS 12+ (Intel & Apple Silicon)
  • Windows 10/11
  • Ubuntu 20.04+
  • Node.js 18.x, 20.x, 21.x

🧪 Development

Available Scripts

bash
# 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

Local vs NPX Usage

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.

Project Architecture

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

API Client Architecture

The AivisSpeechClient class offers comprehensive functionality, providing several key capabilities:

  • HTTP Client - Axios-based API communication
  • Error Handling - Comprehensive error catching and reporting
  • Type Safety - Full TypeScript interfaces for all API responses
  • Connection Management - Health checks and status monitoring

Adding New Features

  1. New Tool: Add handler in src/index.ts CallToolRequestSchema
  2. API Methods: Extend AivisSpeechClient class
  3. Types: Update interfaces in aivisspeech-client.ts
  4. Tests: Add corresponding test cases

🔧 Troubleshooting

Common Issues

AivisSpeech Engine Not Found

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.

Audio Playback Fails

Error: Audio player exited with code 1

Consider these troubleshooting approaches to resolve this issue:

  • macOS - Check if afplay is available
  • Linux - Install ALSA utils (sudo apt install alsa-utils)
  • Windows - Ensure PowerShell execution policy allows scripts

Permission Denied

Error: spawn afplay EACCES

Consider these troubleshooting approaches to resolve this issue: Check file permissions and system audio settings.

Debug Mode

To enable verbose logging, run the following command:

bash
DEBUG=mcp-aivisspeech npm run dev

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

🤝 Contributing

We welcome contributions from the community. Contributors can get started by completing these essential steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow existing TypeScript/ESLint configurations
  • Add tests for new functionality
  • Update documentation for API changes
  • Ensure cross-platform compatibility

🙏 Acknowledgments

📞 Support


Made with ❤️ for the Japanese TTS community

Instalación

TypingMind
Requisitos:

Node.js 18+

{
  "mcpServers": {
    "aivisspeech": {
      "command": "npx",
      "args": [
        "@shinshin86/mcp-simple-aivisspeech@latest"
      ],
      "env": {
        "AIVISSPEECH_URL": "http://127.0.0.1:10101"
      }
    }
  }
}

Herramientas disponibles

  • check_engine_status

    Check if AivisSpeech engine is running

Usa el MCP de AivisSpeech con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado AivisSpeech, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade AivisSpeech como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de AivisSpeech.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "aivisspeech": {
      "command": "npx",
      "args": [
        "-y",
        "@shinshin86/mcp-simple-aivisspeech"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de AivisSpeech y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de AivisSpeech.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar AivisSpeech para ayudarme con esta tarea?
AivisSpeech
Claro. Lo he leído.
Esto he encontrado usando AivisSpeech.

Preguntas frecuentes

¿Para qué sirve el servidor MCP AivisSpeech?

AivisSpeech es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP AivisSpeech con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar AivisSpeech con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de AivisSpeech con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con AivisSpeech conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP AivisSpeech a TypingMind?

AivisSpeech funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP AivisSpeech en TypingMind?

AivisSpeech ofrece 1 herramientas MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP AivisSpeech?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si AivisSpeech requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇