cartesia-mcp

The Cartesia MCP server allows clients such as Cursor, Claude Desktop, and OpenAI agents to interact with Cartesia's API. It offers features like speech localization, text-to-audio conversion, and audio infilling, making it a versatile tool for developers.

GitHub Stars

8

User Rating

Not Rated

Favorites

0

Views

61

Forks

3

Issues

2

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Python 3.7以上

Installation

Installation

Prerequisites

Python: 3.7 or higher

Installation Steps

1. Install Cartesia MCP

sh
pip install cartesia-mcp

2. Verify Executable Path

sh
which cartesia-mcp # Check absolute path

Troubleshooting

Common Issues

Issue: Command not found after installation Solution: Ensure that Python's path is correctly set.

Configuration

Configuration

Claude Desktop Setup

Edit claude_desktop_config.json to add the MCP server:
json
{
  "mcpServers": {
    "cartesia-mcp": {
      "command": "",
      "env": {
        "CARTESIA_API_KEY": "",
        "OUTPUT_DIRECTORY": "// directory to store generated files (optional)"
      }
    }
  }
}

Environment Variables

Set the following environment variable as needed:
bash
export CARTESIA_API_KEY="your-api-key"

Security Settings

Store API keys securely and set appropriate access permissions.

Examples

Examples

Using with Claude Desktop

1Verify MCP Server Startup
Open Claude Desktop and confirm that the configuration has been loaded correctly.
2Execute Basic Commands

   Available tools from this MCP server:
   - List all available Cartesia voices
   - Convert a text phrase into audio
   

Programmatic Usage

python
import requests

def call_mcp_tool(tool_name, params):
    response = requests.post(
        'http://localhost:3000/mcp/call',
        json={
            'tool': tool_name,
            'parameters': params
        }
    )
    return response.json()

Usage example

result = call_mcp_tool('analyze', { 'input': 'sample data', 'options': {'format': 'json'} })

Use Cases

Convert text to audio using a specific voice in Claude Desktop.
Localize voice clips into different languages.
Infill new audio between existing audio files.
Retrieve a list of available voices from Cartesia for project selection.

Additional Resources