mac-say-mcp
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., "@mac-say-mcp speak 'Hello, world!' in a friendly voice"
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.
Mac Say MCP - TypeScript Edition
MCP Server for text-to-speech using macOS say command, written in TypeScript and built with esbuild.
Features
šµ Text-to-Speech: Convert text to speech instantly
š Audio File Generation: Save TTS as AIFF, WAV, or MP4 files
š£ļø Voice Management: List and demo system voices
āļø System Info: Get TTS capabilities and configuration
š TypeScript: Full type safety and modern development experience
š¦ Fast Build: Lightning-fast builds with esbuild
Related MCP server: tts-mcp
Quick Start
Installation
Local Development
# Install dependencies
npm install
# Build the project
npm run build
# Start the server
npm startGlobal Installation
# Install globally from npm (when published)
npm install -g mac-say-mcp
# Or install from local directory
npm install -g .
# Use directly
mac-say-mcpNPM Package Installation
For MCP clients, you can use the npm package directly with npx:
{
"mcpServers": {
"mac-say-mcp": {
"command": "npx",
"args": ["-y", "mac-say-mcp@latest"],
"env": {
"TTS_DEFAULT_VOICE": "Alex",
"TTS_DEFAULT_RATE": "200"
}
}
}
}This approach:
ā Always uses the latest published version
ā No need for local builds or global installation
ā Automatic package installation with
-yflagā Perfect for CI/CD and shared configurations
Development
# Type checking
npm run typecheck
# Build in watch mode
npm run build:watch
# Development mode (watch + restart)
npm run devAvailable Scripts
npm run build- Build the TypeScript code with esbuildnpm run build:watch- Build in watch mode for developmentnpm run start- Build and start the MCP servernpm run dev- Development mode with auto-rebuildnpm run clean- Clean build artifactsnpm run typecheck- Run TypeScript type checkingnpm run prod- Production build with minification
MCP Tools
1. tts_speak
Convert text to speech and play immediately:
{
"name": "tts_speak",
"arguments": {
"text": "Hello, world!",
"voice": "Alex",
"rate": 200
}
}2. tts_save_audio
Save text-to-speech as audio file:
{
"name": "tts_save_audio",
"arguments": {
"text": "Hello, world!",
"filename": "greeting",
"voice": "Samantha",
"rate": 180,
"format": "wav"
}
}3. tts_list_voices
List available system voices:
{
"name": "tts_list_voices",
"arguments": {
"language": "en"
}
}4. tts_voice_demo
Play a demo with specific voice:
{
"name": "tts_voice_demo",
"arguments": {
"voice": "Victoria",
"text": "This is a voice demonstration"
}
}5. tts_system_info
Get system TTS information:
{
"name": "tts_system_info",
"arguments": {}
}Configuration
Set default voice and rate via environment variables:
TTS_DEFAULT_VOICE=Samantha TTS_DEFAULT_RATE=180 npm startOr via command line:
node dist/index.js --defaultRate 250MCP Client Setup
Note: Replace
/path/to/mac-say-mcpwith the actual path to your project directory. Usepwdin the project directory to get the full path.
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mac-say-mcp": {
"command": "node",
"args": ["/path/to/mac-say-mcp/dist/index.js"],
"env": {
"TTS_DEFAULT_VOICE": "Alex",
"TTS_DEFAULT_RATE": "200"
}
}
}
}VS Code MCP Extension
{
"mcp.servers": [
{
"name": "mac-say-mcp",
"command": "npx",
"args": ["-y", "mac-say-mcp@latest"]
}
]
}Cursor IDE
Add to your Cursor settings or create a .cursormcp configuration file:
{
"mcpServers": {
"mac-say-mcp": {
"command": "npx",
"args": ["-y", "mac-say-mcp@latest"],
"env": {
"TTS_DEFAULT_VOICE": "Alex",
"TTS_DEFAULT_RATE": "200"
}
}
}
}Alternatively, use the built-in MCP server configuration in Cursor:
Open Cursor Settings
Go to "MCP Servers"
Add a new server:
Name:
mac-say-mcpCommand:
npxArgs:
-y mac-say-mcp@latest
Zencoder
For Zencoder AI assistant integration, add to your MCP configuration:
{
"servers": {
"mac-say-mcp": {
"command": "npx",
"args": ["-y", "mac-say-mcp@latest"],
"description": "Text-to-speech server using macOS say command",
"env": {
"TTS_DEFAULT_VOICE": "Alex",
"TTS_DEFAULT_RATE": "200"
}
}
}
}Development Architecture
Project Structure
mac-say-mcp/
āāā src/
ā āāā index.ts # TypeScript source code
āāā dist/
ā āāā index.js # Compiled JavaScript (generated)
āāā audio/ # Generated audio files
āāā tsconfig.json # TypeScript configuration
āāā build.js # esbuild configuration
āāā package.json # Dependencies and scriptsType Safety
Full TypeScript support with:
Interface definitions for all MCP tools
Type guards for runtime parameter validation
Strict type checking enabled
Modern ES2022 target
Build Process
esbuild for fast compilation and bundling
External dependencies preserved (MCP SDK)
ES Modules output for Node.js compatibility
Source maps in development mode
Minification in production mode
Audio Formats
Format | Extension | Quality | Size |
AIFF |
| High | Large |
WAV |
| High | Large |
MP4 |
| Good | Small |
Voice Parameters
Rate: 50-500 words per minute
Voices: System-dependent (174 on typical macOS)
Languages: Multiple languages supported
Error Handling
Parameter validation with descriptive errors
Type-safe error responses
Graceful handling of missing voices
File system error recovery
Requirements
macOS: Required for
saycommandNode.js: 18.0.0 or higher
TypeScript: 5.3.0 or higher
esbuild: 0.19.0 or higher
Release Management
This project uses automated releases with release-it and conventional changelog generation.
Creating Releases
# Patch release (1.0.0 ā 1.0.1) - for bug fixes
npm run release:patch
# Minor release (1.0.0 ā 1.1.0) - for new features
npm run release:minor
# Major release (1.0.0 ā 2.0.0) - for breaking changes
npm run release:major
# Test release without publishing
npm run release:dry
# Local testing (no publish/push)
npm run release:local:dryChangelog Generation
The project automatically generates:
CHANGELOG.md from conventional commit messages
GitHub Release Notes from the latest changelog entries
# Generate changelog for latest version only
npm run changelog
# Update entire CHANGELOG.md file
npm run changelog:allCommit Message Format
Use conventional commits for automatic changelog generation:
# Features
git commit -m "feat: add new voice filtering option"
# Bug fixes
git commit -m "fix: resolve audio file generation error"
# Documentation
git commit -m "docs: update installation instructions"
# Breaking changes
git commit -m "feat!: change TTS API interface"Release Process
Make changes with conventional commit messages
Run tests and type checking:
npm run typecheckCreate release:
npm run release:patch(or minor/major)Automatic steps:
Version bump in package.json
CHANGELOG.md update
Git commit and tag
GitHub release with changelog
npm package publication
Contributing
Make changes in
src/index.tsUse conventional commit messages
Run
npm run typecheckto verify typesTest with
npm run build && npm startUpdate documentation as needed
License
MIT License - see LICENSE file for details.
Troubleshooting
Build Issues
# Clear build cache
npm run clean
npm run buildType Errors
# Check TypeScript errors
npm run typecheckRuntime Issues
# Test say command directly
say -v Alex "Hello world"
say -v "?" # List voicesAudio File Issues
# Check audio directory permissions
ls -la audio/This TypeScript version provides better development experience with type safety, modern tooling, and fast builds while maintaining full compatibility with the original MCP server functionality.
Available Tools
5 toolstts_list_voicesA
List all available voices on the system
Inputs: language.
tts_save_audioC
Convert text to speech and save as audio file
Inputs: text (required), filename (required), rate, voice, +1 more.
tts_speakA
Convert text to speech and play it immediately
Inputs: text (required), rate, voice.
tts_system_infoC
Get information about text-to-speech capabilities
Inputs: no named parameters.
tts_voice_demoA
Play a demo phrase with a specific voice
Inputs: voice (required), text.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 5 tools
Each tool has a distinct purpose: speaking text, saving to audio, listing voices, demoing a voice, and system info. The only potential overlap between tts_speak and tts_voice_demo is resolved by voice_demo's specific focus on testing a voice with a fixed phrase.
All tools share the tts_ prefix and use snake_case, but the pattern is mixed: tts_speak, tts_save_audio, and tts_list_voices are verb-first, while tts_voice_demo and tts_system_info are noun-first compounds. This prevents a perfect score despite overall readability.
Five tools is well-scoped for a focused text-to-speech server, covering core operations without unnecessary bloat or missing essentials.
The set covers the full TTS workflow: listing voices, speaking text, saving audio, demoing voices, and checking system capabilities. No obvious gaps exist for the stated domain.
Maintenance
Related MCP Connectors
MCP server for Text-to-Speech
MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)
Hosted text-to-speech MCP server: 66 voices in 9 languages, long-form narration, podcasts.
MCP server for Speech-to-Text
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that leverages the Microsoft Edge TTS service to provide high-quality text-to-speech capabilities across over 80 languages. It enables users to generate audio files, query available voices, and create subtitle files using natural language commands.-
- AlicenseNot gradedqualityDmaintenanceProfile-driven MCP server for Google Cloud Text-to-Speech that exposes tools to synthesize text to speech, run diagnostics, and stop playback, with voice and settings locked per profile.27 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that converts text into lifelike speech using Microsoft Edge's Text-to-Speech service, supporting customizable voice, rate, volume, and pitch.4MIT
- FlicenseNot gradedqualityDmaintenanceText-to-speech MCP server using Microsoft Edge TTS, supporting multiple voices and async processing.-