minimax-tts-mcp
minimax-tts-mcp
A lightweight MCP (Model Context Protocol) server that gives AI the ability to speak. Text in, audio URL out.
Built with Flask + MiniMax TTS API.
What it does
Exposes a
generate_speechtool via MCP protocolAI sends text → server calls MiniMax TTS → returns a playable mp3 URL
Supports emotion control, speed adjustment, and language selection (Cantonese, Mandarin, etc.)
Quick Start
1. Clone & install
git clone https://github.com/YOUR_USERNAME/minimax-tts-mcp.git
cd minimax-tts-mcp
pip install -r requirements.txt2. Configure
cp .env.example .env
# Edit .env with your MiniMax API key and voice IDGet your API key and voice ID from MiniMax Platform.
3. Run
python server.pyServer starts at http://localhost:5000.
Endpoints
Endpoint | Method | Description |
| POST | MCP protocol endpoint for AI tool calls |
| POST | Direct TTS — post JSON, get mp3 file |
| GET | Serve generated audio files |
| GET | Health check |
MCP Integration
Add to your MCP client config:
{
"mcpServers": {
"tts": {
"url": "http://localhost:5000/mcp"
}
}
}The server exposes one tool:
generate_speech
Parameter | Type | Required | Description |
text | string | yes | Text to speak |
emotion | string | no | neutral, happy, sad, angry, fearful, surprised, disgusted |
speed | number | no | 0.5 - 2.0 (default 0.9) |
language | string | no | e.g. "Chinese,Yue" for Cantonese |
Direct TTS Usage
curl -X POST http://localhost:5000/tts \
-H "Content-Type: application/json" \
-d '{"text": "Hello world", "speed": 1.0}' \
--output speech.mp3Deploy
Works anywhere that runs Python — a VPS, cloud VM, or container. For public access, put it behind a reverse proxy (nginx/caddy) with HTTPS.
Example with systemd:
# /etc/systemd/system/tts-mcp.service
[Unit]
Description=MiniMax TTS MCP Server
[Service]
WorkingDirectory=/path/to/minimax-tts-mcp
EnvironmentFile=/path/to/minimax-tts-mcp/.env
ExecStart=/usr/bin/python3 server.py
Restart=always
[Install]
WantedBy=multi-user.targetNotes
Generated audio files are stored in
/tmpand not auto-cleaned. For production, add a cron job or cleanup logic.MiniMax API is a paid service. Check their pricing for TTS usage.
Voice cloning requires setting up a custom voice on MiniMax platform first.
License
MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jb4f7mhbvf-svg/minimax-tts-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server