Kokoro Text to Speech
Kokoro Text to Speech (TTS) MCP Server allows you to generate MP3 files from text input. It leverages the Kokoro TTS model from Hugging Face to produce high-quality audio output.
This server offers flexibility in voice selection, speech speed adjustment, and language options. Additionally, it provides seamless integration with Amazon S3 for cloud storage of generated audio files.
Features List
- 🎙️ Text-to-speech conversion using Kokoro TTS model
- 🔊 Multiple voice options available
- 🚀 Adjustable speech speed
- 🌐 Support for multiple languages
- 💾 Local MP3 file storage
- ☁️ Optional Amazon S3 integration for cloud storage
- 🧹 Automatic file cleanup and retention management
Use Cases
- Audiobook Creation: Convert written content into audio format for accessibility and convenience.
- Podcast Production: Generate voiceovers or intros for podcasts quickly and efficiently.
- Language Learning: Create pronunciation guides and listening exercises for language learners.
- Accessibility Solutions: Provide audio versions of written content for visually impaired users.
How to Use It
- Clone the repository:
git clone https://github.com/mberg/kokoro-tts-mcp.git- Download the required model files:
- Obtain
kokoro-v1.0.onnxandvoices-v1.0.bin - Place them in the cloned repository directory
- Install FFmpeg:
For macOS:
brew install ffmpeg- Set up environment variables:
- Copy
env.exampleto.env - Modify
.envwith your specific values
- Install dependencies:
pip install -r requirements.txt- Run the server:
uv run mcp-tts.py- Use the client to generate TTS:
python mcp_client.py --text "Hello, world!"Options and Parameters:
--text: Input text for TTS conversion--file: Input text file for TTS conversion--voice: Specify TTS voice (default: af_heart)--speed: Set speech speed (default: 1.0)--no-s3: Disable S3 upload for this request
FAQs
Q: How do I change the default voice or language?
A: Set the TTS_VOICE and TTS_LANGUAGE environment variables in your .env file or pass them as arguments when running the client.
Q: Can I use this server with a different cloud storage provider?
A: The server is designed for S3 compatibility. You can use S3-compatible storage by setting the AWS_S3_ENDPOINT_URL environment variable.
Q: How can I manage disk space used by generated MP3 files?
A: Set MP3_RETENTION_DAYS to automatically delete old files and DELETE_LOCAL_AFTER_S3_UPLOAD to remove local files after S3 upload.
Q: Is it possible to run this server in a Docker container?
A: While not provided out-of-the-box, you can create a Dockerfile based on the installation steps and run the server in a container.
Latest MCP Servers
CVE
WebMCP
webmcp is an MCP server that connects MCP clients to web search, page fetching, and local LLM-based extraction. It’s ideal…
Google Meta Ads GA4
Featured MCP Servers
Notion
Claude Peers
Excalidraw
FAQs
Q: What exactly is the Model Context Protocol (MCP)?
A: MCP is an open standard, like a common language, that lets AI applications (clients) and external data sources or tools (servers) talk to each other. It helps AI models get the context (data, instructions, tools) they need from outside systems to give more accurate and relevant responses. Think of it as a universal adapter for AI connections.
Q: How is MCP different from OpenAI's function calling or plugins?
A: While OpenAI's tools allow models to use specific external functions, MCP is a broader, open standard. It covers not just tool use, but also providing structured data (Resources) and instruction templates (Prompts) as context. Being an open standard means it's not tied to one company's models or platform. OpenAI has even started adopting MCP in its Agents SDK.
Q: Can I use MCP with frameworks like LangChain?
A: Yes, MCP is designed to complement frameworks like LangChain or LlamaIndex. Instead of relying solely on custom connectors within these frameworks, you can use MCP as a standardized bridge to connect to various tools and data sources. There's potential for interoperability, like converting MCP tools into LangChain tools.
Q: Why was MCP created? What problem does it solve?
A: It was created because large language models often lack real-time information and connecting them to external data/tools required custom, complex integrations for each pair. MCP solves this by providing a standard way to connect, reducing development time, complexity, and cost, and enabling better interoperability between different AI models and tools.
Q: Is MCP secure? What are the main risks?
A: Security is a major consideration. While MCP includes principles like user consent and control, risks exist. These include potential server compromises leading to token theft, indirect prompt injection attacks, excessive permissions, context data leakage, session hijacking, and vulnerabilities in server implementations. Implementing robust security measures like OAuth 2.1, TLS, strict permissions, and monitoring is crucial.
Q: Who is behind MCP?
A: MCP was initially developed and open-sourced by Anthropic. However, it's an open standard with active contributions from the community, including companies like Microsoft and VMware Tanzu who maintain official SDKs.



