gemini-tts-mcp

gemini-tts-mcp

Multi-key Gemini TTS MCP server with automatic API key rotation, model fallback, and 30 multilingual voices. Enables text-to-speech generation through MCP tools.

Category
访问服务器

README

Gemini TTS MCP

Multi-key Gemini TTS server (MCP) with automatic API key rotation and model fallback.

No baked-in voice, accent, or persona — all parameters are explicit.

Features

  • 🔄 Key rotation — pool of Gemini API keys; auto-rotates on quota/error
  • 📉 Model fallback — tries gemini-3.1-flash-tts-previewgemini-2.5-flash-preview-tts
  • 🗣️ 30 voices — full catalog with gender, tone, and description
  • 🔍 Filter by gender/tonelist_voices(male/female) or by tone name
  • 🎚️ Pitch controlpitch_factor parameter (ffmpeg-based)
  • 🌐 Multilingual — any voice speaks the language of your input text
  • 🧩 MCP-native — register in any MCP host (Claude Desktop, Hermes Agent, etc.)

Quick Start

1. Install

⚠️ Note: This project is not on PyPI yet. The commands below install dependencies (mcp SDK + google-genai). You also need the source code.

Option A — Clone the repo (recommended):

git clone https://github.com/alarconcesar/gemini-tts-mcp.git
cd gemini-tts-mcp
pip install mcp google-genai

Option B — From anywhere (source must be in PYTHONPATH):

pip install mcp google-genai
# then clone & run from the repo directory

2. Set up API keys

Create ~/.gemini-tts-mcp/keys.json:

["AIzaSy...key1", "AIzaSy...key2"]

Or set an env var: export GEMINI_API_KEY="AIzaSy...your_key"

3. Run (from the repo directory)

cd gemini-tts-mcp
python -m gemini_tts_mcp.server

4. Register in any MCP host

Hermes Agent (~/.hermes/config.yaml):

mcp_servers:
  gemini-tts:
    command: "python"
    args: ["-m", "gemini_tts_mcp.server"]

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "gemini-tts": {
      "command": "python",
      "args": ["-m", "gemini_tts_mcp.server"]
    }
  }
}

Tools

Tool Description
generate_speech Text → WAV file
list_voices Browse all 30 voices (filter by gender/tone)
list_voices_by_gender Shortcut: voice "male" or voice "female"
reload_keys Refresh API key pool from disk/env
pool_status Check how many keys are configured

generate_speech parameters

Param Default Description
text (required) Text to vocalize
voice_name Puck Any of the 30 voices
style_instruction "" Speaking style e.g. "softly", "cheerfully", "in a calm tone"
pitch_factor 1.0 >1 = higher pitch, <1 = lower
model null Override model (auto fallback if omitted)
output_path null Custom WAV path

Voice Catalog

All 30 voices are multilingual — any voice speaks the language of your input text.

Female voices (16):

Voice Tone Description
Achernar Soft Gentle, mellow tone
Aoede Breezy Casual, relaxed delivery
Autonoe Bright Clear, vibrant expression
Callirrhoe Easy-going Laid-back, comfortable style
Despina Smooth Refined, elegant tone
Erinome Clear Crisp, distinct articulation
Gacrux Mature Experienced, seasoned quality
Kore Firm Assertive, confident delivery
Laomedeia Upbeat Positive, energetic style
Leda Youthful Young-sounding, fresh voice
Pulcherrima Forward Direct, straightforward style
Sterope Forward Bold, direct presentation
Sulafat Warm Comforting, affectionate quality
Vindemiatrix Gentle Soft, kind delivery
Zephyr Bright High energy, clear articulation

Male voices (15):

Voice Tone Description
Achird Friendly Warm, approachable tone
Algieba Smooth Polished, fluid delivery
Algenib Gravelly Rough, textured quality
Alnilam Firm Steady, resolute delivery
Charon Informative Educational, explanatory style
Enceladus Breathy Soft, airy quality
Fenrir Excitable Energetic, animated expression
Iapetus Clear Precise, well-articulated
Orus Firm Strong, authoritative tone
Puck Upbeat Cheerful, enthusiastic tone
Rasalgethi Informative Educational, instructive
Sadachbia Lively Energetic, spirited expression
Sadaltager Knowledgeable Expert, well-informed tone
Schedar Even Balanced, consistent tone
Umbriel Easy-going Relaxed, conversational
Zubenelgenubi Casual Informal, conversational

Key management

Keys are loaded from ~/.gemini-tts-mcp/keys.json (a JSON array of strings), with env var fallback. The server rotates through the pool on each request, skipping failed keys per model. If all keys fail on one model, it falls back to the next model.

Use reload_keys() to refresh without restarting.

Security

  • API keys never leave your machine — the MCP server runs locally
  • .gitignore excludes keys.json
  • keys.json.example provided as a template

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选