Skip to content

Kokoro MCP Server

TTS toolkit built on Kokoro-82M with librosa audio enhancement, MCP server for Claude/Cursor, CLI & Python API. Free & open-source for YouTube creators.

Install

$brew install espeak ffmpeg

Install command taken from the project's README or registry entry. Always review code before running it.

Kokoro MCP SERVER: Text To Speech (TTS)

A comprehensive Text-to-Speech toolkit built on Kokoro-82M with audio enhancement, Model Context Protocol (MCP) server integration, CLI interface, and Docker deployment.


📺 Demo Video


Features

  • Kokoro-82M TTS Engine: Open-weight model with 82M parameters (510 tokens per pass)
  • 🌐 Streamlit Web UI: Enterprise-grade management interface with real-time preview (OPTIONAL)
  • Audio Enhancement: Professional processing with librosa (normalization, noise reduction, fade in/out)
  • MCP Server: Model Context Protocol integration for Claude Desktop, Cursor, and other AI tools (OPTIONAL)
  • CLI Interface: Command-line tools for quick generation (OPTIONAL)
  • Batch Processing: Generate multiple audio files efficiently
  • Script Processing: Convert complete video scripts with automatic text chunking
  • Docker Support: Containerization with docker-compose
  • Enterprise Features: Structured logging, configuration management, comprehensive testing
  • CI/CD: GitHub Actions pipeline with automated testing

Streamlit Web Interface (Optional)

Beautiful web UI for managing all TTS functionality:

  • 🎯 Single Generation - Convert text with real-time preview
  • 📦 Batch Processing - Process multiple texts in one go
  • 📄 Script Processing - Complete video script conversion
  • 🔍 Voice Explorer - Compare all 12 voices side-by-side
  • ⚙️ Configuration - Manage settings visually
  • 📊 Analytics - Track generations with charts and statistics

Install with: pip install -e ".[streamlit]" or pip install -e ".[complete]"

Quick Start:

python run_streamlit.py
# Opens at http://localhost:8501

📚 See STREAMLIT_README.md for complete Streamlit documentation.


Building on Kokoro-82M

What Kokoro-82M Provides Out-of-the-Box: Kokoro-82M is an exceptional open-weight TTS model that delivers: core neural TTS inference with 82M parameters, a basic Python inference library (KPipeline), 10 professional voice packs (male/female, American/British), phonemization (G2P) system, and raw 24kHz audio output with a 510-token processing limit per pass.

What aparsoft-tts Adds: We integrate Kokoro-82M's excellent TTS inference with comprehensive development tooling and workflow enhancements. This toolkit adds:

  1. Audio post-processing - Normalization, noise reduction, silence trimming, and fade in/out using librosa
  2. Automated script workflows - Direct script-to-voiceover conversion with paragraph detection and gap management
  3. IDE-native generation - MCP server integration eliminates context switching for Claude Desktop and Cursor users
  4. Deployment infrastructure - Docker deployment, structured logging, configuration management, and comprehensive testing
  5. Batch processing - CLI and Python APIs for processing multiple segments efficiently

Technical Implementation

Audio Enhancement (librosa Integration):

This toolkit adds an audio processing pipeline on Kokoro generated TTS output:

# Without enhancement - raw Kokoro output
audio = kokoro_pipeline(text)

# With enhancement
audio = enhance_audio(
    kokoro_output,
    normalize=True,        # Consistent volume
    trim_silence=True,     # Remove dead air
    noise_reduction=True,  # Spectral gating
    add_fade=True         # Smooth transitions
)

Similar plugs

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Never stop coding. Free MIT AI gateway: one endpoint, 359 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex,…

LocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.

Explore related