Google ADK Speaker Agent with ElevenLabs
LocalAbout Google ADK Speaker Agent with ElevenLabs
This example project builds a text-to-speech speaker agent with Google ADK and the ElevenLabs MCP server. It is for developers exploring this setup and runs the asynchronous agent through the ADK web client.
Key features
- 01Build a speaker agent with Google ADK
- 02Provide text-to-speech through ElevenLabs MCP
- 03Connect to the MCP server with uvx
- 04Run the async agent with ADK web
Use cases
- 01Learn how Google ADK connects to ElevenLabs MCP
- 02Build an async agent for text-to-speech requests
MCP support
The agent connects to the ElevenLabs MCP server through uvx to use text-to-speech capabilities and other tools provided by the server.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEGoogle ADK Speaker Agent with ElevenLabs
This project demonstrates a Text-to-Speech (TTS) Speaker agent built using Google's Agent Development Kit (ADK) and ElevenLabs' MCP server.
Overview
The speaker agent connects to the ElevenLabs MCP server via uvx to provide text-to-speech capabilities. It's built using:
- Google ADK (Agent Development Kit)
- ElevenLabs MCP Server
- Python 3.11+
Prerequisites
- Python 3.11 or higher
- ElevenLabs API key
- Google Gemini API key
- Google ADK installed
Setup
- Clone the repository:
git clone <repo-url>
- Create and activate a virtual environment:
python3.11 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.envfile in the root directory with your ElevenLabs and Gemini API keys:
ELEVENLABS_API_KEY=your_api_key_here
GOOGLE_API_KEY = your_api_key_here
Running the Agent
- Make sure your virtual environment is activated:
source venv/bin/activate
- Navigate to the agents directory:
cd agents
- Run the agent using ADK. You can only run async agents via the web client:
adk web
The agent will connect to the ElevenLabs MCP server and be ready to process text-to-speech requests (along with the other serviceable tools in the MCP server)
Project Structure
google-adk-sample/
├── agents/
│ └── speaker/
│ ├── agent.py # Main agent implementation
│ └── __init__.py
├── .env # Environment variables
└── requirements.txt # Project dependencies
Demo Video
https://github.com/user-attachments/assets/2120981a-f193-4941-a6d0-4504b0bfb9a6
Troubleshooting
If you encounter any issues:
- Ensure your virtual environment is activated
- Verify your API keys are correctly set in the
.envfile - Check that all dependencies are installed correctly
- Make sure you're running the command from the correct directory
Additional Resources
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.