Metadata-Version: 2.4
Name: elevenlabs-mcp-server
Version: 0.1.1
Summary: A Model Context Protocol server providing ElevenLabs text-to-speech integration
Author-email: Mamerto Fabian <aidrivencoder@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Saoud Rizwan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: elevenlabs,llm,mcp,text-to-speech,tts
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.11
Requires-Dist: aiosqlite>=0.19.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydub
Requires-Dist: pytest>=8.3.4
Requires-Dist: python-dotenv
Requires-Dist: requests
Requires-Dist: tenacity>=9.0.0
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Description-Content-Type: text/markdown

# ElevenLabs MCP Server

A Model Context Protocol (MCP) server that integrates with ElevenLabs text-to-speech API, featuring both a server component and a sample web-based MCP Client (SvelteKit) 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
- Sample SvelteKit MCP Client for:
  - Simple text-to-speech conversion
  - Multi-part script management
  - Voice history tracking and playback
  - Audio file downloads

## Installation

### Using uvx (recommended)

When using [`uvx`](https://docs.astral.sh/uv/guides/tools/), no specific installation is needed.

Add the following configuration to your MCP settings file (e.g., `cline_mcp_settings.json` for Claude Desktop):

```json
{
  "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"
      }
    }
  }
}

### Development Installation

1. Clone this repository
2. Install dependencies:
   ```bash
   uv venv
   ```
3. Copy `.env.example` to `.env` and fill in your ElevenLabs credentials

```json
{
  "mcpServers": {
    "elevenlabs": {
      "command": "uv",
      "args": [
        "--directory",
        "path/to/elevenlabs-mcp-server",
        "run",
        "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 Sample SvelteKit MCP Client

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

### Available Tools

- `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

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

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.