Skip to main content
Glama
OLGTX303
by OLGTX303

voxcpm-mcp

VoxCPM2 diffusion TTS as an MCP server for Claude Code.
Synthesize speech, clone voices, and narrate anything — from inside Claude Code with a /voxcpm slash command.

VoxCPM2 is a 2B-parameter diffusion text-to-speech model by OpenBMB that produces 48 kHz speech with expressive prosody and accurate voice cloning. This package wraps it in an MCP server so Claude Code (or any MCP client) can call it as a tool.


Architecture

Claude Code (MCP client)
        │  stdio MCP
        ▼
voxcpm-mcp server (any Python ≥ 3.10)
        │  subprocess stdin/stdout JSON
        ▼
worker.py  (runs inside CUDA venv — torch + voxcpm installed)
        │
VoxCPM2 model (openbmb/VoxCPM2, loaded once, stays in VRAM)

The server and CUDA worker are deliberately separated so the MCP server itself has zero heavy dependencies — only mcp. The CUDA venv (with torch, voxcpm, soundfile, etc.) is pointed to via VOXCPM_PYTHON.


Related MCP server: Voice MCP

Requirements

Component

Requirement

MCP server

Python 3.10+, mcp>=1.0.0

Worker (CUDA venv)

Python 3.12, torch 2.x + CUDA 12.x, voxcpm, soundfile, numpy

GPU

NVIDIA GPU with ≥ 6 GB VRAM (tested on RTX 4060 Laptop)

Model

openbmb/VoxCPM2 cached in Hugging Face local cache


Installation

1. Install the MCP server package

pip install -e .
# or, without cloning:
pip install git+https://github.com/OLGTX303/voxcpm-mcp.git

2. Point to your CUDA venv

Set VOXCPM_PYTHON to the Python executable inside a venv that has voxcpm and torch+CUDA installed:

# Windows
set VOXCPM_PYTHON=C:\path\to\cuda-venv\Scripts\python.exe

# Linux / macOS
export VOXCPM_PYTHON=/path/to/cuda-venv/bin/python

If you used the fraudsentinel demo tools setup, the venv is already at:

F:\5Gcase\hackton\fraudsentinel\demotools\fraudsentinel-demo\.venv312\Scripts\python.exe

3. Download VoxCPM2 model (if not already cached)

from huggingface_hub import snapshot_download
snapshot_download("openbmb/VoxCPM2")

4. Register with Claude Code

claude mcp add voxcpm-tts \
  -e VOXCPM_PYTHON="C:\path\to\cuda-venv\Scripts\python.exe" \
  -e VOXCPM_OUTPUT_DIR="C:\path\to\output" \
  -- voxcpm-mcp

5. Install the /voxcpm skill

Copy the skill file to your Claude Code commands directory:

# Windows
copy .claude\commands\voxcpm.md %APPDATA%\Claude\commands\voxcpm.md

# Linux / macOS
cp .claude/commands/voxcpm.md ~/.claude/commands/voxcpm.md

Or place it in your project's .claude/commands/ folder to make it project-local.


MCP tools

Tool

Description

synthesize

Text → WAV using default VoxCPM2 voice

synthesize_with_clone

Text → WAV cloning a reference speaker voice

preload_model

Load model into VRAM (warm-up, ~10 s)

ping

Check worker subprocess health

synthesize parameters

Parameter

Type

Default

Description

text

string

required

Text to synthesize

output_filename

string

output.wav

Output filename inside VOXCPM_OUTPUT_DIR

steps

integer

30

Diffusion steps (10=fast draft, 50=best quality)

synthesize_with_clone parameters

Parameter

Type

Default

Description

text

string

required

Text to synthesize

reference_wav_path

string

required

Absolute path to reference WAV (48 kHz mono)

reference_text

string

required

Transcript of the reference WAV

output_filename

string

cloned.wav

Output filename

steps

integer

30

Diffusion steps


/voxcpm skill

Once installed, use the slash command in Claude Code:

/voxcpm Welcome to the demonstration of autonomous forensic incident response.
/voxcpm Clone my voice from ref.wav — it says "Hello world". Now say: Good morning.
/voxcpm warm up

Environment variables

Variable

Default

Description

VOXCPM_PYTHON

...fraudsentinel...\.venv312\Scripts\python.exe

Python executable with VoxCPM2 + CUDA

VOXCPM_OUTPUT_DIR

./voxcpm_output

Directory where WAV files are saved


License

MIT — see LICENSE.

Available Tools

4 tools
pingA

Check that the VoxCPM2 worker subprocess is alive.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It indicates the tool is a non-destructive check (aliveness). However, it does not specify the return format or behavior on failure, which would be useful. For a simple ping, the current description is mostly adequate.

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 with no wasted words. It is efficiently front-loaded with the core purpose.

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), the description sufficiently conveys its purpose. However, it could be enhanced by mentioning the expected response or that it's safe to call anytime.

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 schema coverage is 100% (empty schema). The description does not need to add parameter details. The base score is appropriately 4.

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 explicitly states it checks if a worker subprocess is alive, using a specific verb ('Check') and resource ('VoxCPM2 worker subprocess'). This clearly distinguishes it from sibling tools like preload_model, synthesize, and synthesize_with_clone.

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 health checks, but provides no explicit guidance on when to use it versus alternatives or any exclusions. Given the tool's simplicity, the lack of detailed usage context is acceptable but not optimal.

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

preload_modelA

Load VoxCPM2 into VRAM now (takes ~10 s on RTX 4060 Laptop). Call this before synthesize if you want the first synthesis to be fast.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses timing ('~10 s on RTX 4060 Laptop') and the effect of preloading. Could mention idempotency or memory implications, but overall adequate.

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?

Two concise sentences, front-loaded with action. Every sentence adds value with no wasted words.

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

Completeness5/5

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

Tool has no parameters, no output schema, and low complexity. Description fully covers its purpose, timing, and usage context. Complete for an agent to decide when to invoke.

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?

No parameters exist, so schema coverage is 100%. Description does not need to add parameter info. Baseline 4 for zero parameters.

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?

Description explicitly says 'Load VoxCPM2 into VRAM now' with a specific verb and resource. It clearly distinguishes from sibling tools like 'synthesize' which generate audio.

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?

States to call before synthesize for fast first synthesis, providing explicit usage context. Does not list alternatives but implies when not to use it (if speed is not a concern).

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

synthesizeA

Synthesize speech from text using VoxCPM2 (2B diffusion TTS, 48 kHz). Returns the path to the output WAV file and its duration.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to synthesize (English).
output_filenameNoOutput WAV filename (e.g. 'scene_01.wav'). Saved to VOXCPM_OUTPUT_DIR.output.wav
stepsNoDiffusion inference steps (10–50). Higher = better quality, slower.

TDQS

A3.9/5.0
Behavior4/5

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

The description adds behavioral context beyond the schema by mentioning the model architecture, sample rate, and that it returns the output file path and duration. However, it does not disclose potential side effects like file overwriting or failure modes.

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 sentence that efficiently communicates the main function and output. No unnecessary words.

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 tool with 3 parameters and no output schema or annotations, the description provides essential information about model and output but misses details on error handling, timing (synchronous/asynchronous), and dependency on model preloading.

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?

Schema description coverage is 100%, so baseline is 3. The description does not add extra meaning for parameters beyond what the schema already provides (e.g., default values, range hints). The return info is useful but not parameter-specific.

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 'synthesize' and the resource 'speech from text', specifies the model (VoxCPM2) and output format (WAV, 48 kHz). It distinguishes from sibling tools like 'synthesize_with_clone' by its focus on standard TTS.

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 text-to-speech synthesis but does not explicitly state when to use this tool versus alternatives like 'synthesize_with_clone' or prerequisites like model preloading. The sibling names provide clues, but no direct guidance is given.

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

synthesize_with_cloneA

Synthesize speech cloning a voice from a reference WAV. The reference WAV sets the speaker identity, prosody, and style. Both reference and output are 48 kHz mono WAV.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to synthesize.
reference_wav_pathYesAbsolute path to reference WAV (the voice to clone). Must be 48 kHz mono.
reference_textYesTranscript of the reference WAV (used for alignment).
output_filenameNoOutput WAV filename.cloned.wav
stepsNoDiffusion inference steps.

TDQS

A3.8/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 full burden. It explains the basic behavior: cloning from a reference WAV, setting speaker identity/prosody/style, and format. It omits details on side effects, auth requirements, or process reversibility, which are less critical for a synthesis tool but still absent.

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 extremely concise, consisting of two short sentences that front-load the core action and then provide essential details. Every word is purposeful with no redundancy.

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?

Given the absence of an output schema and annotations, the description is incomplete. It does not mention dependencies like model preloading (suggested by sibling tool 'preload_model'), output behavior, or error conditions. The agent may lack sufficient context to use the tool effectively.

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?

Schema description coverage is 100%, so baseline is 3. The description adds context about reference WAV setting prosody and style, and the 48 kHz mono format for both files, but these are partially redundant with parameter descriptions. No significant new meaning beyond the schema.

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 specifies the tool performs speech synthesis by cloning a voice from a reference WAV, detailing that the reference sets speaker identity, prosody, and style. It distinguishes itself from sibling tools like 'synthesize' (generic TTS) and 'preload_model' (model loading). The format constraints are well-stated.

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 implies use for voice cloning tasks, contrasting with a standard synthesizer. However, it does not explicitly state when to use this tool versus alternatives or provide exclusion criteria. The context is clear but lacks direct guidance.

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.

  1. 4 tool updatesv0.1.0
    • First observedping
    • First observedpreload_model
    • First observedsynthesize
    • First observedsynthesize_with_clone

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct operation: health check, model preloading, standard synthesis, and cloned synthesis. There is no overlap in functionality.

Naming Consistency5/5

All tool names use a consistent snake_case pattern with clear, imperative verbs (ping, preload, synthesize, synthesize_with_clone).

Tool Count5/5

Four tools covers the essential workflow of a TTS server: ensure service is alive, preload model for fast synthesis, generate speech, and clone voice. No extraneous or missing tools.

Completeness4/5

Core synthesis and cloning are covered, but missing advanced features like listing available voices or managing models. Minor gap for production use.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables bidirectional voice interaction for Claude Code using local speech-to-text and text-to-speech models optimized for Apple Silicon. It provides tools to listen to user speech via microphone and speak responses aloud through system speakers.
    16
    Apache 2.0