Integration with ElevenLabs Conversational AI for agents, tools, and knowledge.
ElevenLabs MCP Server
A complete Model Context Protocol (MCP) server for ElevenLabs Conversational AI, providing seamless integration with agents, tools, and knowledge base management.
Features
- Agent Management: Create, update, delete, and list ElevenLabs conversational AI agents
- Tools Integration: Manage webhook and client-side tools for agent functionality
- Knowledge Base: Handle document upload, URL scraping, and text-based knowledge sources
- RAG Support: Compute and manage Retrieval-Augmented Generation indices
- Real-time Updates: Subscribe to resource changes and notifications
- Claude Desktop Integration: Easy setup for Claude Desktop users
- Cloud Deployment: Docker container ready for remote deployment
Installation
Local Development
- Clone the repository:
git clone https://github.com/anthropics/elevenlabs-mcp-server.git
cd elevenlabs-mcp-server
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env with your ElevenLabs API key
- Install the package:
pip install -e .
Production Installation
pip install elevenlabs-mcp-server
Configuration
Environment Variables
Create a .env file with the following variables:
ELEVENLABS_API_KEY=your-elevenlabs-api-key-here
ELEVENLABS_BASE_URL=https://api.elevenlabs.io/v1
MCP_SERVER_NAME=elevenlabs-mcp-server
MCP_SERVER_VERSION=1.0.0
REQUEST_TIMEOUT=30
MAX_RETRIES=3
LOG_LEVEL=INFO
Claude Desktop Integration
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"elevenlabs": {
"command": "python",
"args": ["-m", "elevenlabs_mcp.server"],
"env": {
"ELEVENLABS_API_KEY": "your-elevenlabs-api-key-here"
}
}
}
}
Usage
Starting the Server
# Using the installed command
elevenlabs-mcp-server
# Or using Python module
python -m elevenlabs_mcp.server
Available Tools
Agent Management
create_agent: Create a new conversational AI agentget_agent: Retrieve agent configuration by IDlist_agents: List all agents with paginationupdate_agent: Update existing agent configurationdelete_agent: Delete an agent
Tool Management
create_tool: Create webhook or client-side toolsget_tool: Retrieve tool configuration by IDlist_tools: List all tools with optional filteringupdate_tool: Update existing tool configurationdelete_tool: Delete a tool
Knowledge Base Management
create_knowledge_base_from_text: Create knowledge base from text contentcreate_knowledge_base_from_url: Create knowledge base from URL scrapingget_knowledge_base_document: Retrieve document detailslist_knowledge_base_documents: List all knowledge base documentsupdate_knowledge_base_document: Update document metadatadelete_knowledge_base_document: Delete a documentcompute_rag_index: Compute RAG index for enhanced retrievalget_document_content: Get full document content and chunks
Example Usage
Creating an Agent
{
"conversation_config": {
"agent": {
"language": "en",
"prompt": {
"prompt": "You are a helpful customer service agent.",
"built_in_tools": ["language_detection", "end_call"]
},
"first_message": "Hello! How can I help you today?"
},
"asr": {
"quality": "high",
"provider": "elevenlabs"
},
"tts": {
"model_id": "eleven_turbo_v2",
"voice_id": "21m00Tcm4TlvDq8ikWAM"
}
},
"name": "Customer Service Agent"
}
Creating a Webhook Tool
{
"tool_type": "webhook",
"name": "weather_lookup",
"description": "Get current weather information",
"url": "https://api.weather.com/v1/current",
"method": "GET",
"parameters": [
{
"name": "location",
"type": "string",
"description": "City name for weather lookup",
"required": true
}
]
}
Creating Knowledge Base from Text
{
"text": "This is important company information about our products...",
"name": "Company Product Guide",
"description": "Comprehensive guide to our product offerings"
}
Resources
The server exposes the following MCP resources:
elevenlabs://agents: List all agentselevenlabs://tools: List all toolselevenlabs://knowledge-base: List all knowledge base documents
Cloud Deployment
Docker
- Build the Docker image:
docker build -t elevenlabs-mcp-server .
- Run the container:
docker run -e ELEVENLABS_API_KEY=your-api-key elevenlabs-mcp-server
Docker Compose
version: '3.8'
services:
elevenlabs-mcp:
build: .
environment:
- ELEVENLABS_API_KEY=your-api-
Tools (5)
create_agentCreate a new conversational AI agentlist_agentsList all agents with paginationcreate_toolCreate webhook or client-side toolscreate_knowledge_base_from_textCreate knowledge base from text contentcompute_rag_indexCompute RAG index for enhanced retrievalEnvironment Variables
ELEVENLABS_API_KEYrequiredYour ElevenLabs API keyELEVENLABS_BASE_URLBase URL for ElevenLabs APILOG_LEVELLogging level for the serverConfiguration
{"mcpServers": {"elevenlabs": {"command": "python", "args": ["-m", "elevenlabs_mcp.server"], "env": {"ELEVENLABS_API_KEY": "your-elevenlabs-api-key-here"}}}}