mcp-tts
MCP Server for Text to Speech
claude mcp add --transport stdio blacktop-mcp-tts mcp-tts \ --env OPENAI_API_KEY="your-openai-api-key" \ --env MCP_TTS_NO_PLAY="true|false" \ --env GOOGLE_AI_API_KEY="your-google-api-key" \ --env ELEVENLABS_API_KEY="your-elevenlabs-api-key" \ --env MCP_TTS_OUTPUT_DIR="/path/to/audio" \ --env ELEVENLABS_VOICE_ID="optional-voice-id" \ --env OPENAI_TTS_INSTRUCTIONS="Speak in a cheerful and positive tone" \ --env MCP_TTS_ALLOW_CONCURRENT="true|false" \ --env MCP_TTS_SUPPRESS_SPEAKING_OUTPUT="true|false"
How to use
mcp-tts is an MCP server that exposes multiple text-to-speech capabilities through the MCP protocol. It registers four tools you can call via MCP: say_tts (macOS built-in say), elevenlabs_tts (ElevenLabs API voices), google_tts (Google Gemini TTS models), and openai_tts (OpenAI TTS with various voices). You can run mcp-tts directly as a server and configure environment variables or CLI flags to control behavior such as concurrency, output saving, and speech suppression. Tools support different voice options, quality models, and rate/speed controls, allowing you to tailor audio output to your needs. The server is designed to integrate with Claude Desktop, Codex CLI, Gemini CLI, or any MCP-enabled client. To use the tools, ensure you have the necessary API keys for cloud-based services and optionally set environment variables to tweak behavior like concurrency, output saving, and spoken output formatting.
How to install
Prerequisites:
- Go installed on your system (for building or fetching the mcp-tts binary).
- Access to the internet to download the binary via go install or prebuilt releases.
Install steps:
- Install the MCP TTS server:
go install github.com/blacktop/mcp-tts@latest
- Verify installation:
mcp-tts --help
- Configure environment variables (see README for details):
export ELEVENLABS_API_KEY=your_key
export ELEVENLABS_VOICE_ID=your_voice_id
export GOOGLE_AI_API_KEY=your_key
export OPENAI_API_KEY=your_key
export OPENAI_TTS_INSTRUCTIONS="Speak in a cheerful and positive tone"
export MCP_TTS_OUTPUT_DIR=/path/to/audio
export MCP_TTS_NO_PLAY=false
- Run the server:
mcp-tts
- Connect via MCP-using clients or add to Claude/Codex/Gemini settings as shown in the README.
Additional notes
Notes and tips:
- You can enable concurrent TTS by setting MCP_TTS_ALLOW_CONCURRENT to true, or disable it to enforce sequential playback for all requests.
- Suppress the default 'Speaking:' output by setting MCP_TTS_SUPPRESS_SPEAKING_OUTPUT to true or using the --suppress-speaking-output flag.
- Saving audio to disk requires enabling MCP_TTS_OUTPUT_DIR (and optionally MCP_TTS_NO_PLAY to skip playback). Files are saved with unique names like tts_{timestamp}_{hash}.{ext}.
- Each provider has its own configuration requirements (e.g., macOS say_tts is macOS-only; cloud-based providers require valid API keys and may incur costs).
- When using concurrent TTS, be mindful of potential overlapping audio. This feature is intended for advanced workflows where simultaneous speech is required.
- If you’re integrating with Claude/Code/Gemini clients, ensure the correct environment variables are passed to mcp-tts in your MCP server configuration.
Related MCP Servers
weather
A lightweight Model Context Protocol (MCP) server that enables AI assistants like Claude to retrieve and interpret real-time weather data. Discuss on Hacker News:
sandbox
A Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.
github-brain
An experimental GitHub MCP server with local database.
tasker
An MCP server for Android's Tasker automation app.
kai
An MCP Server for Kubernetes
chromedp
MCP server for browser automation using chromedp