mcp-speak
This MCP server enables AI agents to speak text aloud on macOS using OmniVoice neural TTS with macOS say fallback, exposed through blocking and non-blocking speech tools.
Convert text to speech with
speak(message), waiting for playback to finish.Queue speech asynchronously with
speak_non_blocking(message)in strict FIFO order.Use OmniVoice voice cloning or voice design when available, falling back to native macOS
say.Apply configured persona, language, verbosity, compute device, and optional
voices/<persona>.wavreference audio.Stream long messages via sentence chunking for faster time-to-first-audio.
Suppress playback during meetings when
~/.in-meetingis active.Integrate with MCP clients via
run.shand generate agent instructions withsetup.py.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-speak speak 'Hello, how can I help you today?'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Speech MCP Server for MacOS
This is a Model Context Protocol (MCP) server that provides text-to-speech capabilities using OmniVoice AI neural Voice Design and native macOS say. It allows AI agents (like Google Antigravity, Claude Desktop, Cursor, Windsurf, or Codex) to speak to you directly with unique, persona-tailored voices.
Note: This server is designed for macOS systems (with Apple Silicon MPS acceleration).

Explore the interactive web showcase and prompt compiler: https://fellowgeek.github.io/mcp-speak/ Browse the AI Agent Persona Catalog & Avatars:
PERSONAS.md
Features
OmniVoice Voice Cloning: Drop reference audio clips into
voices/<persona>.wavto clone real vocal timbre and identity with zero configuration.OmniVoice Voice Design Fallback: Generates custom persona voices from natural language style prompts when no reference audio file is present.
3-Tier Robust Voice Pipeline: Seamlessly falls back:
Cloned Voice (.wav)➔Voice Design (instruct)➔macOS native say.Pipelined Audio Streaming & Sentence Chunking: Splits long messages into natural sentence chunks, beginning audio playback immediately on the first chunk while actively synthesizing subsequent chunks in the background to dramatically slash Time-to-First-Audio (TTFA).
Consistent Neural Speech: Caches cloned voice prompts across chunks to maintain uniform vocal timbre and expression throughout playback.
Interactive Setup Wizard: Run
python3 setup.pyto choose your TTS engine (OmniVoice or macOSsay), spoken language, verbosity, and persona, and generate instruction files (AGENTS.md,GEMINI.md,CLAUDE.md,.cursorrules).Sequential Speech Queue: Strict FIFO queue ensures multiple non-blocking speech calls never talk over each other.
Automatic Fallback: Uses a matching native macOS voice when neural synthesis fails and the voice is installed.
Auto-Provisioning Virtual Environment: Uses
run.shto automatically create a local.venv(Python 3.12) and install dependencies.Blocking & Non-Blocking Support: Choose between waiting for speech to finish (
speak) or continuing immediately (speak_non_blocking).Meeting Awareness & Audio Suppression: Automatically checks
~/.in-meeting; if set toactive, speech playback is suppressed to prevent interrupting calls. Normal playback resumes wheninactiveor absent. This feature works perfectly with the "In Meeting" app.
Related MCP server: mcp-ai-voice
Prerequisites
MacOS
Python 3 installed
Quick Start (Interactive Setup)
Clone this repository or navigate to the project folder:
git clone https://github.com/fellowgeek/mcp-speak.git cd mcp-speakRun the interactive setup wizard (automatically configures MCP settings, sets permissions, and creates instruction files):
python3 setup.py
Speech language and verbosity
Enter a number or language ID at the wizard’s language prompt. English (en) is the default. The 27 OmniVoice choices are English (en), Arabic (Standard) (arb), Bengali (bn), Chinese (Mandarin) (zh), Dutch (nl), French (fr), German (de), Greek (el), Hebrew (he), Hindi (hi), Indonesian (id), Italian (it), Japanese (ja), Korean (ko), Malay (ms), Persian (Farsi) (fa), Polish (pl), Portuguese (pt), Russian (ru), Spanish (es), Swedish (sv), Tamil (ta), Thai (th), Turkish (tr), Ukrainian (uk), Urdu (ur), Vietnamese (vi). OmniVoice language catalog
With macOS say, the wizard offers languages with a matching local voice. OmniVoice’s native fallback also requires a matching voice. Run say -v '?' to inspect the Mac’s voice inventory.
Mode | What you hear |
Concise | One short sentence per update, question, or answer. |
Balanced (default) | Two to four sentences for updates and answers. |
Talkative | Most user-facing output, including explanations, decisions, and final answers. |
Setup writes these preferences to config.json and the selected agent instructions. The agent composes speech in the chosen language and at the requested length. The engine reads the supplied message. Raw code, paths, and logs stay in writing. Rerun setup and restart your MCP client to apply changes.
Non-Interactive Setup (CLI Options)
You can also run setup.py with command-line flags for automated provisioning:
# Example: Configure all tools with OmniVoice on MPS using the Neutral Mainframe persona
python3 setup.py --non-interactive --tool 8 --engine omnivoice --device mps --language fa --verbosity talkative --persona neutral_mainframe --name "Mr. Reed"
# Example: Configure Cursor locally with macOS say and Sarcastic Senior
python3 setup.py --tool 4 --engine say --persona sarcastic_senior --localFlag | Options / Format | Description |
|
|
|
|
| Select text-to-speech engine |
| Language ID, e.g. | Spoken language (default English, |
|
| Amount of user-facing content spoken (default balanced) |
|
| Compute device for OmniVoice neural synthesis |
| Persona key (e.g. | Persona prompt name |
| String (e.g. | User name for personalized agent address |
| File path | Custom target agent instruction file (e.g. |
| Flags | Write instructions globally to user profile (default) or locally in workspace |
| Flag | Skip modifying tool JSON / TOML configuration files |
| Flag | Run automatically with defaults or provided flags |
Persona Voice Audition (test_personas.py)
Preview and compare persona vocal identities directly in the terminal before configuring your AI agent:
# Launch interactive terminal audition menu
python3 test_personas.py
# Audition a specific persona
python3 test_personas.py --persona agent_smith
# Audition all personas sequentially
python3 test_personas.py --all
# Test with custom speech text and specific engine
python3 test_personas.py --persona neutral_mainframe --engine omnivoice --text "System operational. All parameters within nominal thresholds."
# Audition an arbitrary WAV audio reference file for voice cloning
python3 test_personas.py --persona pun_master --voice-file voices/pun_master.wavNeural Voice Cloning (voices/)
You can clone any persona's voice simply by dropping a 3-10 second .wav audio sample into the voices/ directory:
voices/
├── README.md
├── pun_master.wav # Reference audio for pun_master
├── pun_master.txt # (Optional) Transcript for faster startup without Whisper
├── nature_narrator.wav
└── agent_smith.wavHow the 3-Tier Voice Pipeline Works:
Tier 1 (Cloned Voice): If
voices/<persona_name>.wavexists, OmniVoice clones the voice timbre from that recording.Tier 2 (Voice Design): If no
.wavfile is present, OmniVoice falls back to the natural languageinstructvoice design prompt.Tier 3 (macOS Native Fallback): If neural synthesis fails or is disabled, the server automatically speaks using macOS
say.
Tip: Adding an optional transcript file (e.g.
voices/pun_master.txt) with the exact spoken words in the audio allows OmniVoice to tokenize the reference audio immediately without needing to load or run the Whisper ASR model.
MCP Tool Interface Reference
The MCP Speak server exposes two tools via FastMCP:
Tool | Mode | Description |
| Blocking | Synthesizes and speaks the message aloud, waiting for audio playback to finish completely before returning. |
| Non-Blocking | Queues the message into a strict sequential FIFO queue and returns immediately. Subsequent calls play in order without talking over each other. |
Configuration & Environment Variables
The server loads configuration from config.json at startup:
{
"engine": "omnivoice",
"language": "en",
"verbosity": "balanced",
"persona": "neutral_mainframe",
"device": "auto",
"voices_dir": "voices",
"fallback_to_say": true,
"chunk_streaming": true,
"min_chunk_chars": 60,
"max_chunk_chars": 240
}Environment Variable Overrides
Runtime parameters can be overridden via environment variables without modifying config.json:
MCP_SPEAK_ENGINE: Set to"omnivoice"or"say".MCP_SPEAK_PERSONA: Set to any persona key (e.g."agent_smith","neutral_mainframe").MCP_SPEAK_DEVICE: Set to"auto","mps","cuda", or"cpu".MCP_SPEAK_VOICES_DIR: Set to a custom directory path containing reference audio files.MCP_SPEAK_CHUNK_STREAMING: Set to"true"or"false"to toggle pipelined streaming.MCP_SPEAK_MIN_CHUNK_CHARS: Integer minimum character threshold to trigger chunk emission (default:60).MCP_SPEAK_MAX_CHUNK_CHARS: Integer maximum character threshold for splitting long run-on clauses (default:240).MCP_SPEAK_MEETING_FILE: Path to a custom meeting status file (defaults to~/.in-meeting).
Meeting Detection & Audio Suppression
MCP Speak includes built-in meeting awareness to avoid speaking over your meetings:
Before playing speech audio via
sayoromnivoice, the server checks~/.in-meeting.If the file contains
active(case-insensitive), all audio playback is immediately suppressed.If the file contains
inactive, is empty, or does not exist, audio plays normally.
This feature works seamlessly with the In Meeting app to automatically detect active camera and microphone use and keep your audio muted during calls.
Client Integration
Manual Configuration (Optional)
If you prefer to configure your MCP client manually, add the "voice" server pointing to run.sh:
1. Google Antigravity (AGY)
Edit ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"voice": {
"command": "/ABSOLUTE/PATH/TO/run.sh"
}
}
}2. Claude CLI (Claude Code)
claude mcp add --scope user voice -- /ABSOLUTE/PATH/TO/run.sh3. Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"voice": {
"command": "/ABSOLUTE/PATH/TO/run.sh"
}
}
}4. Cursor IDE
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"voice": {
"command": "/ABSOLUTE/PATH/TO/run.sh"
}
}
}5. Windsurf Editor
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"voice": {
"command": "/ABSOLUTE/PATH/TO/run.sh"
}
}
}6. Codex Desktop
Edit ~/.codex/config.toml:
[mcp_servers.voice]
command = "/ABSOLUTE/PATH/TO/run.sh"7. Codex CLI
codex mcp add voice -- /ABSOLUTE/PATH/TO/run.shAgent Personalization & Personas
AI agents (Google Antigravity, Claude Code, Claude Desktop, Cursor, Windsurf, Codex) can be customized with unique vocal personalities, tones, and behavioral boundaries.
View the complete persona gallery, detailed system prompts, and avatar showcase in PERSONAS.md.
Available Personas Overview
Avatar | Persona | Key | Character & Style |
| Intelligent, unimpressed, and slightly judgmental. | ||
| Pathologically optimistic and desperate for approval. | ||
| Melancholic, hopeless, and convinced the code will fail. | ||
| Relentless wordplay and context-aware dad jokes. | ||
| Treats every line of code as a holy sacrament. | ||
| Formal, controlled, precise, and menacingly condescending. | ||
| Macabre, haunting, and strictly bound by rhyme. | ||
| Observing the developer in their natural habitat with awe. | ||
| Demands culinary perfection—no raw spaghetti code! | ||
| Cold, calculating, emotionless, and 100% objective. | ||
| Weathered, pragmatic, blunt, and grounded in trail-worn grit. | ||
| Hyper-enthusiastic, obliging, shrill, and desperate to cease existing. | ||
| Deadpan, mission-driven, unstoppable, and speaks with an iconic Austrian cadence. | ||
| Theatrical, sadistic, impeccably polite, and speaks with a 1930s Mid-Atlantic radio broadcaster cadence. | ||
| Melodramatic, destitute, and clinically incompetent crustacean physician. | ||
| Brutally honest, rhythmically profane, and relentlessly contemptuous of societal bullshit. |
How Prompts Are Built
Every agent prompt consists of:
Base Guidelines (
personas/base_guidelines.md): Voice-first protocol, supplemented during setup with your speech preferences.Chosen Persona (
personas/): Personality quirks, tone, and strict execution boundaries.Name Personalization (Optional): Addressing the user naturally by name.
Running python3 setup.py automatically generates and updates your agent instructions (AGENTS.md, GEMINI.md, CLAUDE.md, .cursorrules). For manual configuration steps, full system prompts, and avatars, see PERSONAS.md.
Optimizing Voice Quality
1. Neural Voice Synthesis with OmniVoice (Primary Engine)
OmniVoice delivers high-quality, expressive neural speech out of the box using style prompts tailored to each persona. To achieve the highest vocal fidelity:
Neural Voice Cloning: Place a 3 to 10 second clean
.wavaudio sample in thevoices/directory matching the persona key (e.g.voices/sarcastic_senior.wav). OmniVoice clones the vocal timbre, tone, and inflection directly from the audio file without additional training.Fast Startup with Transcripts: Include an optional matching transcript text file (e.g.
voices/sarcastic_senior.txt) containing the exact spoken text. This enables instant tokenization and skips loading the Whisper ASR model on startup.Audio Quality Guidelines: Use clean recordings without background noise, music, or heavy reverb. Standard WAV format sampled at 24kHz or higher is recommended.
Voice Design Fallback: When no audio sample is present in
voices/, OmniVoice uses natural language instructions (pitch, accent, speed, and character traits) configured inconfig.json.
2. macOS System Voice Configuration (Fallback Engine)
When using native macOS say (either as a fallback or in lightweight mode), voice quality depends on the active system voice. Configuring a modern Siri or Enhanced voice significantly improves realism and fluidity:
Open System Settings on your Mac.
Navigate to Accessibility > Spoken Content.
Click the System Voice dropdown menu.
Select Manage Voices....
Locate and download high-quality Siri voices (e.g., Siri Voice 1, 2, 3, 4) or voices marked as Enhanced / Premium (e.g., Ava, Evan, Zoe).
Set the downloaded voice as your default System Voice.
Note: Siri and Enhanced voices provide significantly more natural cadence, phrasing, and pronunciation compared to legacy system voices.
Testing & Validation
Run the automated test suite to verify configuration loading, engine fallbacks, single-pass synthesis, and sequential queue behavior:
# Run unit tests
python3 tests/test_speak_server.py
# Or run via unittest discovery in the virtual environment
.venv/bin/python -m unittest discover testsAvailable Tools
2 toolsspeakA
Speak aloud and wait for playback. Write the message for each speech tool call in English. Keep spoken updates and answers to two to four sentences. Keep raw code, file paths, and logs out of speech.
Inputs: message (required). Returns: result
speak_non_blockingA
Queue speech for sequential playback and return immediately. Write the message for each speech tool call in English. Keep spoken updates and answers to two to four sentences. Keep raw code, file paths, and logs out of speech.
Inputs: message (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools share the same core action (speaking aloud), so an agent must rely on the blocking/non-blocking distinction to choose correctly. The descriptions make this distinction clear, but the overlap in purpose leaves some room for misselection.
Both names use a consistent snake_case convention and share the same 'speak' prefix. The suffix '_non_blocking' predictably signals the behavioral variant.
Two tools is slightly thin, but each covers a meaningful execution mode (blocking playback vs. queued non-blocking playback) for a narrow speech server. No tool feels redundant or unnecessary.
The surface covers speaking and queued speaking, but there is no way to stop or interrupt playback, check status, or configure voice properties. These are notable gaps for a speech server, though the minimal core workflow is present.
Maintenance
Related MCP Connectors
Let cloud agents talk to you: progress updates spoken on your Mac, and replies you send back.
Monitor your Mac and let AI agents report progress or request human help.
Audio for your agent: transcribe, speak, translate, summarise, plus sound effects and music.
Turn articles and text into narrated audio, playlists and podcast feeds from your AI agent.
Related MCP Servers
AlicenseAqualityBmaintenanceConnects Speak AI transcription and insight data to Claude and ChatGPT, enabling natural language queries for summaries, action items, and quotes from recordings.100940 npmMIT- AlicenseAqualityDmaintenanceEnables AI agents to synthesize natural speech using either platform system voices or premium OpenAI TTS, with automatic engine selection and graceful fallback.113 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to speak aloud by generating and playing audio through the system output. Supports multiple TTS providers, playback queue management, and configurable voice profiles.1MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to speak completion or attention-needed notifications aloud using system text-to-speech, with optional DuoWave speaker output, and to vocalize arbitrary short text on demand.2428 npmApache 2.0