Skip to main content
Glama
mafzaal

ElevenLabs MCP Server

by mafzaal

ElevenLabs MCP Server

A Model Context Protocol (MCP) server that provides text-to-speech functionality using the ElevenLabs API. This server allows you to convert text to natural-sounding speech with various voices and models.

Features

  • Text-to-Speech Conversion: Convert any text to high-quality speech

  • Voice Management: List and get detailed information about available voices

  • Multiple Models: Support for various ElevenLabs TTS models

  • Streaming Support: Real-time audio generation for longer texts

  • Flexible Output: Multiple audio formats and custom voice settings

  • Automatic File Management: Smart file naming and directory creation

Related MCP server: ElevenLabs MCP Server

Installation

  1. Clone this repository:

git clone <repository-url>
cd elevan-labs-mcp
  1. Install dependencies:

pip install -e .
  1. Set up your ElevenLabs API key:

export ELEVENLABS_API_KEY="your_api_key_here"

Or create a .env file in the project root:

cp .env.example .env
# Edit .env and add your API key

You can get your API key from ElevenLabs Dashboard.

Usage

Running the Server

python main.py

Or using the installed script:

elevan-labs-mcp

šŸ¤– LLM Integration

MCP Configuration

The mcp.json file provides configuration with clients:

{
    "servers": {
        "elevenlabs-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "--directory",
                "${workspaceFolder}",
                "elevan-labs-mcp"
                
            ],
            "envFile": "${workspaceFolder}/.env"
        }
    }
}

Available Tools

1. elevenlabs_text_to_speech

Convert text to speech with extensive customization options.

Parameters:

  • text (required): The text to convert to speech

  • voice_id (optional): Voice ID to use (defaults to George voice)

  • model_id (optional): Model to use (defaults to eleven_multilingual_v2)

  • output_format (optional): Audio format (defaults to mp3_44100_128)

  • output_file (optional): Custom output file path

  • voice_settings (optional): Custom voice settings (stability, similarity_boost, etc.)

Example:

{
  "text": "Hello, this is a test of the ElevenLabs text-to-speech API.",
  "voice_id": "JBFqnCBsd6RMkjVDRZzb",
  "output_format": "mp3_44100_128"
}

2. elevenlabs_list_voices

Get all available voices from your ElevenLabs account.

Parameters: None

Returns: List of voices with their IDs, names, categories, and settings.

3. elevenlabs_get_voice_info

Get detailed information about a specific voice.

Parameters:

  • voice_id (required): ID of the voice to query

Returns: Detailed voice information including samples and settings.

4. elevenlabs_stream_text_to_speech

Convert text to speech with streaming for real-time generation.

Parameters:

  • text (required): The text to convert

  • voice_id (optional): Voice ID to use

  • model_id (optional): Model to use

  • output_file (required): Output file path

5. elevenlabs_get_models

Get all available text-to-speech models.

Parameters: None

Returns: List of models with their capabilities and limitations.

Supported Audio Formats

  • MP3: mp3_44100_128, mp3_44100_192, mp3_44100_64

  • PCM: pcm_16000, pcm_22050, pcm_24000, pcm_44100

  • WAV: wav_22050, wav_44100, wav_48000

  • μ-law: ulaw_8000

Voice Settings

You can customize voice generation with these settings:

  • stability (0-1): Controls consistency between generations

  • similarity_boost (0-1): Enhances similarity to the original voice

  • style (0-1): Amplifies the style of the original speaker

  • use_speaker_boost (boolean): Boost similarity to the original speaker

Error Handling

The server includes comprehensive error handling for:

  • Missing API keys

  • Invalid voice IDs

  • API rate limits

  • Network issues

  • File system errors

Configuration

Environment Variables

  • ELEVENLABS_API_KEY: Your ElevenLabs API key (required)

Default Settings

  • Default Voice: George (JBFqnCBsd6RMkjVDRZzb)

  • Default Model: eleven_multilingual_v2

  • Default Format: mp3_44100_128

  • Default Output Directory: ./audio_output

Examples

Basic Text-to-Speech

{
  "tool": "elevenlabs_text_to_speech",
  "arguments": {
    "text": "Welcome to the ElevenLabs MCP server!"
  }
}

Custom Voice and Settings

{
  "tool": "elevenlabs_text_to_speech",
  "arguments": {
    "text": "This is a custom voice example.",
    "voice_id": "your_voice_id_here",
    "voice_settings": {
      "stability": 0.75,
      "similarity_boost": 0.8,
      "style": 0.6
    }
  }
}

List Available Voices

{
  "tool": "elevenlabs_list_voices",
  "arguments": {}
}

Development

Project Structure

elevan-labs-mcp/
ā”œā”€ā”€ elevan_labs_mcp/
│   ā”œā”€ā”€ __init__.py
│   └── server.py          # Main MCP server implementation
ā”œā”€ā”€ main.py                # Entry point
ā”œā”€ā”€ pyproject.toml         # Project configuration
ā”œā”€ā”€ README.md              # This file
└── .gitignore            # Git ignore rules

Dependencies

  • mcp>=1.0.0: Model Context Protocol SDK

  • elevenlabs>=1.0.0: ElevenLabs Python SDK

  • httpx>=0.25.0: HTTP client

  • pydantic>=2.0.0: Data validation

Troubleshooting

Common Issues

  1. Missing API Key: Make sure ELEVENLABS_API_KEY is set in your environment

  2. Voice Not Found: Use elevenlabs_list_voices to see available voices

  3. Rate Limits: ElevenLabs has rate limits based on your subscription tier

  4. File Permissions: Ensure the output directory is writable

Getting Help

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Available Tools

5 tools
elevenlabs_get_modelsA

Get all available text-to-speech models

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of behavioral disclosure. The word 'Get' implies a read-only operation, but the description does not explicitly state safety characteristics, side effects, or return format. It is sufficient for a simple fetch but lacks explicit behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the purpose with zero fluff. It is front-loaded and perfectly sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the tool is extremely simple and the description covers its core function, the absence of an output schema means the description should ideally hint at what is returned. 'All available text-to-speech models' implies the response contains model data, but additional detail about the return structure would improve completeness. Given the simplicity, the current description is still adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the description has nothing to add beyond the schema. Per rubric, 0 params gives a baseline of 4. The description does not introduce any parameter-related inconsistency.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and the resource ('all available text-to-speech models'), making the tool's purpose unambiguous. It is easily distinguished from sibling tools that deal with voices or TTS operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly provide when-to-use guidance or mention alternative tools. However, the sibling tool names (elevenlabs_list_voices, elevenlabs_get_voice_info, etc.) imply this tool is specifically for listing models, so usage is contextually implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

elevenlabs_get_voice_infoC

Get detailed information about a specific voice

ParametersJSON Schema
NameRequiredDescriptionDefault
voice_idYesID of the voice to get information about

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It says 'get detailed information,' which implies a read operation, but it does not explicitly state non-destructiveness, return format, or any error behavior. The lack of annotation and minimal description leaves the agent guessing about what 'detailed' includes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no wasted words, and it front-loads the core action. However, it is so terse that it misses an opportunity to enrich the context within the same length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with one fully documented parameter, the description is minimally sufficient. However, it lacks clarity on what 'detailed information' entails (e.g., which fields are returned) and omits any note on auth or error conditions, leaving gaps for an agent deciding between this and list_voices.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema fully describes voice_id as 'ID of the voice to get information about' (100% coverage), so the baseline is 3. The description adds no extra semantic value beyond the schema's own description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get detailed information about a specific voice' uses a specific verb (get) and resource (specific voice), making it clear this retrieves one voice's details. The contrast with the sibling 'elevenlabs_list_voices' is implicit via 'specific', but it does not explicitly differentiate alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no explicit guidance about when to use this tool versus siblings like list_voices or text_to_speech. The word 'specific' implies a single-voice lookup, but there is no stated condition or alternative recommendation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

elevenlabs_list_voicesA

Get all available voices from your ElevenLabs account

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It only states 'Get all available voices' which implies a read operation, but does not explicitly mention read-only status, authentication requirements, pagination, or response shape. This is insufficient for a tool with zero annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that directly states the purpose with no filler or redundant information. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no output schema, no annotations), the description provides a clear and adequate summary of what it returns. However, it does not mention the response format (e.g., list of voice objects with IDs) or potential caveats like pagination, which would make it more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, and the schema is empty, so the baseline is 4. The description adds contextual meaning by clarifying the scope ('from your ElevenLabs account'), which distinguishes this from a generic voice list. No parameter details are needed beyond this.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and a specific resource ('all available voices') with scope ('from your ElevenLabs account'). This clearly distinguishes it from siblings like elevenlabs_get_voice_info (which retrieves a single voice) and elevenlabs_get_models (which retrieves models).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving the full list of voices, but does not explicitly state when to use this tool versus alternatives such as get_voice_info for details on a specific voice. It provides no exclusions or alternative recommendations, so guidance is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

elevenlabs_stream_text_to_speechA

Convert text to speech with streaming (for longer texts or real-time generation)

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe text to convert to speech
model_idNoModel to use for generation (default: eleven_multilingual_v2)eleven_multilingual_v2
voice_idNoID of the voice to use (default: JBFqnCBsd6RMkjVDRZzb)JBFqnCBsd6RMkjVDRZzb
output_fileYesOutput file path for the streamed audio

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of behavioral disclosure. It reveals that the tool performs streaming, which implies incremental generation and suitability for long texts. However, it does not elaborate on output behavior (e.g., whether it waits for full audio or writes progressively), potential errors, or resource implications, leaving some behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It immediately states the action and the key differentiator ('streaming'), followed by practical use cases. Highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (4 parameters, no output schema) and full schema coverage, the description covers the essential purpose and usage context. It could mention more about stream behavior or error handling, but for a straightforward text-to-speech tool, it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% parameter description coverage, so the schema already documents each parameter's meaning. The description does not add specific parameter semantics beyond the schema, though the streaming context indirectly explains why an output file path is needed. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Convert' and resource 'text to speech', and distinguishes itself from the non-streaming sibling 'elevenlabs_text_to_speech' by emphasizing 'streaming' and specifying 'for longer texts or real-time generation'. This makes the tool's unique purpose immediately clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context by stating 'for longer texts or real-time generation', which indicates when streaming is appropriate. It does not explicitly name alternative tools or state when not to use it, but the context is enough to guide the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

elevenlabs_text_to_speechC

Convert text to speech using ElevenLabs API

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe text to convert to speech
model_idNoModel to use for generation (default: eleven_multilingual_v2)eleven_multilingual_v2
voice_idNoID of the voice to use (default: JBFqnCBsd6RMkjVDRZzb)JBFqnCBsd6RMkjVDRZzb
output_fileNoCustom output file path (optional, auto-generated if not provided)
output_formatNoAudio output format (default: mp3_44100_128)mp3_44100_128
voice_settingsNoCustom voice settings

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only says 'convert text to speech' without disclosing whether it writes to a file, returns audio data, handles output_file, sync/async, format details, or other side effects. This is minimal behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no unnecessary words, making it front-loaded and easy to parse. However, given the tool's parameter complexity, this brevity borders on under-specification, but conciseness itself is good.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 6 parameters, no output schema, and no annotations. The description only states the core capability without explaining output behavior, file handling, or the distinction from streaming. This leaves important gaps for an agent selecting and invoking the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for all 6 parameters, so the schema already explains parameters like text, model_id, voice_id, etc. The description adds no additional meaning beyond the schema, which meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the primary action clearly ('Convert text to speech'), but it does not differentiate from the sibling tool elevenlabs_stream_text_to_speech, which performs a similar streaming variant. Therefore it is clear but lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no information about when to use this tool versus alternatives. No mention of streaming vs file output, use cases, or prerequisites. The description provides only the basic function, leaving the agent to infer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.1
    • First observedelevenlabs_get_models
    • First observedelevenlabs_get_voice_info
    • First observedelevenlabs_list_voices
    • First observedelevenlabs_stream_text_to_speech
    • First observedelevenlabs_text_to_speech

TDQS

A3.6/5.0
Disambiguation4/5

The tools are mostly distinct: listing voices, getting voice details, getting models, and generating speech. The potential confusion between stream_text_to_speech and text_to_speech is mitigated by the description clarifying the streaming use case, but they still share the same core function.

Naming Consistency4/5

The naming follows a consistent elevenlabs_ prefix with verb_noun structure for most tools (list_voices, get_voice_info, get_models, stream_text_to_speech). However, 'text_to_speech' deviates as it lacks an explicit verb, making it slightly inconsistent.

Tool Count5/5

Five tools is well-scoped for a text-to-speech MCP server, covering voice exploration, model lookup, and two TTS generation modes. Each tool serves a clear purpose within the domain.

Completeness4/5

The tool set covers the essential operations: listing and retrieving voice details, listing models, and generating speech (both standard and streaming). Minor gaps exist such as voice management (create/update/delete) but they are not core to the primary TTS workflow.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mafzaal/elevan-labs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server