Piper TTS MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Piper TTS MCP Serversay 'Welcome to the Piper TTS system.'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Piper TTS MCP Server
A Model Context Protocol (MCP) server that provides Text-to-Speech (TTS) capabilities using the Piper engine. This server allows AI models to "speak" by generating high-quality voice messages from text.
Features
High-Quality TTS: Uses Piper for fast, local speech synthesis.
MCP Integration: Compatible with any MCP client supporting HTTP transport.
Audio Streaming: Returns a URL to the generated audio in Ogg Opus format (optimized for web/mobile).
Automatic Model Management: Automatically downloads requested models if they are not present locally.
LRU Caching: Stores the last 3 generated audio files in memory for retrieval.
Related MCP server: Kokoro TTS MCP Server
Installation & Setup
Prerequisites
Docker and Docker Compose
Or Python 3.12 with
uv
Using Docker (Recommended)
Build the image:
docker compose buildStart the server:
docker compose up piper-mcpThe server will be running at
http://localhost:8000.
Local Development
Install dependencies:
uv syncRun the server:
# Use HTTP transport by default export MCP_TRANSPORT=http uv run server.py
MCP Server Connection
To connect, use the following configuration (HTTP transport):
{
"mcpServers": {
"piper-tts": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}Testing
To run the automated tests using Docker (uses the test profile):
docker compose --profile test up testsOr locally:
pytest tests/MCP Tool
After connecting, the following tool will be available:
speak: Generates a voice message from text.Arguments:
text(string) — the text to speak.Result: A JSON object containing
status,audio_url, and metadata (size, format).
Model Selection
The voice model is selected using the MODEL environment variable.
Default Model:
ru_RU-denis-medium.Logic:
At startup, the server checks for
.onnxand.onnx.jsonfiles in the working directory.If not found, it automatically downloads them from the official Piper repository.
Change the
MODELvalue indocker-compose.ymlto switch voices.
Project Repositories
Piper Engine: https://github.com/OHF-Voice/piper1-gpl
Piper Voices (Model List): https://github.com/OHF-Voice/piper1-gpl/blob/main/docs/VOICES.md — check this repository to see all available voices and their names.
This server cannot be deployed
Maintenance
Related MCP Connectors
AI voice generation: text-to-speech and voice cloning from any MCP client.
Generate AI images, videos, music, SFX & speech in any AI assistant. Results appear inline in chat.
- ChamadeOAuthio.chamade
Voice and chat for AI agents — Discord, Teams, Meet, Slack, Zoom, Telegram, WhatsApp, NC Talk, SIP
Give your AI a real phone: place calls, send SMS, fetch recordings and transcripts. Local or hosted.
Related MCP Servers
- FlicenseAqualityDmaintenanceIntegrates Piper TTS into the Model Context Protocol, allowing AI assistants to convert text to speech and play it through speakers with customizable voice settings and volume control.11-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to generate and play high-quality text-to-speech audio using the Kokoro model, with support for multiple voices, adjustable speaking speed, and audio caching.-
- AlicenseAqualityFmaintenanceEnables text-to-speech conversion using ElevenLabs API with voice management, streaming support, and multiple models.51MIT
- AlicenseNot gradedqualityDmaintenanceEnables speech-to-text and text-to-speech conversion using OpenAI-compatible APIs. Supports customizable models, voices, and output directories.GPL 3.0