ElevenLabs MCP Server

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.

Category
Visit Server

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

  1. Clone the repository:
git clone https://github.com/anthropics/elevenlabs-mcp-server.git
cd elevenlabs-mcp-server
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your ElevenLabs API key
  1. 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 agent
  • get_agent: Retrieve agent configuration by ID
  • list_agents: List all agents with pagination
  • update_agent: Update existing agent configuration
  • delete_agent: Delete an agent

Tool Management

  • create_tool: Create webhook or client-side tools
  • get_tool: Retrieve tool configuration by ID
  • list_tools: List all tools with optional filtering
  • update_tool: Update existing tool configuration
  • delete_tool: Delete a tool

Knowledge Base Management

  • create_knowledge_base_from_text: Create knowledge base from text content
  • create_knowledge_base_from_url: Create knowledge base from URL scraping
  • get_knowledge_base_document: Retrieve document details
  • list_knowledge_base_documents: List all knowledge base documents
  • update_knowledge_base_document: Update document metadata
  • delete_knowledge_base_document: Delete a document
  • compute_rag_index: Compute RAG index for enhanced retrieval
  • get_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 agents
  • elevenlabs://tools: List all tools
  • elevenlabs://knowledge-base: List all knowledge base documents

Cloud Deployment

Docker

  1. Build the Docker image:
docker build -t elevenlabs-mcp-server .
  1. 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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured