Sponsored by Deepsite.site

TextToSpeech-MCP Server

Created By
SmartLittleApps7 months ago
Local text-to-speech MCP server with dual engines (macOS Say + Kokoro TTS) for Claude Desktop
Content

TextToSpeech-MCP Server

A local text-to-speech MCP server providing high-quality, privacy-first TTS synthesis using macOS Say and Kokoro TTS engines.

Features

  • Local Processing: All TTS synthesis happens locally - no data sent to external services
  • Multiple Engines:
    • macOS Say (fast, built-in, 23 voices, multiple languages)
    • Kokoro TTS (high-quality neural synthesis, 21 voices, 8 languages)
  • MCP Integration: Works with Claude Desktop and other MCP-compatible clients
  • Multi-language Support: 43 languages including English, Spanish, French, Japanese, Chinese, and more

Quick Start

1. Install Dependencies

npm install

2. Build the Project

npm run build

3. Test the Server

npm start

4. Configure Claude Desktop

Add this configuration to your Claude Desktop settings:

{
  "mcpServers": {
    "local-tts": {
      "command": "node",
      "args": ["./dist/server.js"],
      "cwd": "/path/to/your/TextToSpeech-MCP"
    }
  }
}

Available Tools

synthesize_text

Convert text to speech with customizable options.

Parameters:

  • text (required): Text to convert (max 50,000 characters)
  • voice (optional): Voice name (e.g., "Alex", "Samantha", "Daniel")
  • engine (optional): "macos", "kokoro", or "auto" (default: "auto")
  • outputFormat (optional): "aiff", "wav", "mp3", "m4a" (default: "aiff")
  • speed (optional): Speed multiplier 0.1-3.0 (default: 1.0)
  • quality (optional): "fast", "balanced", "high" (default: "balanced")

list_voices

List available voices with filtering options.

Parameters:

  • engine (optional): "macos", "kokoro", "all" (default: "all")
  • language (optional): Language filter (e.g., "en-us", "es", "fr")
  • gender (optional): "male", "female", "neutral"

health_check

Check engine availability and system health.

play_audio

Play generated audio files with control options.

Parameters:

  • audioPath (optional): Path to audio file (defaults to most recent)
  • action (optional): "play", "pause", "stop", "resume" (default: "play")

Example Usage

Basic Synthesis

Use the synthesize_text tool to say "Hello, world!" using the default voice.

Voice Selection

List all English female voices, then use one to synthesize a greeting.

Multi-language

Synthesize "Bonjour le monde" using a French voice.

Development

Available Scripts

  • npm run build - Build TypeScript
  • npm run dev - Build with watch mode
  • npm start - Start the server
  • npm test - Run tests (coming soon)
  • npm run lint - Run ESLint
  • npm run format - Format code with Prettier

Environment Variables

  • TTS_OUTPUT_DIR - Audio output directory (default: ./output)
  • TTS_TEMP_DIR - Temporary files directory (default: ./temp)
  • TTS_ENGINE - Default engine: "macos", "kokoro", "auto" (default: "auto")
  • TTS_QUALITY - Default quality: "fast", "balanced", "high" (default: "balanced")

Status

Phase 1 Complete: macOS Say engine with 23 voices ✅ Phase 2 Complete: Kokoro TTS integration with 21 voices 📋 Phase 3 Planned: Batch audio playback and advanced features

Testing with MCP Inspector

npx @modelcontextprotocol/inspector node dist/server.js

Then open http://localhost:5173 to test the server interactively.

Requirements

  • macOS (for macOS Say engine)
  • Node.js 18+
  • TypeScript

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Serper MCP ServerA Serper MCP Server
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
Tavily Mcp
Playwright McpPlaywright MCP server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"