generate_speechLABSCO SUMMARY
The same tool runs on your laptop or against a GPU box — the switch is one URL.
By default Kokoro synthesizes locally, which means the model sits on your machine. Setting KOKORO_BASE_URL sends the call to an OpenAI-compatible endpoint such as kokoro-fastapi instead, and the local dependencies stop being needed at all.
What it is
A text-to-speech MCP server built on the Kokoro engine. It exposes one tool that synthesizes speech, saves it to a file or plays it back.
What you get
- generate_speech, taking text plus optional voice, speed, save_path and play_audio
- Voice selection, defaulting to af_heart, and a speed multiplier defaulting to 1.0
- Save the audio to a directory, play it immediately, or both
- Playback on Windows, macOS and Linux, using start, afplay and aplay respectively
- An OpenAI-compatible remote backend option, so no local torch or kokoro is needed
- A Dockerfile, with the remote backend passed in as an environment variable
Requirements
Python 3.10 or higher and the uv package manager; uv venv then uv pip install . in the cloned repository. To offload synthesis instead, set KOKORO_BASE_URL to an OpenAI-compatible endpoint, with KOKORO_API_KEY and KOKORO_MODEL if that endpoint needs them.
Setup effort
Build from source — git clone https://github.com/giannisanni/kokoro-tts-mcp.git
USE CASES
Hearing a draft read back to you
Pass the text with play_audio on and listen instead of re-reading it.
Producing audio files for something you are building
Set a save path and collect the files rather than playing them.
Moving synthesis off a laptop
Point KOKORO_BASE_URL at a GPU-backed endpoint and skip the local install entirely.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
- Python 3.10 or higher
- the uv package manager
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/giannisanni/kokoro-tts-mcp.git
cd kokoro-tts-mcp
uv venv
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
uv pip install .MCP Clients
Any MCP client
{
"mcpServers": {
"kokoro-tts": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_KOKORO_TTS_MCP>",
"run",
"tts-mcp.py"
]
}
}
}<YOUR_PATH_TO_KOKORO_TTS_MCP> is the full path of your clone. To send synthesis to an OpenAI-compatible endpoint such as kokoro-fastapi instead of running Kokoro locally, add "env": {"KOKORO_BASE_URL": "http://localhost:8880/v1"} to the entry (plus KOKORO_API_KEY and KOKORO_MODEL if that endpoint needs them).