Claude Code Tts logo

Claude Code Tts

by ybouhjira

Converts Claude Code text into spoken audio through OpenAI TTS with six voices and cross-platform playback.

Install Claude Code Tts

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for ybouhjira/claude-code-tts, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

ybouhjira/claude-code-tts MCP server connects Claude Code to OpenAI's TTS API and plays generated audio locally. It provides speak and tts_status tools, plus a Stop hook that reads the first sentence of each Claude response. Use it when you want spoken feedback during Claude Code sessions and have an OpenAI API key and supported audio player available.

Use cases

  • Speak the first sentence of each Claude Code response
  • Play build and task completion notifications
  • Select different voices for spoken feedback
  • Check queued and currently playing speech
  • Run direct text-to-speech from the command line

Key features

  • OpenAI tts-1 speech generation
  • Six selectable voices
  • Queued worker processing
  • Mutex-protected audio playback
  • Claude Code Stop hook
  • Cross-platform player support

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

16/17 checks healthy over the last 84d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars21Stargazers on the source repository.
Last commit9mo agoMost recent push to the default branch.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Claude Code Tts works

What ybouhjira/claude-code-tts does

ybouhjira/claude-code-tts is a Go-based MCP server for the 🎧 Text-to-Speech category. It sends requested text to OpenAI's tts-1 model, downloads the resulting audio, and plays it through the host computer's audio system. The server is designed for Claude Code and also includes a standalone speak-text command for direct use outside MCP.

The main speak tool accepts text and an optional voice. Text is limited to 4096 characters, and the default voice is alloy. The available voices are alloy, echo, fable, onyx, nova, and shimmer. The tts_status tool reports worker count, queue capacity and pending work, processed and failed totals, current playback state, and recent jobs.

How it works

Claude Code communicates with the server over MCP. A speak request enters a queue handled by two workers. Audio playback is protected by a mutex, so only one generated audio file plays at a time even when multiple jobs are being processed.

The plugin also includes a Stop hook. When Claude finishes responding, the hook extracts the first sentence and sends it for background playback, allowing the response to return without waiting for audio. The queue has 50 slots. OpenAI TTS requests typically take one to three seconds, and audio must be downloaded before playback begins.

Supported playback commands are afplay on macOS, mpv, ffplay, or mpg123 on Linux, and PowerShell on Windows. The exact player available therefore depends on the operating system and local installation.

Setup and configuration

Install with the repository's shell installer, or clone the project into ~/.claude/plugins/claude-code-tts and run make install. Building from source requires Go 1.21 or newer according to the requirements section. Set OPENAI_API_KEY in the environment or shell profile before starting the server.

macOS includes the required afplay command. Linux users need one of the listed players installed. Windows playback uses the built-in PowerShell option. After installation, the standalone binary is available at ~/.claude/plugins/claude-code-tts/bin/speak-text.

Tools and capabilities

The ybouhjira/claude-code-tts MCP server includes:

  • speak(text, voice): submits text to OpenAI TTS and plays the result.
  • tts_status(): returns queue, worker, processing, failure, and playback information.
  • Automatic first-sentence speech through the Claude Code Stop hook.
  • The speak-text CLI for direct text-to-speech without an MCP request.
  • Six selectable OpenAI voices and platform-specific audio playback.

Limitations and notes

An OpenAI API key with TTS access is required, and requests incur OpenAI usage costs. The queue holds 50 jobs by default; additional work may need to wait if it is full. Audio playback requires a compatible local player, especially on Linux.

The project is released under the MIT License.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Claude Code Tts

ybouhjira/claude-code-tts is an MCP server that connects Claude Code to OpenAI's TTS API and exposes speak and tts_status tools. speak queues text for audio playback with one of six voices, while tts_status reports workers, queue activity, processing totals, and playback state.

Install it with the repository's curl-based installer, or clone it into ~/.claude/plugins/claude-code-tts and run make install. Building from source requires Go 1.21 or newer, and the installation places the speak-text binary in the plugin's bin directory.

Set the OPENAI_API_KEY environment variable before running the server. You can export it in the current shell or add it to ~/.zshrc or ~/.bashrc. The key must have access to OpenAI's TTS API.

It supports afplay on macOS, mpv, ffplay, or mpg123 on Linux, and PowerShell on Windows. Linux users must install one of the supported players if none is already available.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewClaude Code Tts AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ybouhjira-claude-code-tts?style=directory)](https://allmcps.com/mcp/ybouhjira-claude-code-tts)
HTML Embed
<a href="https://allmcps.com/mcp/ybouhjira-claude-code-tts"><img src="https://allmcps.com/api/badge/ybouhjira-claude-code-tts?style=directory" alt="Claude Code Tts on AllMCPs" /></a>