About voicegen-port
voicegen-port is a CLI and MCP server for using ElevenLabs speech and voice functions. It supports speech generation, transcription, audio cleanup, sound effects, and voice-library management, with generated audio represented as artifact summaries.
Key features
- 01Text-to-speech generation
- 02Sound-effect generation
- 03Speech transcription
- 04Voice-track isolation
- 05Voice search and management
- 06Audio artifact summaries
Use cases
- 01Generate spoken audio from text
- 02Transcribe an audio recording
- 03Isolate speech in a noisy clip
- 04Create and save designed voices
MCP support
Its `mcp` subcommand runs a stdio MCP server exposing 14 documented ElevenLabs tools for speech, audio, and voice operations.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
14Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The text to convert to speech. |
| model_id | string | No | The ID of the text-to-speech model to use; defaults to eleven_multilingual_v2 when omitted. |
| voice_id | string | No | The ID of the voice to use for speech generation; the documented default voice applies when omitted. |
| output_format | string | No | The audio output format for the generated speech, such as mp3_44100_128 or pcm_44100. |
Details
From the project READMEvoicegen-port
voicegen-port turns text into spoken audio, and audio back into text, through the ElevenLabs API. It can read a paragraph aloud in a chosen voice, invent a sound effect from a description, transcribe a recording, clean a noisy clip down to its voice, and manage the voice library itself — designing new voices from a written description and saving the ones worth keeping. It runs from the command line or as an MCP server for agents.
An ElevenLabs API key is required. Put it in the
ELEVENLABS_API_KEY environment variable; the key is sent to the
API as the xi-api-key header and never appears in output. When the
variable is missing, every call fails with an error that names it.
Audio is binary, and this tool treats it honestly: generation calls report an artifact summary (byte count, base64 length, content type) instead of dumping raw audio into text output.
Install
npx @reneturcios/voicegen-port voices
Or run the container image:
docker run -i -e ELEVENLABS_API_KEY ghcr.io/cloudcorprecords/voicegen-port
The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
CLI
export ELEVENLABS_API_KEY="your ElevenLabs API key"
voicegen-port tts "Welcome to the show" --voice v_george
voicegen-port sfx "rain on a tin roof" --duration 4
voicegen-port stt interview.mp3 --language en
voicegen-port isolate noisy-call.mp3
voicegen-port voices
voicegen-port voice v_rachel
voicegen-port search-voices "narrator" --page-size 5
voicegen-port design "A calm British narrator" --text "Sample line"
voicegen-port create-from-preview gen_1 "Calm Narrator"
voicegen-port add-voice "Studio Voice" --description "Warm and close"
voicegen-port delete-voice v_old
voicegen-port models
voicegen-port subscription
voicegen-port user
voicegen-port --version
Exit codes: 0 on success, 1 when a call fails (including a
missing ELEVENLABS_API_KEY or an API error), 2 for usage errors.
MCP server
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
npx -y @reneturcios/voicegen-port mcp
MCP client configuration:
{
"mcpServers": {
"voicegen-port": {
"command": "npx",
"args": ["-y", "@reneturcios/voicegen-port", "mcp"],
"env": { "ELEVENLABS_API_KEY": "your ElevenLabs API key" }
}
}
}
Tools
This is the documented core subset (14 tools) of the official
ElevenLabs MCP server. The conversational-AI and telephony tools
(create_agent, list_agents, get_agent, delete_agent,
add_knowledge_base_to_agent, make_outbound_call,
list_phone_numbers) plus voice_clone, speech_to_speech, and
play_audio are not implemented; see the build report.
| Tool | Input | What it returns |
|---|---|---|
text_to_speech | text (required), voice_id, model_id, output_format (optional) | Audio artifact summary: bytes, base64 length, content type. |
text_to_sound_effects | text (required), duration_seconds, prompt_influence (optional) | Audio artifact summary for the generated effect. |
speech_to_text | file_path (required), language_code, model_id (optional) | The transcription payload, including its text. |
isolate_audio | file_path (required) | Audio artifact summary for the isolated voice track. |
list_voices | — | All voices: id, name, and category per voice. |
get_voice | voice_id (required) | The full voice record. |
search_voices | search (required), category, page_size (optional) | Matching voices in the same summary shape. |
text_to_voice | prompt (required), text (optional) | Voice design previews, including generated voice ids. |
create_voice_from_preview | generated_voice_id, voice_name (required), voice_description (optional) | The saved voice record. |
add_voice | name (required), description (optional) | The added voice record. |
delete_voice | voice_id (required) | The API's deletion response. |
list_models | — | All models: id, name, and description per model. |
check_subscription | — | The account's subscription record. |
get_user_info | — | The API key owner's user record. |
Calls go to https://api.elevenlabs.io/v1 with JSON bodies.
speech_to_text and add_voice are multipart uploads upstream;
this rebuild shapes them as JSON bodies naming the file / voice, a
simplification recorded in the build report.
Development
npm install
npm run build # tsc -> dist/
npm test # node test runner over test/*.test.ts, no network (fake fetch fixtures)
npm run dev # run the CLI from source via tsx
License
MIT — see LICENSE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.