Provides text-to-speech capabilities through the Model Context Protocol, allowing applications to easily integrate speech synthesis with customizable voices, adjustable speech speed, and cross-platform audio playback support.
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]
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!