Kokoro Text to Speech MCP Server
Kokoro 텍스트 음성 변환(TTS) MCP 서버
S3에 업로드할 수 있는 옵션이 있는 .mp3 파일을 생성하는 Kokoro 텍스트 음성 변환 MCP 서버입니다.
사용처: https://huggingface.co/spaces/hexgrad/Kokoro-TTS
Related MCP server: MCP Voice Soundboard
구성
로컬 저장소에 복제합니다.
kokoro-v1.0.onnx 와 voices-v1.0.bin 에 대한 Kokoro Onnx Weights를 다운로드하여 같은 저장소에 저장합니다.
MCP 구성에 다음을 추가하세요. 원하는 값으로 업데이트하세요.
지엑스피1
ffmmeg 설치
.wav 파일을 .mp3 파일로 변환하려면 이것이 필요합니다.
맥의 경우:
brew install ffmpeg로컬에서 실행하려면 .env 파일에 다음 내용을 추가하세요. env.example을 참고하여 .env 파일에 복사한 후 원하는 값으로 수정하세요.
지원되는 환경 변수
AWS_ACCESS_KEY_ID: AWS 액세스 키 IDAWS_SECRET_ACCESS_KEY: AWS 비밀 액세스 키AWS_S3_BUCKET_NAME: S3 버킷 이름AWS_S3_REGION: S3 지역(예: us-east-1)AWS_S3_FOLDER: S3 버킷 내의 폴더 경로AWS_S3_ENDPOINT_URL: S3 호환 스토리지에 대한 선택적 사용자 지정 엔드포인트 URLMCP_HOST: 서버를 바인딩할 호스트(기본값: 0.0.0.0)MCP_PORT: 수신할 포트(기본값: 9876)MCP_CLIENT_HOST: 서버에 대한 클라이언트 연결의 호스트 이름(기본값: localhost)DEBUG: 디버그 모드 활성화("true" 또는 "1"로 설정)S3_ENABLED: S3 업로드를 활성화합니다("true" 또는 "1"로 설정)MP3_FOLDER: MP3 파일을 저장할 경로(기본값은 스크립트 디렉토리의 'mp3' 폴더)MP3_RETENTION_DAYS: MP3 파일을 자동 삭제하기 전까지 보관할 일수DELETE_LOCAL_AFTER_S3_UPLOAD: S3 업로드 성공 후 로컬 MP3 파일을 삭제할지 여부("true" 또는 "1"로 설정)TTS_VOICE: TTS 클라이언트의 기본 음성(기본값: af_heart)TTS_SPEED: TTS 클라이언트의 기본 속도(기본값: 1.0)TTS_LANGUAGE: TTS 클라이언트의 기본 언어(기본값: en-us)
로컬에서 서버 실행
선호하는 방법은 UV를 사용하는 것입니다.
uv run mcp-tts.pyTTS 클라이언트 사용
mcp_client.py 스크립트를 사용하면 서버에 TTS 요청을 보낼 수 있습니다. 다음과 같이 사용할 수 있습니다.
연결 설정
동일한 머신에서 서버와 클라이언트를 실행하는 경우:
서버는
0.0.0.0(모든 인터페이스) 또는127.0.0.1(로컬호스트만)에 바인딩해야 합니다.클라이언트는
localhost또는127.0.0.1에 연결해야 합니다.
기본 사용법
python mcp_client.py --text "Hello, world!"파일에서 텍스트 읽기
python mcp_client.py --file my_text.txt음성 및 속도 사용자 지정
python mcp_client.py --text "Hello, world!" --voice "en_female" --speed 1.2S3 업로드 비활성화
python mcp_client.py --text "Hello, world!" --no-s3명령줄 옵션
python mcp_client.py --helpMP3 파일 관리
TTS 서버는 로컬에 저장되고 선택적으로 S3에 업로드되는 MP3 파일을 생성합니다. 이러한 파일 관리 방식을 다음과 같이 설정할 수 있습니다.
로컬 스토리지
.env파일에서MP3_FOLDER설정하여 MP3 파일이 저장되는 위치를 지정합니다.파일은 자동으로 삭제되지 않는 한 이 폴더에 보관됩니다.
자동 정리
MP3_RETENTION_DAYS=30(또는 원하는 숫자)을 설정하면 해당 일수보다 오래된 파일을 자동으로 삭제합니다.S3 업로드가 성공한 직후 로컬 파일을 삭제하려면
DELETE_LOCAL_AFTER_S3_UPLOAD=true설정합니다.
S3 통합
S3_ENABLED=true또는DISABLE_S3=true사용하여 S3 업로드를 활성화/비활성화합니다..env파일에서 AWS 자격 증명 및 버킷 설정 구성클라이언트의
--no-s3옵션을 사용하여 요청별로 S3 업로드를 비활성화할 수 있습니다.
Available Tools
1 tooltext_to_speechB
Convert text to speech using the Kokoro TTS service.
Args:
text: The text to convert to speech
voice: Voice ID to use (default: af_heart)
speed: Speech speed (default: 1.0)
lang: Language code (default: en-us)
filename: Optional filename for the MP3 (default: auto-generated UUID)
upload_to_s3: Whether to upload to S3 if enabled (default: True)
Returns:
A dictionary with information about the generated audio file
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| voice | No | en_sarah | |
| speed | No | ||
| lang | No | en-us | |
| filename | No | ||
| upload_to_s3 | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the output is an MP3 file and that upload to S3 is optional, which adds some context. However, it doesn't cover important aspects like rate limits, authentication requirements, error conditions, or what the returned dictionary contains. For a tool with 6 parameters and no annotation coverage, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and appropriately sized. It starts with the core purpose, then lists parameters with clear explanations, and ends with return information. Every sentence earns its place, though the formatting with 'Args:' and 'Returns:' sections is slightly verbose but still efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, no annotations, no output schema), the description is moderately complete. It excels at parameter documentation but lacks behavioral context and usage guidelines. The absence of an output schema means the description should ideally explain the return dictionary structure, which it doesn't. It's adequate but has clear gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description provides excellent parameter semantics beyond the input schema. With 0% schema description coverage, the description fully compensates by explaining each parameter's purpose, default values, and optionality. It clarifies that 'filename' is auto-generated if not provided and that 'upload_to_s3' depends on whether S3 is enabled. This adds significant value over the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Convert text to speech using the Kokoro TTS service.' It specifies the verb ('convert') and resource ('text to speech'), and mentions the specific service. However, without sibling tools, it cannot demonstrate differentiation from alternatives, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, constraints, or typical use cases. The only contextual information is the service name (Kokoro TTS), but this doesn't help an agent decide when this tool is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- Changed
text_to_speech2 fields changed- changed
Input schema / properties / speed / defaultPrevious value: -1New value: +1.2 - changed
Input schema / properties / voice / defaultPrevious value: -"af_heart"New value: +"en_sarah"
1 tool update
- First observed
text_to_speech
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool has a clearly defined purpose of converting text to speech, which cannot be confused with any other functionality.
The single tool name 'text_to_speech' follows a clear verb_noun pattern and uses snake_case consistently. With only one tool, naming consistency is inherently perfect as there are no other tools to compare against.
A single tool is too few for a server's apparent scope of text-to-speech functionality. While the tool itself is well-defined, a complete TTS service would typically include additional tools such as listing available voices, managing audio files, or configuring settings, making this server feel thin and incomplete.
The server is severely incomplete for a text-to-speech domain. It lacks essential operations such as listing available voices, checking service status, managing generated audio files (beyond the single generation tool), or handling configuration. This creates significant gaps that will limit agent workflows and cause failures in more complex tasks.
Maintenance
Related MCP Connectors
Hosted text-to-speech MCP server: 66 voices in 9 languages, long-form narration, podcasts.
MCP server for Text-to-Speech
MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)
Hosted pay-per-use TTS: 54 neural voices, 9 languages incl. Brazilian Portuguese. $10 free credits.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides text-to-speech capabilities using the Kokoro TTS model, offering multiple voice options and customizable speech parameters.421 npm2MIT
- AlicenseNot gradedqualityAmaintenanceA text-to-speech MCP server with 48 voices across 9 languages, supporting emotion spans, SFX tags, and multi-speaker dialogue. Deployable via a single npx command with built-in guardrails and swappable backends.MIT
- AlicenseNot gradedqualityDmaintenanceAn OpenAI-compatible text-to-speech API server that enables voice cloning, long-form generation, and can be used as a Claude Code tool for speech synthesis.MIT
- AlicenseNot gradedqualityDmaintenanceHeadless text-to-speech and speech-to-text server with REST and MCP API, supporting Kokoro TTS and Whisper STT.MIT