Kokoro Text to Speech MCP server that generates .mp3 files with option to upload to S3. Uses: https://huggingface.co/spaces/hexgrad/Kokoro-TTS Clone to a local repo. Download the Kokoro Onnx Weights for kokoro-v1.0.onnx and voices-v1.0.bin and store in the same repo. Add the following to your MCP configs. Update with your own values. This is needed to convert .wav to .mp3 files To run locally add
Add this skill
npx mdskills install mberg/kokoro-tts-mcpWell-documented TTS server with comprehensive setup, S3 integration, and clear configuration examples
1<a href="https://glama.ai/mcp/servers/@mberg/kokoro-tts-mcp">2 <img width="380" height="200" src="https://glama.ai/mcp/servers/@mberg/kokoro-tts-mcp/badge" alt="Kokoro Text to Speech Server MCP server" />3</a>45## Kokoro Text to Speech (TTS) MCP Server67Kokoro Text to Speech MCP server that generates .mp3 files with option to upload to S3.89Uses: https://huggingface.co/spaces/hexgrad/Kokoro-TTS1011## Configuration1213* Clone to a local repo.14* Download the [Kokoro Onnx Weights](https://github.com/thewh1teagle/kokoro-onnx) for [kokoro-v1.0.onnx](https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/kokoro-v1.0.onnx) and [voices-v1.0.bin](https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/voices-v1.0.bin) and store in the same repo.1516Add the following to your MCP configs. Update with your own values.1718```19 "kokoro-tts-mcp": {20 "command": "uv",21 "args": [22 "--directory",23 "/path/toyourlocal/kokoro-tts-mcp",24 "run",25 "mcp-tts.py"26 ],27 "env": {28 "TTS_VOICE": "af_heart",29 "TTS_SPEED": "1.0",30 "TTS_LANGUAGE": "en-us",31 "AWS_ACCESS_KEY_ID": "",32 "AWS_SECRET_ACCESS_KEY": "",33 "AWS_REGION": "us-east-1",34 "AWS_S3_FOLDER": "mp3",35 "S3_ENABLED": "true",36 "MP3_FOLDER": "/path/to/mp3"37 }38 }39```4041### Install ffmmeg4243This is needed to convert .wav to .mp3 files4445For mac:4647```48brew install ffmpeg49```5051To run locally add these to your .env file. See env.example and copy to .env and modify with your own values.5253### Supported Environment Variables5455- `AWS_ACCESS_KEY_ID`: Your AWS access key ID56- `AWS_SECRET_ACCESS_KEY`: Your AWS secret access key57- `AWS_S3_BUCKET_NAME`: S3 bucket name58- `AWS_S3_REGION`: S3 region (e.g., us-east-1)59- `AWS_S3_FOLDER`: Folder path within the S3 bucket60- `AWS_S3_ENDPOINT_URL`: Optional custom endpoint URL for S3-compatible storage61- `MCP_HOST`: Host to bind the server to (default: 0.0.0.0)62- `MCP_PORT`: Port to listen on (default: 9876)63- `MCP_CLIENT_HOST`: Hostname for client connections to the server (default: localhost)64- `DEBUG`: Enable debug mode (set to "true" or "1")65- `S3_ENABLED`: Enable S3 uploads (set to "true" or "1")66- `MP3_FOLDER`: Path to store MP3 files (default is 'mp3' folder in script directory)67- `MP3_RETENTION_DAYS`: Number of days to keep MP3 files before automatic deletion68- `DELETE_LOCAL_AFTER_S3_UPLOAD`: Whether to delete local MP3 files after successful S3 upload (set to "true" or "1")69- `TTS_VOICE`: Default voice for the TTS client (default: af_heart)70- `TTS_SPEED`: Default speed for the TTS client (default: 1.0)71- `TTS_LANGUAGE`: Default language for the TTS client (default: en-us)7273## Running the Server Locally7475Preferred method use UV76```77uv run mcp-tts.py78```798081## Using the TTS Client8283The `mcp_client.py` script allows you to send TTS requests to the server. It can be used as follows:8485### Connection Settings8687When running the server and client on the same machine:88- Server should bind to `0.0.0.0` (all interfaces) or `127.0.0.1` (localhost only)89- Client should connect to `localhost` or `127.0.0.1`909192### Basic Usage9394```bash95python mcp_client.py --text "Hello, world!"96```9798### Reading Text from a File99100```bash101python mcp_client.py --file my_text.txt102```103104### Customizing Voice and Speed105106```bash107python mcp_client.py --text "Hello, world!" --voice "en_female" --speed 1.2108```109110### Disabling S3 Upload111112```bash113python mcp_client.py --text "Hello, world!" --no-s3114```115116### Command-line Options117118```bash119python mcp_client.py --help120```121122## MP3 File Management123124The TTS server generates MP3 files that are stored locally and optionally uploaded to S3. You can configure how these files are managed:125126### Local Storage127128- Set `MP3_FOLDER` in your `.env` file to specify where MP3 files are stored129- Files are kept in this folder unless automatically deleted130131### Automatic Cleanup132133- Set `MP3_RETENTION_DAYS=30` (or any number) to automatically delete files older than that number of days134- Set `DELETE_LOCAL_AFTER_S3_UPLOAD=true` to delete local files immediately after successful S3 upload135136### S3 Integration137138- Enable/disable S3 uploads with `S3_ENABLED=true` or `DISABLE_S3=true`139- Configure AWS credentials and bucket settings in the `.env` file140- S3 uploads can be disabled per-request using the client's `--no-s3` option141
Full transparency — inspect the skill content before installing.