ElevenLabs MCP Server
Enables seamless integration with ElevenLabs Conversational AI to manage agents, tools, and knowledge base sources. It supports RAG indexing, webhook integration, and document management for building advanced voice-enabled AI agents.
README
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-key
- LOG_LEVEL=INFO
ports:
- "8000:8000"
restart: unless-stopped
Cloud Platforms
Deploy to your preferred cloud platform:
- AWS: Use ECS, EKS, or Lambda
- Google Cloud: Use Cloud Run, GKE, or Cloud Functions
- Azure: Use Container Instances, AKS, or Functions
- Heroku: Use container deployment
- Railway: Connect your GitHub repository
API Reference
Agent Configuration Schema
{
"conversation_config": {
"agent": {
"language": "en",
"prompt": {
"prompt": "System prompt for the agent",
"tool_ids": ["tool_id_1", "tool_id_2"],
"built_in_tools": ["language_detection", "end_call"]
},
"first_message": "Initial greeting message"
},
"asr": {
"quality": "high",
"provider": "elevenlabs",
"user_input_audio_format": "pcm_16000"
},
"tts": {
"model_id": "eleven_turbo_v2",
"voice_id": "voice_id_here"
}
},
"platform_settings": {
"evaluation_config": {
"success_threshold": 0.7
}
}
}
Tool Configuration Schema
Webhook Tool
{
"type": "webhook",
"name": "tool_name",
"description": "Tool description",
"url": "https://api.example.com/endpoint",
"method": "POST",
"headers": {
"Authorization": "Bearer token"
},
"parameters": [
{
"name": "param_name",
"type": "string",
"description": "Parameter description",
"required": true
}
]
}
Client Tool
{
"type": "client",
"name": "tool_name",
"description": "Tool description",
"parameters": [
{
"name": "param_name",
"type": "string",
"description": "Parameter description",
"required": true
}
],
"wait_for_response": false
}
Error Handling
The server provides comprehensive error handling with structured error responses:
{
"error": "Descriptive error message",
"details": {
"status_code": 400,
"error_type": "validation_error"
}
}
Development
Running Tests
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run tests with coverage
pytest --cov=elevenlabs_mcp --cov-report=html
Code Quality
# Format code
black src/ tests/
# Sort imports
isort src/ tests/
# Lint code
flake8 src/ tests/
# Type checking
mypy src/
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
License
MIT License - see LICENSE file for details.
Support
- Documentation: GitHub README
- Issues: GitHub Issues
- ElevenLabs API: Official Documentation
- MCP Protocol: Specification
Changelog
v1.0.0
- Initial release
- Full agent management support
- Tools and knowledge base integration
- Claude Desktop configuration
- Docker deployment support
- Comprehensive error handling
- Complete API coverage
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。