bmorphism/elevenlabs-mcp-enhanced
If you are the rightful owner of elevenlabs-mcp-enhanced and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
ElevenLabs MCP Enhanced Server is a production-ready server with universal API key support, V3 audio features, and clean output modes.
ElevenLabs MCP Enhanced Server
A production-ready Model Context Protocol (MCP) server for ElevenLabs with universal API key support, V3 features, and clean output modes.
โจ Features
- Universal API Key Support: Works with both
xi-
andsk-
format API keys - V3 Audio Features: Full support for audio tags, multi-speaker dialogue, and emotional synthesis
- Clean Output Mode: Professional, minimal output by default (debug mode available)
- Comprehensive Testing: 69 test cases covering all functionality
- Production Ready: Enterprise-grade error handling and reliability
๐ Quick Start
Installation
# Clone the repository
git clone https://github.com/bmorphism/elevenlabs-mcp-enhanced.git
cd elevenlabs-mcp-enhanced
# Install dependencies
pip install elevenlabs mcp fastmcp httpx python-dotenv
Configuration
- Set your API key:
export ELEVENLABS_API_KEY="your-api-key-here"
- Add to Claude MCP:
claude mcp add-json elevenlabs '{"type": "stdio", "command": "python3", "args": ["path/to/server.py"], "env": {"ELEVENLABS_API_KEY": "your-key"}}' --scope user
๐ Usage
Basic Text-to-Speech
from server import text_to_speech
result = text_to_speech("Hello world")
# Output: Audio saved: /path/to/file.mp3 (12345 bytes)
V3 Audio Tags
result = text_to_speech("[excited] Amazing! [whispers] Secret message [normal] Back to normal")
Multi-Speaker Dialogue
dialogue = """
[alice] Hello there!
[bob:excited] Hi Alice, great to see you!
[alice:whispers] I have something to tell you...
"""
result = create_dialogue(dialogue)
๐ญ V3 Features
Supported Audio Tags
[excited]
- Excited delivery[whispers]
- Whispering[angry]
- Angry tone[sad]
- Sad delivery[laughs]
- Laughter[sarcastic]
- Sarcastic tone[confident]
- Confident delivery[normal]
- Return to normal
Multi-Speaker Support
- Named speakers:
[alice]
,[bob]
,[narrator]
- Speakers with emotions:
[alice:excited]
,[bob:sad]
- Character variations:
[character_1]
,[character_2]
โ๏ธ Configuration Options
Environment Variables
ELEVENLABS_API_KEY
- Your ElevenLabs API key (required)ELEVENLABS_DEBUG
- Set to "true" for verbose output with emojisELEVENLABS_MCP_BASE_PATH
- Custom base path for output filesELEVENLABS_DEFAULT_VOICE_ID
- Default voice ID to use
Output Modes
Normal Mode (Default):
Audio saved: /path/to/file.mp3 (37661 bytes)
Debug Mode:
โ
PATCHED TTS Success!
๐ File: /path/to/file.mp3
๐ Size: 37,661 bytes
๐ API Key: sk_58fe7... (validated)
๐ญ Model: eleven_multilingual_v2
๐งช Testing
Run the comprehensive test suite:
python3 tests.py
Test results:
- 69 total tests across 7 categories
- 100% pass rate verified
- Average response time: ~1.4 seconds
๐ API Compatibility
This enhanced server fixes the hardcoded API key format restrictions in the official ElevenLabs MCP server. It accepts:
xi-
format keys (original format)sk-
format keys (new format)- Custom format keys (length/pattern validated)
๐ง Available Models
eleven_multilingual_v2
- High quality, 29 languages (default)eleven_turbo_v2_5
- Fast generationeleven_flash_v2_5
- Ultra-fast generation
๐ Project Structure
elevenlabs-mcp-enhanced/
โโโ server.py # Main patched server with authentication fix
โโโ unified_elevenlabs_mcp_server.py # Unified server with V3 enhancements
โโโ tests.py # Comprehensive test suite (69 tests)
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
MIT License - see LICENSE file for details
๐ Acknowledgments
- Built on top of the official ElevenLabs MCP server
- Enhanced with V3 features and universal API key support
- Tested with comprehensive suite of 69 test cases
๐ Troubleshooting
API Key Issues
The server accepts both xi-
and sk-
format keys. If you're getting authentication errors:
- Verify your API key at https://elevenlabs.io/app/settings/api-keys
- Ensure the environment variable is set correctly
- Try setting
ELEVENLABS_DEBUG=true
for detailed error messages
MCP Connection Issues
# Check server status
claude mcp list
# View configuration
claude mcp get elevenlabs
# Remove and re-add if needed
claude mcp remove elevenlabs -s user
Output Issues
- For cleaner output: Leave
ELEVENLABS_DEBUG
unset or set to "false" - For verbose output: Set
ELEVENLABS_DEBUG=true
Version: 1.0.0
Author: @bmorphism
API Key Compatibility: xi-
and sk-
formats
Test Coverage: 100% (69/69 tests passing)