1. Conduid
  2. Developer Tools
  3. ybouhjira/claude-code-tts
MCP server ยท Developer Tools

ybouhjira/claude-code-tts

๐Ÿ”Š Text-to-Speech MCP plugin for Claude Code - hear audio feedback while coding (OpenAI TTS)

53Fair

Scored 2 hours ago ยท breakdown

About ybouhjira/claude-code-tts

ybouhjira/claude-code-tts is an MCP server published by ybouhjira in the Developer Tools category: ๐Ÿ”Š Text-to-Speech MCP plugin for Claude Code - hear audio feedback while coding (OpenAI TTS).

The repository has 21 stars and 14 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/ybouhjira/claude-code-tts

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about ybouhjira/claude-code-tts

Powered by Claude · Grounded in docs

I know everything about ybouhjira/claude-code-tts. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 2 hours ago. Heuristics on the source, not an audit.

  • โœ“README presentThe repository ships documentation.
  • โœ“License declaredUsable under a stated license.
  • โœ“Tests presentA test suite exists in the repository.
  • โœ“Dependencies pinnedA lockfile pins dependency versions.
  • !No dynamic code executionSource scan found eval or shell execution. Review how tool inputs reach it before granting credentials.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v1.0.0v1.0.0

README

Claude Code TTS Plugin

Go Version License CI codecov MCP

A Text-to-Speech MCP server plugin for Claude Code that converts text to speech using OpenAI's TTS API. Get audio feedback from Claude as you work!

Demo

Features

  • Deterministic Auto-Speak: Every Claude response is automatically spoken (via Stop hook)
  • 6 High-Quality Voices: alloy, echo, fable, onyx, nova, shimmer
  • Worker Pool Architecture: Non-blocking queue with concurrent processing
  • Mutex-Protected Playback: One audio plays at a time, no overlapping
  • Cross-Platform: macOS (afplay), Linux (mpv/ffplay/mpg123), Windows (PowerShell)
  • Standalone CLI: speak-text binary for direct TTS without MCP

Quick Install

# One-liner installation
curl -fsSL https://raw.githubusercontent.com/ybouhjira/claude-code-tts/main/install.sh | bash

Or install manually:

git clone https://github.com/ybouhjira/claude-code-tts.git ~/.claude/plugins/claude-code-tts
cd ~/.claude/plugins/claude-code-tts
make install

Requirements

  • Go 1.21+ (for building from source)
  • OpenAI API Key with TTS access
  • Audio Player:
    • macOS: afplay (built-in)
    • Linux: mpv, ffplay, or mpg123
    • Windows: PowerShell (built-in)

Configuration

Set your OpenAI API key:

export OPENAI_API_KEY="sk-..."

Or add to your shell profile (~/.zshrc or ~/.bashrc).

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     Claude Code                              โ”‚
โ”‚                         โ”‚                                    โ”‚
โ”‚                    MCP Protocol                              โ”‚
โ”‚                         โ”‚                                    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚              TTS MCP Server (Go)                     โ”‚    โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚    โ”‚
โ”‚  โ”‚  โ”‚              Tool Handlers                   โ”‚    โ”‚    โ”‚
โ”‚  โ”‚  โ”‚   speak(text, voice)  โ”‚  tts_status()       โ”‚    โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚    โ”‚
โ”‚  โ”‚                โ”‚                                     โ”‚    โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚    โ”‚
โ”‚  โ”‚  โ”‚           Worker Pool (2 workers)          โ”‚      โ”‚    โ”‚
โ”‚  โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚      โ”‚    โ”‚
โ”‚  โ”‚  โ”‚  โ”‚ Job     โ”‚โ”€โ”€โ”€โ–บโ”‚ Queue (50 slots)    โ”‚   โ”‚      โ”‚    โ”‚
โ”‚  โ”‚  โ”‚  โ”‚ Submit  โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚      โ”‚    โ”‚
โ”‚  โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ”‚              โ”‚      โ”‚    โ”‚
โ”‚  โ”‚  โ”‚                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚      โ”‚    โ”‚
โ”‚  โ”‚  โ”‚                   โ”‚ Worker 1 โ”‚ 2    โ”‚     โ”‚      โ”‚    โ”‚
โ”‚  โ”‚  โ”‚                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚      โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚    โ”‚
โ”‚  โ”‚                               โ”‚                      โ”‚    โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚    โ”‚
โ”‚  โ”‚  โ”‚              OpenAI TTS API                    โ”‚  โ”‚    โ”‚
โ”‚  โ”‚  โ”‚         POST /v1/audio/speech                  โ”‚  โ”‚    โ”‚
โ”‚  โ”‚  โ”‚         Model: tts-1                           โ”‚  โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚    โ”‚
โ”‚  โ”‚                      โ”‚                               โ”‚    โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚    โ”‚
โ”‚  โ”‚  โ”‚         Audio Player (Mutex Protected)          โ”‚  โ”‚    โ”‚
โ”‚  โ”‚  โ”‚   macOS: afplay โ”‚ Linux: mpv โ”‚ Win: PowerShell  โ”‚  โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Usage

speak(text, voice)

Convert text to speech and play it aloud.

Parameters:

Parameter Type Required Description
text string Yes Text to speak (max 4096 chars)
voice string No Voice to use (default: alloy)

Available Voices:

Voice Description
alloy Neutral, balanced
echo Male, warm
fable British accent
onyx Deep male
nova Female, friendly
shimmer Soft female

Example:

Use the speak tool to say "Build completed successfully!" with the nova voice.

tts_status()

Get the current status of the TTS system.

Returns:

{
  "worker_count": 2,
  "queue_size": 50,
  "queue_pending": 0,
  "total_processed": 15,
  "total_failed": 0,
  "is_playing": false,
  "recent_jobs": [...]
}

Automatic TTS (Deterministic)

This plugin includes a Stop hook that automatically speaks the first sentence of every Claude response. No configuration needed - it just works.

How it works:

Claude responds โ†’ Stop hook fires โ†’ First sentence extracted โ†’ Audio plays

The hook runs in the background and won't block Claude's responses.

speak-text CLI

A standalone binary for direct TTS without going through MCP:

# Basic usage
speak-text "Hello world"

# With voice selection
speak-text -voice onyx "Error occurred"

Located at ~/.claude/plugins/claude-code-tts/bin/speak-text after installation.

Project Structure

claude-code-tts/
โ”œโ”€โ”€ cmd/
โ”‚   โ”œโ”€โ”€ tts-server/
โ”‚   โ”‚   โ””โ”€โ”€ main.go           # MCP server entry point
โ”‚   โ””โ”€โ”€ speak-text/
โ”‚       โ””โ”€โ”€ main.go           # Standalone CLI binary
โ”œโ”€โ”€ hooks/
โ”‚   โ””โ”€โ”€ auto-speak.sh         # Stop hook for deterministic TTS
โ”œโ”€โ”€ internal/
โ”‚   โ”œโ”€โ”€ audio/
โ”‚   โ”‚   โ””โ”€โ”€ player.go         # Cross-platform audio playback
โ”‚   โ”œโ”€โ”€ server/
โ”‚   โ”‚   โ”œโ”€โ”€ server.go         # MCP server & tool handlers
โ”‚   โ”‚   โ””โ”€โ”€ worker.go         # Worker pool implementation
โ”‚   โ””โ”€โ”€ tts/
โ”‚       โ””โ”€โ”€ openai.go         # OpenAI TTS client
โ”œโ”€โ”€ plugin.json                # Plugin metadata + hook config
โ”œโ”€โ”€ Makefile                   # Build automation
โ””โ”€โ”€ install.sh                 # One-liner installer

Building from Source

# Clone the repository
git clone https://github.com/ybouhjira/claude-code-tts.git
cd claude-code-tts

# Build
make build

# Install to Claude Code plugins
make install

# Run tests
make test

Troubleshooting

"OPENAI_API_KEY environment variable is required"

Set your OpenAI API key:

export OPENAI_API_KEY="sk-..."

"No suitable audio player found on Linux"

Install one of: mpv, ffplay, or mpg123:

# Ubuntu/Debian
sudo apt install mpv

# Fedora
sudo dnf install mpv

# Arch
sudo pacman -S mpv

Audio not playing on macOS

Check that afplay works:

# Test with a sample audio file
afplay /System/Library/Sounds/Ping.aiff

Queue is full

The default queue size is 50. If you're hitting this limit:

  1. Wait for current jobs to complete
  2. Check tts_status() to see pending jobs
  3. The queue will drain as jobs are processed

High latency

  • OpenAI TTS API typically takes 1-3 seconds per request
  • Audio files must download completely before playing
  • Consider keeping messages short for faster feedback

API Costs

This plugin uses OpenAI's tts-1 model:

  • Cost: ~$0.015 per 1,000 characters
  • Example: "Hello, world!" (13 chars) = ~$0.0002

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

Credits

README fetched from the repository 2 hours ago. The original is authoritative.

Questions

About ybouhjira/claude-code-tts

How do I install ybouhjira/claude-code-tts?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is ybouhjira/claude-code-tts safe to use with an AI agent?

Its trust score is 53 out of 100 (fair). It passes 4 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is ybouhjira/claude-code-tts still maintained?

The last commit was 8 months ago and 5 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.