Gemini Audio MCP
Gemini Audio MCP is a professional-grade audio synthesis server leveraging Google's Gemini 2.5 and Lyria 3 AI models. It offers the following capabilities:
🌿 Generate Soundscapes (
generate_soundscape): Create immersive, vocal-free ambient audio (e.g., rainy forests, underwater environments) with optional image-guided mood, duration, and format settings.🎵 Generate Music (
generate_music): Produce songs, loops, or musical segments using Lyria 3 Pro or Clip models, with control over BPM, key, intensity, and vocal presence.🗣️ Generate Voice (
generate_voice): Synthesize expressive speech, narration, or character dialogue from text with custom tone/style directions.💥 Generate SFX (
generate_sfx): Create isolated, short-duration sound effects and foley (e.g., laser blasts, footsteps).🔀 Transition Soundscapes (
transition_soundscape): Crossfade seamlessly between two distinct audio environments.⚙️ Configure Server (
configure): View or update defaults for format, sample rate, bitrate, channels, duration, and auto-cleanup intervals.▶️ Play Audio (
play_audio): Play any local audio file using the system's default media player.🧹 Cleanup Assets (
cleanup_assets): Delete old generated audio files to free disk space.🔍 Check Dependencies (
check_dependencies): Verify required tools like FFmpeg are installed.
Additional features include multimodal image input to guide audio mood, a seed parameter for deterministic/reproducible outputs, and automatic looping to extend or create infinite soundscapes.
Provides audio format conversion and transcoding capabilities, enabling export of generated soundscapes and music to WAV, MP3, OGG, and FLAC formats.
Integrates with Google's Gemini 2.0 Multimodal Live API and Lyria 3 models (Pro and Clip) to generate dynamic environmental soundscapes, professional music, and high-fidelity audio content from text prompts.
🎵 Gemini Audio MCP
Gemini Audio MCP is a high-performance Model Context Protocol (MCP) server engineered for professional-grade audio synthesis. It leverages the Gemini 2.5 Multimodal Live API and Google DeepMind's Lyria 3 models to deliver high-fidelity environmental soundscapes, musical compositions, and expressive narration on-demand.
🛠 Prerequisites
Before deploying the server, ensure your environment meets the following technical requirements:
1. FFmpeg (Core Processing Engine)
Required for high-performance audio encoding, decoding, and transcoding.
macOS:
brew install ffmpegWindows:
winget install ffmpegor download from ffmpeg.org.Linux (Ubuntu/Debian):
sudo apt update && sudo apt install ffmpeg
2. Rust Toolchain (Compilation)
Required to build the server from source.
Install via rustup.rs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
3. Node.js & NPM (Runtime)
Required if using the pre-compiled NPM package.
Version:
node >= 18.0.0
Related MCP server: Talky Talky
🚀 Installation & Deployment
Global Installation (via NPX)
The fastest way to integrate the server into your MCP client (e.g., Claude Desktop).
{
"mcpServers": {
"gemini-audio": {
"command": "npx",
"args": ["-y", "gemini-audio-mcp"],
"env": {
"GEMINI_API_KEY": "YOUR_SECURE_API_KEY"
}
}
}
}Manual Build (Optimized)
For maximum performance, build the Rust binary locally:
Clone & Build:
git clone https://github.com/mcp-servers/gemini-audio-mcp.git cd gemini-audio-mcp cargo build --releaseLocate Binary: The optimized binary will be in
./target/release/gemini-audio-mcp.
🔑 API Key Management
The server requires a valid Google AI Studio API key.
Obtain your key from Google AI Studio.
Security Best Practice: Never hardcode keys. Inject the key via the
GEMINI_API_KEYenvironment variable.Tier Note: Access to Lyria 3 (Pro/Clip) models typically requires a Paid Tier or specific preview access in Google AI Studio.
🎮 Tool Usage Guide
1. Environmental Generation (generate_soundscape)
Synthesizes immersive, vocal-free ambient textures.
{
"name": "generate_soundscape",
"arguments": {
"prompt": "Deep underwater abyss, low-frequency whale songs, rhythmic air bubbles rising, muffled aquatic pressure.",
"duration": 60,
"quality": "high",
"auto_play": true
}
}2. Professional Music (generate_music)
Generates structural compositions with optional vocal control.
{
"name": "generate_music",
"arguments": {
"prompt": "Melancholic solo cello in a vast cathedral with 5-second decay reverb.",
"bpm": 72,
"song_key": "D minor",
"intensity": 4
}
}3. Expressive Voice (generate_voice)
Narration and character dialogue using Gemini 2.5 Native Audio.
{
"name": "generate_voice",
"arguments": {
"text": "The artifacts are stable, but the rift remains open.",
"voice_direction": "Gravelly, urgent, whispered"
}
}4. Dynamic Evolution (transition_soundscape)
Crossfades two distinct environments for seamless scene transitions.
{
"name": "transition_soundscape",
"arguments": {
"from_prompt": "Quiet library silence.",
"to_prompt": "Sudden heavy rain on a tin roof.",
"transition_duration": 8
}
}⚙️ Advanced Parameters
Parameter | Type | Description |
|
| Ensures deterministic, reproducible audio outputs. |
|
| Multimodal: Uses a local image to guide the acoustic mood (e.g., resonance). |
|
| Explicitly sets the rhythmic tempo (essential for music). |
|
| 1-10 scale controlling dynamic range and complexity. |
|
| 0.0-6.0 scale for prompt adherence (Lyria models). |
|
| Target length in seconds. Triggers the Seamless Looping Engine. |
🔬 Architecture Overview
Gemini Audio MCP employs a unique Hybrid Engine Strategy:
WebSocket Loop: Connects to Gemini 2.5 Live for low-latency, interactive voice and foley tasks.
REST Pipeline: Interfaces with Lyria 3 Pro for high-fidelity musical synthesis.
PCM Processing: An internal Rust-based loop (
decode -> crossfade -> loop -> encode) ensures that short clips are transformed into seamless, infinite soundscapes without audible clicks.
🧪 Troubleshooting
FFmpeg Errors
"FFmpeg not found": Ensure
ffmpegis in your system PATH. Runffmpeg -versionin your terminal to verify.Transcoding Failures: Check if you have the necessary codecs (e.g.,
libmp3lamefor MP3). Most standard FFmpeg installations include these.
API Issues
429 Rate Limit: The server implements a semaphore to limit concurrency, but ensure your API tier supports the requested model.
Empty Audio Output: Verify your
GEMINI_API_KEYis correct and that your account has access to the requested model (especiallylyria-3-pro-preview).
📄 License
Licensed under the MIT License. Engineered with precision by the MCP community.
Available Tools
9 toolscheck_dependenciesB
Verifies that the system has required external tools like FFmpeg installed and accessible.
Inputs: no named parameters.
cleanup_assetsA
Manually trigger deletion of generated audio assets that exceed a certain age (in hours) to save disk space.
Inputs: max_age_hours.
configureA
View or update persistent server settings like default audio format, sample rate, and automatic cleanup intervals. Call with no arguments to see current values.
Inputs: default_format, default_duration, default_bitrate, default_sample_rate, +3 more.
generate_musicA
Generates full songs, loops, or musical segments. Best for melodic content, rhythm, and structured compositions. (PAID MODELS - Pro: $0.08, Clip: $0.04).
Inputs: prompt (required), model, format, auto_play.
generate_sfxA
Generates isolated, short-duration sound effects and foley (e.g., 'A laser blast' or 'Footsteps on gravel'). Best for specific one-shot audio cues. Uses Lyria-3-clip-preview ($0.04/req).
Inputs: prompt (required), format, auto_play.
generate_soundscapeB
Generates immersive, high-quality environmental soundscapes (e.g., 'A rainy forest with distant thunder'). Best for background ambience and complex layered textures. Uses Gemini 2.0 Live.
Inputs: prompt (required), duration, format, bitrate, +3 more.
generate_voiceA
Generates expressive speech and narration from text. Best for scripts, character dialogue, and narration. Uses Gemini 2.5 Native Audio.
Inputs: text (required), voice_direction, format, auto_play.
play_audioA
Plays any local audio file using the system's default media player (e.g., 'afplay' on macOS).
Inputs: path (required).
transition_soundscapeA
Generates two distinct soundscapes and creates a smooth crossfade transition between them. Ideal for evolving scenes or changing environments.
Inputs: from_prompt (required), to_prompt (required), transition_duration, format, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose with no overlap. The four generation tools target different audio types (music, sfx, soundscape, voice), while utility tools handle distinct lifecycle phases (dependencies, configuration, cleanup, playback). Transition_soundscape is unambiguously a composite operation for scene changes.
Strong adherence to snake_case verb_noun pattern (generate_music, cleanup_assets, play_audio). The only deviation is 'configure' which lacks a noun object, though this is idiomatic for settings management. All generation tools use consistent 'generate_' prefix.
Nine tools is well-scoped for an audio generation server. The set covers four generation modes, configuration, dependency checking, playback, cleanup, and transitions without bloat. Each tool earns its place in the audio creation workflow.
Covers the full generation lifecycle with creation, playback, configuration, and cleanup capabilities. Minor gap in asset inventory management—there is no tool to list or retrieve specific generated assets by ID, only bulk cleanup by age, though agents may track assets themselves.
Maintenance
Related MCP Connectors
MCP server for Producer/Riffusion AI music generation
Generate game-ready 3D models, textures, and audio from natural language, over MCP.
MCP server for Google Veo AI video generation
MCP server for Luma Dream Machine AI video generation
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server for generating images and audio using Google's Gemini AI models.2106 PyPI2MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive audio MCP server that enables AI agents to generate speech, transcribe audio, clone voices, analyze speech quality, design soundscapes, and manage audio assets through a standardized interface.2MIT
- AlicenseAqualityDmaintenanceMulti-provider media generation MCP server that generates images, videos, audio, and transcriptions from text prompts using OpenAI, xAI, Gemini, ElevenLabs, and BFL through a single unified interface.6147 npm2MIT
- AlicenseNot gradedqualityDmaintenanceRemote MCP server that exposes Google Gemini's text, image, video (Veo), and audio transcription capabilities as tools any MCP client can call directly.285 npmMIT