AivisSpeech MCP server

Enables AI systems to generate and play speech audio from text input through the AivisSpeech API, with configurable speaker settings for voice output applications.
Back to servers
Provider
Kentaro Kuribayashi
Release date
Mar 15, 2025
Language
TypeScript

AivisSpeech MCP サーバーは AIvis Speech Engine と連携して音声合成のインターフェースを提供します。MCP プロトコルを通じて、AI アシスタントなどのアプリケーションから高品質な音声合成機能を簡単に利用できます。

必要条件

  • Node.js 18.x 以上
  • npm 9.x 以上
  • AivisSpeech Engine(別途インストールが必要)

インストール手順

以下の手順でサーバーをインストールします:

# リポジトリをクローン
git clone https://github.com/kentaro/aivis-speech-mcp.git
cd aivis-speech-mcp

# 依存関係のインストール
npm install

# ビルド
npm run build

環境設定

基本設定

環境変数の設定ファイルをサンプルからコピーして編集します:

cp .env.sample .env

.env ファイルで以下の設定を行います:

# AivisSpeech API Configuration
AIVIS_SPEECH_API_URL=http://localhost:10101  # AivisSpeech EngineのAPIエンドポイント

# Speaker Configuration
AIVIS_SPEECH_SPEAKER_ID=888753760  # デフォルトのスピーカーID

Cursor MCP の設定

Cursor エディタで使用する場合の設定ファイルをコピーして編集します:

cp .cursor/mcp.json.sample .cursor/mcp.json

.cursor/mcp.json ファイルを以下のように編集します:

{
  "mcpServers": {
    "AivisSpeech-MCP": {
      "command": "node",
      "args": ["/path/to/aivis-speech-mcp/dist/index.js"]
    }
  }
}

/path/to/aivis-speech-mcp/dist/index.js を実際のプロジェクトのパスに書き換えてください。Windows の場合は、バックスラッシュをエスケープするか、フォワードスラッシュを使用してください(例: "C:/Users/username/path/to/aivis-speech-mcp/dist/index.js")。

サーバーの起動

開発モード

開発中はホットリロード機能付きでサーバーを起動できます:

npm run dev

本番モード

ビルド後、本番モードでサーバーを起動します:

npm start

API の利用方法

AivisSpeech MCP サーバーは MCP プロトコルに準拠した API エンドポイントを提供します。主な機能は以下の通りです:

  • 音声合成(テキストから音声を生成)
  • スピーカー情報の取得
  • 音声スタイルの設定

詳細な API 仕様については AivisSpeech Engine API 仕様 を参照してください。

トラブルシューティング

よくある問題と解決策:

  • AivisSpeech Engine に接続できない: .env ファイルの AIVIS_SPEECH_API_URL が正しく設定されているか確認してください
  • 音声が再生されない: システムの音声設定を確認し、適切なオーディオデバイスが選択されているか確認してください
  • スピーカー ID が見つからない: AivisSpeech Engine が正しく起動しているか確認し、利用可能なスピーカー ID を確認してください

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later