Overview
What is Kokoro MCP Server?
Kokoro MCP Server is a Model Context Protocol server that integrates the Kokoro text-to-speech engine, allowing developers to build applications with TTS capabilities via MCP. It is designed for developers who need to incorporate speech synthesis into AI assistants or other services.
How to use Kokoro MCP Server?
Clone the repository, install dependencies with uv and pip, and run the server with python src/main.py. For development without the Kokoro engine, set MOCK_TTS=true. Docker is also supported: use make up to start the container.
Key features of Kokoro MCP Server
- Integrates the Kokoro speech synthesis engine
- Mock mode for development without the TTS engine
- Configurable via environment variables (API keys, log level, port)
- Docker support with multi-architecture builds
- Development mode with debug logging and request logging
- Automated test suite for quality assurance
Use cases of Kokoro MCP Server
- Building text-to-speech features into MCP-based applications
- Developing TTS functionality in a sandboxed environment (mock mode)
- Deploying a TTS service in Docker for production
- Integrating speech synthesis into AI assistants using OpenAI or Claude APIs
FAQ from Kokoro MCP Server
What are the prerequisites for Kokoro MCP Server?
Python 3.10 or higher, uv package manager, Git, and Docker with Docker Compose. The Kokoro TTS engine is required for real mode but not for mock mode.
How do I run Kokoro MCP Server without the Kokoro engine?
Set the environment variable MOCK_TTS=true before running the server. For example: MOCK_TTS=true python src/main.py.
How can I configure API keys and other settings?
Use the environment variables OPENAI_API_KEY, CLAUDE_API_KEY, LOG_LEVEL, MOCK_TTS, and PORT (default 8080) to customize the server’s behavior.
How do I enable debugging in Kokoro MCP Server?
Run with --log-level debug and optionally --log-requests to log MCP requests and responses. You can also use Python’s pdb by adding import pdb; pdb.set_trace() in the code.
What should I do if I encounter MeCab or fugashi errors on Windows?
Follow the Windows-specific steps in the guide: run python mecab_windows_setup.py to set MeCab paths, or reinstall fugashi and unidic-lite after uninstalling them.