Integrations
Utilizes .env files for configuration management, particularly for storing API keys and other environment variables.
Uses FastAPI for the HTTP server implementation with SSE transport for connecting to Claude and Cursor.
Uses Pydantic for data validation and settings management within the MCP server implementation.
Resemble AI Voice Generation MCP Server
A server implementation for the Resemble AI voice generation API that integrates with Claude and Cursor using the Model Context Protocol (MCP).
Features
- Generate voice audio from text using Resemble AI's voices
- List available voice models
- Return audio as local file or base64 encoded string
- Multiple connection methods:
- SSE Transport - Network-based Server-Sent Events (default)
- StdIO Transport - Direct process communication
Setup Instructions
Prerequisites
- Python 3.10 or higher
- Resemble AI API key (sign up at Resemble AI)
Environment Setup
Option 1: Using Conda (Recommended)
Option 2: Using Virtual Environment
Configuration
Set your Resemble AI API key as an environment variable:
Alternatively, create a .env
file in the project root with the following content:
Running the Server
Using the Run Script (Recommended)
Choose your preferred implementation:
Using the CLI Directly
Connecting to Claude Desktop
SSE Transport Connection
Create a claude_desktop_config.json
file:
StdIO Transport Connection
Create a claude_desktop_config.json
file:
Connecting to Cursor
SSE Transport Connection
- Go to Settings → AI → MCP Servers
- Click "Add Server"
- Select "SSE" as the connection type
- Set the URL to:
http://localhost:8083/sse
StdIO Transport Connection
- Go to Settings → AI → MCP Servers
- Click "Add Server"
- Select "Subprocess" as the connection type
- Set the command to:
python -m src.cli --implementation stdio
- Optionally add environment variables:
RESEMBLE_API_KEY
: Your Resemble AI API key
Available Tools
list_voices
Lists available voice models from Resemble AI.
generate_tts
Generates voice audio from text.
Parameters:
text
: The text to convert to speechvoice_id
: ID of the voice to usereturn_type
: How to return the audio: 'file' or 'base64' (optional, default: 'file')output_filename
: Filename for the output without extension (optional)
Implementation Details
The project includes several implementations:
src/resemble_mcp_server.py
: Uses the MCP SDK with SSE transportsrc/resemble_stdio_server.py
: Uses StdIO transport for direct process communicationsrc/resemble_http_server.py
: HTTP implementation with SSE (fallback)src/resemble_ai_server.py
: Direct API implementationsrc/resemble_ai_sdk_server.py
: Implementation using the official Resemble SDK
Troubleshooting
MCP SDK Import Errors
If you encounter issues importing the MCP SDK, the server will automatically fall back to the HTTP implementation with SSE transport.
Connection Issues
If Claude or Cursor cannot connect to the server:
- Check that the server is running
- Verify the correct URL is configured
- Check that your API key is valid
- Look for errors in the server logs
StdIO vs. SSE Transport
- Use SSE Transport when you want to run the server separately, or on a different machine
- Use StdIO Transport when you want Claude/Cursor to manage the server process for you
Examples
Example usage can be found in the examples/
directory.
📁 Repository Structure
🚀 Quick Setup
Two setup scripts are provided to make installation easy:
Using Conda (Recommended)
Using Python venv
Either script will:
- Create a Python 3.10+ environment
- Install all required dependencies
- Set up a template .env file
- Create the output directory for audio files
Manual Installation
If you prefer to set up manually:
- Create a Python 3.10+ environment:Copy
- Install dependencies:Copy
- Set up your environment variables:Edit theCopy
.env
file and add your Resemble AI API key:Optional: Customize audio output settingsCopyCopy - Create output directory:Copy
🚀 Running the Server
You can run the server using our new CLI tool which supports all implementations:
🔌 Integrating with Cursor AI
Cursor can interact with the Resemble AI voice generation server through the SSE interface:
- In Cursor, go to Settings → AI → MCP Servers
- Click "Add Server" and enter the SSE URL:
http://localhost:8083/sse
(adjust port if needed) - Save the configuration
🔌 Integrating with Claude Desktop
- Configure the MCP Server in Claude Desktop settings:Copy
🛠️ Tool Documentation
list_voices
Lists all available voice models from Resemble AI.
Parameters: None
Returns:
voices
: List of available voice models with IDs, names, genders, languages, accents, and descriptions
generate_tts
Generates voice audio from text.
Parameters:
text
(string, required): The text to convert to speechvoice_id
(string, required): The ID of the voice to usereturn_type
(string, optional): How to return the audio: 'file' or 'base64' (default: 'file')output_filename
(string, optional): Filename for the output without extension (default: auto-generated name)
Returns:
success
(boolean): Whether the operation was successfulmessage
(string): Status messageaudio_data
(string, optional): Base64-encoded audio data (if return_type is 'base64')file_path
(string, optional): Path to the saved audio file (if return_type is 'file')
💬 Example Prompts
Once connected to Cursor or Claude Desktop, you can use prompts like:
Listing available voices:
Generating voice audio:
⚠️ Troubleshooting
- Python Version Issues: The MCP package requires Python 3.10 or newer. Use the provided setup scripts to create the correct environment.
- API Connection Issues: Make sure you're using the correct API endpoint. The Resemble AI API endpoint is
https://app.resemble.ai/api/v2/
. - Authentication Errors: Verify your API key is correct and not expired.
- Missing Projects: The API requires at least one project in your Resemble account. Create a project through the Resemble AI dashboard if needed.
- Cursor SSE Connection Errors: If Cursor fails to connect via SSE, make sure:
- The server is running on the specified port
- You're using the correct
/sse
endpoint - No firewall is blocking the connection
- Try restarting both the server and Cursor
📚 Additional Documentation
For more detailed documentation, see the files in the docs/
directory.
📄 License
MIT
This server cannot be installed
Integrates with Claude and Cursor using the Model Context Protocol to generate voice audio from text using Resemble AI's voices.
- Features
- Setup Instructions
- Running the Server
- Connecting to Claude Desktop
- Connecting to Cursor
- Available Tools
- Implementation Details
- Troubleshooting
- Examples
- 📁 Repository Structure
- 🚀 Quick Setup
- Manual Installation
- 🚀 Running the Server
- 🔌 Integrating with Cursor AI
- 🔌 Integrating with Claude Desktop
- 🛠️ Tool Documentation
- 💬 Example Prompts
- ⚠️ Troubleshooting
- 📚 Additional Documentation
- 📄 License