gemini-tts-mcp
This MCP server turns text into speech using Gemini TTS, with automatic API-key rotation and model fallback.
Generate speech from text via
generate_speech(returns the path to the generated audio file)Pick a voice from the ~30-voice multilingual catalog (default
Puck); any voice speaks the language of the input textStyle the delivery with
style_instruction(e.g. "softly", "cheerfully") and shift pitch withpitch_factorOverride the model or let it auto-fall back across Gemini TTS models
Browse/filter voices by gender and/or tone (
list_voices,list_voices_by_gender)Manage keys โ
reload_keysrefreshes the pool fromkeys.json/env,pool_statusreports how many are configured
Provides text-to-speech generation using Gemini TTS models, with features like key rotation, model fallback, 30 multilingual voices, pitch control, and configurable speaking styles.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gemini-tts-mcp say 'Hello, world!' in a friendly tone"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.8-flash-ttsโgemini-3.8-flash-lite-ttsโgemini-3.1-flash-tts-previewโgemini-2.5-flash-preview-tts๐ญ Style the right way per model โ the 3.8 family uses the new Interactions API with
speech_metadata(transcript stays verbatim, inline vocal tags like<sigh>work); older models get the style prepended๐งผ Auto cleanup + mastering โ trims the trailing noise burst some models append, normalizes loudness (I=-16 LUFS), subtle presence EQ, 48 kHz output
๐ฃ๏ธ 30 voices โ full catalog with gender, tone, and description
๐ Filter by gender/tone โ
list_voices(male/female)or by tone name๐๏ธ Pitch control โ
pitch_factorparameter (ffmpeg-based)๐ Multilingual โ any voice speaks the language of your input text
๐งฉ MCP-native โ register in any MCP host (Claude Desktop, Hermes Agent, etc.)
Related MCP server: gemini-webapi-mcp
Quick Start
1. Install
โ ๏ธ Not available on PyPI โ install from source (see below).
pip install mcp google-genaiinstalls dependencies only, not this project.
Option A โ Clone the repo (recommended):
git clone https://github.com/alarconcesar/gemini-tts-mcp.git
cd gemini-tts-mcp
pip install mcp google-genaiOption B โ From anywhere (source must be in PYTHONPATH):
pip install mcp google-genai
# then clone & run from the repo directory2. 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.server4. 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 |
| Text โ audio file (WAV, MP3, OGG, M4A, FLAC) |
| Browse all 30 voices (filter by gender/tone) |
| Shortcut: |
| Refresh API key pool from disk/env |
| Check how many keys are configured |
generate_speech parameters
Param | Default | Description |
| (required) | Text to vocalize |
|
| Any of the 30 voices |
|
| Speaking style e.g. "softly", "cheerfully", "in a calm tone" |
|
| >1 = higher pitch, <1 = lower |
|
| Output format: |
|
| Override model (auto fallback if omitted) |
|
| 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
.gitignoreexcludeskeys.jsonkeys.json.exampleprovided as a template
License
MIT
Available Tools
5 toolsgenerate_speechA
Generate speech audio from text using Gemini TTS.
Rotates across all configured API keys and falls back between models. Gemini TTS voices are multilingual โ any voice speaks the language of the input text automatically.
Args: text: The text content to vocalize. voice_name: Gemini voice (use list_voices to browse). Default: Puck. style_instruction: Optional speaking-style hint prepended to text, e.g. "speak softly", "cheerfully", "in a calm tone". pitch_factor: Pitch adjustment. 1.0 = no change, >1 = higher, <1 = lower. model: Model override. Default: gemini-3.1-flash-tts-preview, falls back to gemini-2.5-flash-preview-tts. output_path: Optional custom output path for the WAV file.
Returns: Absolute path to the generated WAV file, or error description.
Inputs: text (required), model, voice_name, output_path, +2 more. Returns: result
list_voicesA
List all Gemini TTS voices with gender, tone, and description.
Optionally filter by gender and/or tone. Gemini TTS voices are multilingual โ any voice speaks the language of the input text.
Args: filter_gender: Filter by "male", "female" (case-insensitive). filter_tone: Filter by tone name, e.g. "Soft", "Bright", "Firm", "Warm", "Upbeat", "Clear", "Smooth", "Informative", "Easy-going", etc. (case-insensitive).
Returns: A formatted table of matching voices.
Inputs: filter_tone, filter_gender. Returns: result
list_voices_by_genderA
List Gemini TTS voices filtered by gender.
Args: gender: "male" or "female" (case-insensitive).
Returns: A formatted table of matching voices.
Inputs: gender (required). Returns: result
pool_statusA
Check how many API keys are currently configured.
Inputs: no named parameters. Returns: result
reload_keysA
Reload API keys from ~/.gemini-tts-mcp/keys.json or env vars.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 5 tools
list_voices and list_voices_by_gender are redundant; list_voices already supports gender filtering via an argument, making the latter unnecessary and causing confusion.
Most tools follow verb_noun pattern (generate_speech, list_voices, reload_keys), but pool_status is a noun phrase and list_voices_by_gender includes a preposition, breaking the pattern slightly.
5 tools is reasonable for a TTS server, though list_voices_by_gender is redundant and could be removed without loss.
Covers core TTS functionality (generation, voice listing, key management), but lacks tools for voice details or configuration persistence.
Related MCP Connectors
Remote text-to-speech MCP server with text_to_speech and list_voices tools. Free plan.
Hosted text-to-speech MCP server: 66 voices in 9 languages, long-form narration, podcasts.
MCP server for Text-to-Speech
Free TTS/ASR/OCR, dubbing and video-transcription API over MCP. Bearer token or guest trial.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that leverages the Microsoft Edge TTS service to provide high-quality text-to-speech capabilities across over 80 languages. It enables users to generate audio files, query available voices, and create subtitle files using natural language commands.-
- AlicenseAqualityCmaintenanceMCP server for Google Gemini that enables image generation, editing, file analysis, and chat using browser cookies, no API key needed.669AGPL 3.0
- AlicenseBqualityDmaintenanceMCP server for generating images and audio using Google's Gemini AI models.2106 PyPI2MIT
- AlicenseNot gradedqualityBmaintenanceA text-to-speech MCP server with 48 voices across 9 languages, supporting emotion spans, SFX tags, and multi-speaker dialogue. Deployable via a single npx command with built-in guardrails and swappable backends.MIT