- Home
- MCP servers
- Piper TTS
Piper TTS
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"cryptodappdev-piper-tts-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/piper-tts-mcp",
"run",
"server.py"
]
}
}
}You can run a Piper TTS powered MCP server that exposes a speak tool to convert text to speech and playback audio directly through your speakers. It’s lightweight, configurable, and works with your existing MCP client to deliver quick, high‑quality speech audio on demand.
How to use
Use the speak tool from your MCP client to convert text into speech and play it locally. You can adjust voice, speed, variation, and volume to tailor the output to your needs.
Configure the speak tool in your MCP client to run the local Piper TTS MCP server. The server exposes a speak endpoint that takes text and playback settings, then outputs audio through your speakers.
Examples of how you can invoke speak in your MCP client include using the tool with default settings, increasing volume, or tweaking voice parameters for faster or more varied speech.
How to install
Prerequisites you need before installing are Python 3.12+ and a Piper TTS service running on localhost:5000.
-
Start Piper TTS service using Docker (recommended) or Docker Build.
-
Add the MCP server as a stdio entry in your MCP client configuration to run the local server script with Ultraviolet.
-
Run the MCP client and ensure the speak tool is available in your environment.
Concrete steps you can follow are shown below for starting the Piper TTS service and wiring up the MCP client.
Voice models and customization
The default voice model is en_GB-cori-high (British English, female). You can switch to a different model by updating the voice in the deployment configuration and rebuilding as needed.
To use a different voice model, choose your model from the supported list, update the Dockerfile to download the new voice, and rebuild the image before redeploying.
Example approaches to switch voices include downloading the new model and updating the server entry to load that model at start.
Configuration examples
{
"mcpServers": {
"speak": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/piper-tts-mcp",
"run",
"server.py"
]
}
}
}
The above configuration runs the local Piper TTS MCP service via Ultraviolet. Adjust the directory to where you host your Piper TTS MCP files.
Voice models for deployment
To switch voice models in a Docker-based setup, update the Dockerfile to download and load your chosen voice model and set the start command accordingly.
# Download your preferred voice model
RUN python3 -m piper.download_voices your-chosen-voice-model
# Update the server command
CMD ["sh", "-c", "python3 -m piper.http_server -m your-chosen-voice-model"]
Usage examples
# Basic usage
speak("Hello, world!")
# With custom volume
speak("This is louder!", volume=0.5)
# With custom voice settings
speak("Fast and varied speech",
length_scale=0.8,
volume=0.3,
noise_scale=0.8)
Starting and testing the service
Start the Piper TTS service using Docker Compose or Docker Build as shown in the setup steps. Verify that the TTS service responds on port 5000 and that the speak tool in your MCP client returns audio playback without errors.
Notes
The server operates silently with no console output by default, while providing high‑quality speech output through your speakers.
Available tools
speak
Converts text to speech using Piper TTS and plays audio with configurable voice, speed, variation, and volume.