
Mcp Kokoro Tts
io.github.mrfqcentic由 GitHub 账号 mrfqcentic 发布v0.1.4更新于 Oct 24, 2026
Local Kokoro-82M TTS MCP server that synthesizes and plays speech on your machine
概览
本地文本转语音 MCP 服务器,让助手用 Kokoro-82M 模型合成语音并在你的机器上播放。
- 可以做什么
- 通过 speak 工具把文本(最多 500 字符)合成为语音,可指定音色和语速,写出 WAV 文件并在本地播放。列出可用的 Kokoro 音色及当前默认音色。可通过音色 id 或本地音色文件路径设置默认音色,也可选择只合成不播放。
- 适用场景
- 适合希望助手在会话中朗读文本的场景,例如语音播报结果或语音确认操作,需在具备可用音频播放的桌面机器上使用。
- 运行要求
- 通过 uvx 在本地运行,需要 Python 3.12 和 uv。首次启动会下载 Kokoro-82M 权重(约 312 MB)和 spaCy 英文模型到本地环境。播放依赖 macOS 的 afplay、Linux 的 ffplay、paplay 或 aplay、Windows 的 PowerShell MediaPlayer;espeak-ng 为可选。可选环境变量包括 TTS_VOICE、TTS_MODEL_DIR、TTS_HF_CACHE_DIR、TTS_OUTPUT_DIR、TTS_PLAY 和 HF_TOKEN。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Kokoro Tts,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-kokoro-tts
Local Kokoro-82M text-to-speech MCP server. When your agent calls speak, it synthesizes speech and plays it on your machine so you can hear the harness talk.
Works with any MCP client: Claude Desktop, Claude Code, Cursor, VS Code, opencode, Cline, and more. One short config block, no API keys — synthesis runs locally with Kokoro-82M.
On first start, the server provisions two things that are not on PyPI: the Kokoro-82M weights (~312 MB) into a local cache, and spaCy's English model (en_core_web_sm) into the same Python environment the server is running in. That second install is required because Kokoro's G2P pipeline loads spaCy, and a uvx / uv tool environment will not have the model unless this package puts it there.
Install
Add to your client's MCP config:
Requires Python 3.12 and uv. The first server start provisions Kokoro weights and the spaCy English model automatically.
To pre-download both without starting the MCP server:
Make the agent call it
Add one line to your AGENTS.md / CLAUDE.md / system prompt:
Tools
speak
Synthesizes speech, writes a WAV file, and plays it locally.
list_voices
Lists available Kokoro voices and the currently selected default.
Choosing your voice
Resolution order:
TTS_VOICEenv var — voice id or absolute.ptpath- A file in the package
voices/folder whose name starts withdefault - First
.ptfile invoices/(alphabetical) - The model's bundled
af_heartvoice
Environment variables
Platforms
espeak-ng is optional. English works without it; install it for better out-of-vocabulary coverage and some non-English languages.
Publishing
Tagging a version runs GitHub Actions publish.yml, which uploads to PyPI then the MCP Registry.
Publishing to PyPI uses the repo secret PYPI_TOKEN (a PyPI API token). GitHub trusted publishing can also be configured on the PyPI project; this workflow authenticates with the token so a first release does not depend on pending-publisher matching.
Release
- Bump
versioninpyproject.toml(andserver.jsonif you are not tagging yet) - Commit and tag:
git tag v0.1.2 && git push origin v0.1.2 - GitHub Actions runs
publish.yml:release— typecheck, test, build wheel/sdistpypi-publish— upload to PyPI withPYPI_TOKENmcp-registry— OIDC → MCP Registry (after PyPI succeeds)
Development
License
Apache-2.0. See LICENSE and NOTICE. Kokoro-82M model weights are downloaded separately under their Apache-2.0 license.
来源:README.md,提交 17ca391
工具
0版本历史
1- v0.1.4最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。