minimax-tts-mcp
A lightweight MCP server that converts text to speech using MiniMax TTS API, exposing a generate_speech tool for AI to speak with customizable emotion, speed, and language.
README
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 protocol - AI 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.txt
2. Configure
cp .env.example .env
# Edit .env with your MiniMax API key and voice ID
Get your API key and voice ID from MiniMax Platform.
3. Run
python server.py
Server starts at http://localhost:5000.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/mcp |
POST | MCP protocol endpoint for AI tool calls |
/tts |
POST | Direct TTS — post JSON, get mp3 file |
/audio/<filename> |
GET | Serve generated audio files |
/health |
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.mp3
Deploy
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.target
Notes
- 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.