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
Inputs: text (required), voice, speed, lang, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Turn text into speech, browse voices, and get MP3 audio with optional SRT or WebVTT captions.
Text to speech MCP server: send articles or AI-written text to a private podcast RSS feed.
MCP server for Text-to-Speech
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.642MIT
- AlicenseNot gradedqualityBmaintenanceA 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