giannisankokoro-tts-mcp
Built by Metorial, the integration platform for agentic AI.
giannisankokoro-tts-mcp
Server Summary
Text-to-speech synthesis
Customizable voice settings
Adjustable speech speed
Audio file saving
Cross-platform audio playback
A Model Context Protocol (MCP) server that provides text-to-speech capabilities using the Kokoro TTS engine. This server exposes TTS functionality through MCP tools, making it easy to integrate speech synthesis into your applications.
uv package manageruv package manager:curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
uv pip install .
The server provides a single MCP tool generate_speech with the following parameters:
text (required): The text to convert to speechvoice (optional): Voice to use for synthesis (default: "af_heart")speed (optional): Speech speed multiplier (default: 1.0)save_path (optional): Directory to save audio filesplay_audio (optional): Whether to play the audio immediately (default: False)from mcp.client import Client
async with Client() as client:
await client.connect("kokoro-tts")
# Generate and play speech
result = await client.call_tool(
"generate_speech",
{
"text": "Hello, world!",
"voice": "af_heart",
"speed": 1.0,
"play_audio": True
}
)
Audio playback is supported on:
start)afplay)aplay)Add the following configuration to your MCP settings file:
{
"mcpServers": {
"kokoro-tts": {
"command": "/Users/giannisan/pinokio/bin/miniconda/bin/uv",
"args": [
"--directory",
"/Users/giannisan/Documents/Cline/MCP/kokoro-tts-mcp",
"run",
"tts-mcp.py"
]
}
}
}
[Add your license information here]