TTS-MCP
Leverages OpenAI's TTS API to convert text to high-quality speech with multiple voice options, models, and output formats
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
tts-mcp
A Model Context Protocol (MCP) server and command-line tool for high-quality text-to-speech generation using the OpenAI TTS API.
Main Features
MCP Server: Integrate text-to-speech capabilities with Claude Desktop and other MCP-compatible clients
Voice Options: Support for multiple voice characters (alloy, nova, echo, etc.)
High-Quality Audio: Support for various output formats (MP3, WAV, OPUS, AAC)
Customizable: Configure speech speed, voice character, and additional instructions
CLI Tool: Also available as a command-line utility for direct text-to-speech conversion
Related MCP server: MCP FishAudio Server
Installation
Method 1: Install from Repository
# Clone the repository
git clone https://github.com/nakamurau1/tts-mcp.git
cd tts-mcp
# Install dependencies
npm install
# Optional: Install globally
npm install -g .Method 2: Run Directly with npx (No Installation Required)
# Start the MCP server directly
npx tts-mcp tts-mcp-server --voice nova --model tts-1-hd
# Use the CLI tool directly
npx tts-mcp -t "Hello, world" -o hello.mp3MCP Server Usage
The MCP server allows you to integrate text-to-speech functionality with Model Context Protocol (MCP) compatible clients like Claude Desktop.
Starting the MCP Server
# Start with default settings
npm run server
# Start with custom settings
npm run server -- --voice nova --model tts-1-hd
# Or directly with API key
node bin/tts-mcp-server.js --voice echo --api-key your-openai-api-keyMCP Server Options
Options:
-V, --version Display version information
-m, --model <model> TTS model to use (default: "gpt-4o-mini-tts")
-v, --voice <voice> Voice character (default: "alloy")
-f, --format <format> Audio format (default: "mp3")
--api-key <key> OpenAI API key (can also be set via environment variable)
-h, --help Display help informationIntegrating with MCP Clients
The MCP server can be used with Claude Desktop and other MCP-compatible clients. For Claude Desktop integration:
Open the Claude Desktop configuration file (typically at
~/Library/Application Support/Claude/claude_desktop_config.json)Add the following configuration, including your OpenAI API key:
{
"mcpServers": {
"tts-mcp": {
"command": "node",
"args": ["full/path/to/bin/tts-mcp-server.js", "--voice", "nova", "--api-key", "your-openai-api-key"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key"
}
}
}
}Alternatively, you can use npx for easier setup:
{
"mcpServers": {
"tts-mcp": {
"command": "npx",
"args": ["-p", "tts-mcp", "tts-mcp-server", "--voice", "nova", "--model", "gpt-4o-mini-tts"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key"
}
}
}
}You can provide the API key in two ways:
Direct method (recommended for testing): Include it in the
argsarray using the--api-keyparameterEnvironment variable method (more secure): Set it in the
envobject as shown above
Security Note: Make sure to secure your configuration file when including API keys.
Restart Claude Desktop
When you ask Claude to "read this text aloud" or similar requests, the text will be converted to speech
Available MCP Tools
text-to-speech: Tool for converting text to speech and playing it
CLI Tool Usage
You can also use tts-mcp as a standalone command-line tool:
# Convert text directly
tts-mcp -t "Hello, world" -o hello.mp3
# Convert from a text file
tts-mcp -f speech.txt -o speech.mp3
# Specify custom voice
tts-mcp -t "Welcome to the future" -o welcome.mp3 -v novaCLI Tool Options
Options:
-V, --version Display version information
-t, --text <text> Text to convert
-f, --file <path> Path to input text file
-o, --output <path> Path to output audio file (required)
-m, --model <n> Model to use (default: "gpt-4o-mini-tts")
-v, --voice <n> Voice character (default: "alloy")
-s, --speed <number> Speech speed (0.25-4.0) (default: 1)
--format <format> Output format (default: "mp3")
-i, --instructions <text> Additional instructions for speech generation
--api-key <key> OpenAI API key (can also be set via environment variable)
-h, --help Display help informationSupported Voices
The following voice characters are supported:
alloy (default)
ash
coral
echo
fable
onyx
nova
sage
shimmer
Supported Models
tts-1
tts-1-hd
gpt-4o-mini-tts (default)
Output Formats
The following output formats are supported:
mp3 (default)
opus
aac
flac
wav
pcm
Environment Variables
You can also configure the tool using system environment variables:
OPENAI_API_KEY=your-api-key-hereLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Text-to-Speech
Hosted text-to-speech MCP server: 66 voices in 9 languages, long-form narration, podcasts.
Remote text-to-speech MCP server with text_to_speech and list_voices tools. Free plan.
MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides text-to-speech capabilities using the Kokoro TTS model, offering multiple voice options and customizable speech parameters.433 npm1MIT
- AlicenseBqualityDmaintenanceAn MCP (Model Context Protocol) server that provides seamless integration between Fish Audio's Text-to-Speech API and LLMs like Claude, enabling natural language-driven speech synthesis.2171 npm15MIT
- AlicenseAqualityDmaintenanceA cross-platform MCP server that enables Claude to speak using Microsoft Edge TTS with support for over 300 voices across 50+ languages. It requires no API keys and allows for customization of speech rate, volume, and pitch.339 PyPI1MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol server for FlowSpeech text-to-speech. It lets MCP-compatible clients generate human-like audio with context-aware emotion control, pause control, multi-speaker dialogue, and 30+ available voices.652 npmMIT