Skip to main content
Glama

minimax-tts-mcp

一个轻量级的 MCP(模型上下文协议)服务器,让 AI 能够说话。输入文本,输出音频 URL。

使用 Flask + MiniMax TTS API 构建。

功能

  • 通过 MCP 协议暴露 generate_speech 工具

  • AI 发送文本 → 服务器调用 MiniMax TTS → 返回可播放的 mp3 URL

  • 支持情绪控制、语速调整和语言选择(粤语、普通话等)

Related MCP server: Blabber-MCP

快速开始

1. 克隆并安装

git clone https://github.com/YOUR_USERNAME/minimax-tts-mcp.git
cd minimax-tts-mcp
pip install -r requirements.txt

2. 配置

cp .env.example .env
# Edit .env with your MiniMax API key and voice ID

MiniMax 平台 获取你的 API 密钥和语音 ID。

3. 运行

python server.py

服务器启动于 http://localhost:5000

端点

端点

方法

描述

/mcp

POST

用于 AI 工具调用的 MCP 协议端点

/tts

POST

直接 TTS — 提交 JSON,获取 mp3 文件

/audio/<filename>

GET

提供生成的音频文件

/health

GET

健康检查

MCP 集成

添加到你的 MCP 客户端配置中:

{
  "mcpServers": {
    "tts": {
      "url": "http://localhost:5000/mcp"
    }
  }
}

服务器暴露一个工具:

generate_speech

参数

类型

必填

描述

text

string

要朗读的文本

emotion

string

neutral, happy, sad, angry, fearful, surprised, disgusted

speed

number

0.5 - 2.0(默认 0.9)

language

string

例如 "Chinese,Yue" 表示粤语

直接 TTS 用法

curl -X POST http://localhost:5000/tts \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello world", "speed": 1.0}' \
  --output speech.mp3

部署

适用于任何运行 Python 的环境——VPS、云虚拟机或容器。如需公网访问,请将其置于反向代理(nginx/caddy)之后并启用 HTTPS。

使用 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

注意事项

  • 生成的音频文件存储在 /tmp 中,不会自动清理。生产环境请添加 cron 任务或清理逻辑。

  • MiniMax API 是付费服务。请查看其 TTS 使用定价。

  • 语音克隆需要先在 MiniMax 平台上设置自定义语音。

许可证

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)

  • MCP server for Hailuo (MiniMax) AI video generation

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

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