NijiVoice-MCP
Used for storing and loading API credentials required for accessing the NijiVoice API service
Provides testing capabilities for the MCP server implementation, including coverage reporting
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NijiVoice-MCP generate a voice saying 'Welcome to our service' with actor ID 123"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NijiVoice MCP
FastMCPを使用したにじボイスAPIのMCPサーバー実装です。
概要
このMCPサーバーは、にじボイスAPIを利用して音声合成を行うための機能を提供します。主な機能は以下の通りです:
利用可能な声優(Voice Actor)の一覧取得
テキストから音声ファイルを生成
クレジット残高の確認
Related MCP server: VOICEVOX TTS MCP
前提条件
インストール方法
リポジトリをクローンします:
git clone https://github.com/ryoooo/nijivoice-mcp-beta.git cd nijivoice-mcp-betauv を使用して仮想環境を作成して依存関係をインストールします:
uv venv source .venv/bin/activate # Linux/Mac # または .venv\Scripts\activate # Windows uv pip install -e ..envファイルを作成し、にじボイスAPIのキーを設定します:NIJIVOICE_API_KEY=your_api_key_here
使い方
MCPサーバーの起動
開発モードでサーバーを起動するには:
uv run fastmcp dev server.py本番モードでサーバーを起動するには:
uv run fastmcp run server.pyインストールして使用
MCPサーバーをインストールして使用するには:
uv run fastmcp install server.py機能
以下の機能が利用可能です:
ツール(Tools)
get_voice_actors(): 利用可能な声優の一覧を取得generate_voice(script, actor_id, speed, emotional_level, sound_duration, format): 音声を生成get_credit_balance(): クレジット残高を取得
リソース(Resources)
voice-actors://list: 声優一覧リソースvoice-actors://{actor_id}: 特定の声優の情報を取得credit://balance: クレジット残高リソース
プロンプト(Prompt)
voice_generation_prompt(): 音声生成に関するプロンプトを提供
音声生成パラメータ
音声生成時に以下のパラメータを指定できます:
script: 読み上げるテキスト(最大3,000文字)(必須)actor_id: 使用する声優のID(省略時は最初の声優を使用)speed: 読み上げスピード(0.4~3.0、デフォルト: 1.0)emotional_level: 感情レベル(0.0~1.5、デフォルト: -1.0 = 声優のデフォルト設定を使用)sound_duration: 音素発音の長さ(0.0~1.7、デフォルト: -1.0 = 声優のデフォルト設定を使用)format: 音声フォーマット("mp3"または"wav"、デフォルト: "mp3")
レスポンス形式
音声生成時のレスポンス形式は以下の通りです:
{
"generatedVoice": {
"audioFileUrl": "音声再生用のURL",
"audioFileDownloadUrl": "音声ダウンロード用のURL",
"duration": 1312, // 音声の長さ(ミリ秒)
"remainingCredits": 3613 // 生成後の残りクレジット
}
}テスト
テストを実行するには:
uv run pytest詳細なテスト結果を表示するには:
uv run pytest -vカバレッジレポートを生成するには:
uv run pytest --cov=nijivoiceライセンス
謝辞
Available Tools
3 toolsgenerate_voiceA
音声を生成してその結果を返す
Args:
script: 読み上げるテキスト(最大3,000文字)(必須)
actor_id: 使用するVoice ActorのID(省略時は利用可能な最初のアクターを使用)
speed: 読み上げスピード(0.4~3.0、デフォルト: 1.0)
emotional_level: 感情レベル(0.0~1.5、デフォルト: -1.0は声優のデフォルトを使用)
sound_duration: 音素発音の長さ(0.0~1.7、デフォルト: -1.0は声優のデフォルトを使用)
format: 音声フォーマット("mp3"または"wav"、デフォルト: "mp3")
Returns:
以下を含む音声生成レスポンス:
- audioFileUrl: 音声再生用のURL
- audioFileDownloadUrl: 音声ダウンロード用のURL
- duration: 音声の長さ(ミリ秒)
- remainingCredits: 生成後の残りクレジット
Inputs: script (required), actor_id, speed, emotional_level, +2 more.
get_credit_balanceB
クレジット残高を取得
Returns:
クレジット残高
Inputs: no named parameters.
get_voice_actorsC
Get the list of voice actors.
Returns:
A list of voice actors with their details.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose with no overlap: generate_voice creates audio, get_credit_balance checks account status, and get_voice_actors lists available resources. An agent can easily distinguish between content generation, account management, and resource listing functions.
The tools follow a consistent verb_noun pattern (generate_voice, get_credit_balance, get_voice_actors) with clear, descriptive names. The minor deviation is that two tools use 'get_' prefix while one uses 'generate_', but this reflects their distinct actions appropriately.
Three tools is reasonable for a voice generation service, covering the core workflow: listing actors, generating voice, and checking credits. While slightly minimal, each tool earns its place without redundancy, though additional utilities like voice preview or actor filtering could enhance completeness.
The toolset covers essential operations for voice generation: resource discovery (get_voice_actors), content creation (generate_voice), and account management (get_credit_balance). Minor gaps include lack of update/delete operations for generated content or advanced actor filtering, but core workflows are fully supported.
Related MCP Connectors
AI voice generation: text-to-speech and voice cloning from any MCP client.
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)
Remote text-to-speech MCP server with text_to_speech and list_voices tools. Free plan.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables LLMs to generate spoken audio from text using OpenAI's Text-to-Speech API, supporting various voices, models, and audio formats.11MIT
- AlicenseAqualityCmaintenanceA text-to-speech MCP server that enables AI assistants to speak using the VOICEVOX engine with support for multi-character conversations. It features queue management, low-latency streaming via FFplay, and cross-platform playback across Windows, macOS, and Linux.7149 npm16ISC
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides text-to-speech, speech-to-text, and voice management via ElevenLabs API.1MIT
- AlicenseAqualityDmaintenanceA full-featured MCP server for the ElevenLabs API that brings text-to-speech, speech-to-text, voice cloning, sound effects, music, audio isolation, dubbing, and account tools to any MCP client.28MIT