EL

ElevenLabs MCP Server for TTS Voiceovers

Generate TTS voiceovers with multiple voices using an ElevenLabs MCP server integrating the ElevenLabs API for scalable, customizable speech.

Quick Install
npx -y @mamertofabian/elevenlabs-mcp-server

Overview

This MCP (Model Context Protocol) server provides a simple, developer-friendly bridge between your application and the ElevenLabs text-to-speech API. It implements an MCP-compatible HTTP interface so you can request speech synthesis with multiple voices, request presets, and generate audio files ready for voiceovers, narration, or automated content pipelines. The server centralizes ElevenLabs API calls, handling authentication, request shaping, and optional caching so your clients and downstream services can produce consistent audio without embedding your API key.

The server is useful when you need scalable, repeatable TTS generation across many voices and contexts. It makes it straightforward to manage voice mappings, batch or on-demand generation, and to integrate with CI/CD, content pipelines, or media rendering systems. Use it to standardize TTS behavior across projects while delegating capacity and billing to a single credential managed server.

Features

  • Proxying of ElevenLabs TTS calls via an MCP-compatible HTTP API
  • Support for multiple voices and voice presets
  • Request/response shaping for easy integration with downstream tools
  • Environment-based configuration (API key, port, voice mappings)
  • Optional Docker support for containerized deployment
  • Simple logging for troubleshooting and monitoring
  • Basic caching to reduce repeated API requests (configurable)

Installation / Configuration

Clone the repository, set your environment variables, then run the server. Example assumes a Node.js-based server (replace with your stack if different).

Clone the repo:

git clone https://github.com/mamertofabian/elevenlabs-mcp-server.git
cd elevenlabs-mcp-server

Install dependencies and run locally:

npm install
# or
yarn install

# start in development
npm run dev

# or production
npm start

Docker

# build
docker build -t elevenlabs-mcp-server .

# run
docker run -e ELEVENLABS_API_KEY="your_api_key_here" -p 3000:3000 elevenlabs-mcp-server

Environment variables

# Required
ELEVENLABS_API_KEY=sk-...

# Optional
PORT=3000
CACHE_ENABLED=true
CACHE_TTL_SECONDS=3600
VOICE_PRESETS_PATH=./voices.json
LOG_LEVEL=info

Example voice presets (voices.json)

{
  "default": { "voice": "alloy", "stability": 0.75, "similarity_boost": 0.8 },
  "narrator": { "voice": "narrator_v1", "stability": 0.6 },
  "assistant": { "voice": "assistant_v2", "stability": 0.9 }
}

API and Example Requests

Typical MCP-style endpoint patterns provided by the server (adjust paths to match your deployment):

  • POST /mcp/synthesize — synthesize text into audio using a named preset or voice
  • GET /mcp/voices — list configured/preset voices
  • POST /mcp/batch — batch TTS jobs (array of inputs)

Example single-synthesis request (curl)

curl -X POST "http://localhost:3000/mcp/synthesize" \
  -H "Content-Type: application/json" \
  -d '{
    "voice": "narrator",
    "text": "Welcome to our podcast. This episode covers the latest tools.",
    "format": "mp3",
    "sample_rate": 24000
  }' --output output.mp3

Example Python (requests)

import requests

payload = {
  "voice": "assistant",
  "text": "This is a sample voiceover.",
  "format": "wav"
}
r = requests.post("http://localhost:3000/mcp/synthesize", json=payload)
with open("voice.wav", "wb") as f:
    f.write(r.content)

Available Resources

  • Source code and issues: https://github.com/mamertofabian/elevenlabs-mcp-server
  • ElevenLabs API docs: https://docs.elevenlabs.io (refer to official API for voice and parameter details)
  • MCP (Model Context Protocol) reference: consult your organization’s MCP spec for client compatibility
  • Example voice mapping file: voices.json (in repository)

Use Cases

  • Podcast production: Generate episode intros, chapter markers, and social snippets in consistent voices. Use batch mode to synthesize many segments before editing.
  • Localization and dubbing: Swap voice presets per language to produce consistent speaker personalities across translated scripts.
  • Automated narration: Integrate into content pipelines to produce narrated videos, elearning modules, or audiobooks with team-managed voices and settings.
  • A/B voice testing: Quickly generate short clips with different voices or stability/similarity parameters to evaluate which voice best fits your brand.
  • CI/CD content generation: Run TTS generation as part of automated builds to produce voiceover assets for releases or previews.

Tips and Next Steps

  • Secure the server: run behind an authenticated proxy or VPN if exposing to the public internet; do not hard-code ELEVENLABS_API_KEY.
  • Caching: enable caching for static or repeated text to reduce API usage and latency.
  • Monitoring: integrate logs and metrics (Prometheus, Grafana) to track errors and API usage.
  • Rate limiting: add rate limiting if many clients share the server to avoid hitting ElevenLabs rate caps.

For more details, customization examples, and troubleshooting, see the repository README and issues on GitHub: https://github.com/mamertofabian/elevenlabs-mcp-server.