ElevenLabs MCP server

Integrates with ElevenLabs API to provide text-to-speech capabilities for generating high-quality audio from text using multiple voices and customizable speech parameters.
Back to servers
Setup instructions
Provider
Mamerto Fabian
Release date
Dec 21, 2024
Language
Python
Stats
99 stars

The ElevenLabs MCP Server integrates with the ElevenLabs text-to-speech API, allowing you to generate high-quality audio from text. This server follows the Model Context Protocol (MCP) specification, making it compatible with various MCP clients like Claude Desktop, and includes a sample web-based client for managing voice generation tasks.

Features

  • Generate audio from text using ElevenLabs API
  • Support for multiple voices and script parts
  • SQLite database for persistent history storage
  • Audio file downloads

Installation Options

Installing via Smithery

You can install ElevenLabs MCP Server automatically using Smithery with this command:

npx -y @smithery/cli install elevenlabs-mcp-server --client claude

Using uvx (Recommended)

When using uvx, no specific installation is needed. Simply add the following configuration to your MCP settings file (e.g., cline_mcp_settings.json for Claude Desktop):

{
  "mcpServers": {
    "elevenlabs": {
      "command": "uvx",
      "args": ["elevenlabs-mcp-server"],
      "env": {
        "ELEVENLABS_API_KEY": "your-api-key",
        "ELEVENLABS_VOICE_ID": "your-voice-id",
        "ELEVENLABS_MODEL_ID": "eleven_flash_v2",
        "ELEVENLABS_STABILITY": "0.5",
        "ELEVENLABS_SIMILARITY_BOOST": "0.75",
        "ELEVENLABS_STYLE": "0.1",
        "ELEVENLABS_OUTPUT_DIR": "output"
      }
    }
  }
}

Using the Server

Environment Variables

To configure the server, you'll need to set the following environment variables:

  • ELEVENLABS_API_KEY: Your ElevenLabs API key
  • ELEVENLABS_VOICE_ID: Default voice ID to use
  • ELEVENLABS_MODEL_ID: Model to use (default: eleven_flash_v2)
  • ELEVENLABS_STABILITY: Voice stability setting (0.0-1.0)
  • ELEVENLABS_SIMILARITY_BOOST: Similarity boost setting (0.0-1.0)
  • ELEVENLABS_STYLE: Style setting (0.0-1.0)
  • ELEVENLABS_OUTPUT_DIR: Directory to save output files

Available Tools

The server provides several tools that can be used through an MCP client:

  • generate_audio_simple: Generate audio from plain text using default voice settings
  • generate_audio_script: Generate audio from a structured script with multiple voices and actors
  • delete_job: Delete a job by its ID
  • get_audio_file: Get the audio file by its ID
  • list_voices: List all available voices
  • get_voiceover_history: Get voiceover job history. Optionally specify a job ID for a specific job.

Available Resources

Resources can be accessed through MCP clients:

  • voiceover://history/{job_id}: Get the audio file by its ID
  • voiceover://voices: List all available voices

Using the Sample Web UI

The server includes a sample SvelteKit-based web interface for easier interaction:

  1. Navigate to the web UI directory:
    cd clients/web-ui
    
  2. Install dependencies:
    pnpm install
    
  3. Copy .env.example to .env and configure as needed
  4. Run the web UI:
    pnpm dev
    
  5. Open http://localhost:5174 in your browser

Web UI Features

The web interface provides a user-friendly way to:

  • Generate simple text-to-speech conversions
  • Manage multi-part scripts with different voices
  • Track and play back voice generation history
  • Download generated audio files

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "elevenlabs" '{"command":"uvx","args":["elevenlabs-mcp-server"],"env":{"ELEVENLABS_API_KEY":"your-api-key","ELEVENLABS_VOICE_ID":"your-voice-id","ELEVENLABS_MODEL_ID":"eleven_flash_v2","ELEVENLABS_STABILITY":"0.5","ELEVENLABS_SIMILARITY_BOOST":"0.75","ELEVENLABS_STYLE":"0.1","ELEVENLABS_OUTPUT_DIR":"output"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "elevenlabs": {
            "command": "uvx",
            "args": [
                "elevenlabs-mcp-server"
            ],
            "env": {
                "ELEVENLABS_API_KEY": "your-api-key",
                "ELEVENLABS_VOICE_ID": "your-voice-id",
                "ELEVENLABS_MODEL_ID": "eleven_flash_v2",
                "ELEVENLABS_STABILITY": "0.5",
                "ELEVENLABS_SIMILARITY_BOOST": "0.75",
                "ELEVENLABS_STYLE": "0.1",
                "ELEVENLABS_OUTPUT_DIR": "output"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "elevenlabs": {
            "command": "uvx",
            "args": [
                "elevenlabs-mcp-server"
            ],
            "env": {
                "ELEVENLABS_API_KEY": "your-api-key",
                "ELEVENLABS_VOICE_ID": "your-voice-id",
                "ELEVENLABS_MODEL_ID": "eleven_flash_v2",
                "ELEVENLABS_STABILITY": "0.5",
                "ELEVENLABS_SIMILARITY_BOOST": "0.75",
                "ELEVENLABS_STYLE": "0.1",
                "ELEVENLABS_OUTPUT_DIR": "output"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later