Labsco
MCP SERVER

Kokoro TTS

by giannisanni

Turn text into speech locally, or push synthesis to a GPU box with one environment variable.

Speech Synthesis & Transcription
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

One command — uv pip install .