Skip to main content

Text to Speech MCP Server

Text to Speech is an open-source Model Context Protocol (MCP) server that lets AI assistants read text aloud on the user's computer. On Windows it uses the built-in Speech API (SAPI) by default, so no API key, account, subscription, or cloud text-to-speech service is required.

The server exposes one model-controlled tool:

speak_text(text: string)

Use it for user-provided text, assistant answers, accessibility workflows, or spoken progress updates while an agent works.

Features

  • Local playback through Windows SAPI by default.
  • No cloud API and no API key for the default setup.
  • FIFO playback: concurrent requests are spoken one at a time, in order.
  • Blocking tool completion: each call returns after its audio finishes.
  • Bounded input and queue sizes to prevent unbounded resource use.
  • Temporary generated WAV files are removed after playback by default.
  • Standard MCP stdio transport through the official Python SDK.
  • Optional Piper, Transformers MMS, and local HTTP backends for advanced users.

The MCP server source is open source under the MIT License. Windows SAPI is a proprietary component included with Windows; it is not an open-source speech engine.

Requirements

  • Windows 10 or Windows 11 for the zero-configuration SAPI backend.
  • Python 3.10 or newer.
  • An MCP client that supports stdio MCP servers.
  • uv/uvx is recommended for package-based MCP installation.

Install

Configure an MCP client to run the published PyPI package:

uvx text-to-speech-mcp

For MCP clients that accept command-based server configuration, use:

command = "uvx"
args = ["text-to-speech-mcp"]
startup_timeout_sec = 30
tool_timeout_sec = 300
enabled = true

Some clients use TOML, JSON, or a graphical settings page. Use uvx text-to-speech-mcp as the server command and restart the client after changing its configuration.

Install from source

git clone https://github.com/engr-faizanali/text-to-speech-mcp.git
cd text-to-speech-mcp
python -m pip install .

Then configure the client to run text-to-speech-mcp directly.

Prompt Examples

Read arbitrary text:

Use the Text to Speech tool to read aloud: The deployment completed successfully.

Read the final answer:

Use the Text to Speech tool to read your final response aloud before displaying it.

Read visible intermediate progress updates in order:

Use the text_to_speech MCP server's speak_text tool for spoken progress updates.

For every meaningful intermediate update that you display to me:
1. Call speak_text with the exact update text you are about to display.
2. Wait for the call to finish before producing or speaking the next update.
3. Then display the same update in text.

Also call speak_text with the exact final answer before displaying it. Never
narrate hidden reasoning, chain-of-thought, secrets, credentials, raw tool
output, terminal logs, or source code unless I explicitly ask you to read that
content aloud. Do not invoke speech calls in parallel. If the tool is
unavailable, continue normally in text and report the failure once.

The text_to_speech portion is an example client-side server name. Clients may display a different namespace while keeping the tool name speak_text.

Tool Contract

Field Value
Tool name speak_text
Input text, required string, 1-50,000 characters
Result Completion message after local playback finishes
Ordering FIFO, one active playback at a time
Queue limit 32 pending requests
Network use with SAPI None

The tool is model-controlled under MCP. The user decides when to ask the model to call it, and the MCP client may show or require approval for tool calls.

Privacy

With the default SAPI backend, text is passed from the MCP client to a local Python process and then to Windows speech components. It is not sent to this project, an external API, or a cloud TTS provider. Generated WAV files are written under %TEMP%\text-to-speech-mcp and deleted after playback unless TEXT_TO_SPEECH_KEEP_AUDIO=true is set.

Do not ask an AI assistant to speak secrets, credentials, private keys, hidden reasoning, or sensitive tool output.

Optional Backends

The default requires no configuration:

TEXT_TO_SPEECH_BACKEND = "sapi"

Advanced users can set TEXT_TO_SPEECH_BACKEND to piper, transformers_mms, or http. These options require their own local model, binary, Python dependencies, or endpoint. See backend configuration.

Claude Code Skill

For Claude Code users, skills/project-tts-responder/SKILL.md defines streaming, batch, and read-aloud narration modes built on speak_text. Copy it into your project's .claude/skills/ directory to use it.

MCP Compatibility

  • MCP transport: stdio
  • MCP tool implementation: official Python MCP SDK
  • Registry metadata: server.json using the 2025-12-11 schema
  • Package registry: PyPI
  • Registry ownership marker: this README's mcp-name comment
  • Registry namespace: io.github.Engr-FaizanAli/text-to-speech

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text_to_speech_mcp-0.4.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_to_speech_mcp-0.4.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file text_to_speech_mcp-0.4.0.tar.gz.

File metadata

  • Download URL: text_to_speech_mcp-0.4.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for text_to_speech_mcp-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7df260784d3fa6c9545d6e462c766388a7bd8ed749ea22f11b363f929ec2c608
MD5 db97647b2f61dfd6e5c230d7bc6e91dc
BLAKE2b-256 3c046bbbcd875f893cf6040a8052d29a723da6037f5697f002236dc7f807018b

See more details on using hashes here.

Provenance

The following attestation bundles were made for text_to_speech_mcp-0.4.0.tar.gz:

Publisher: publish.yml on Engr-FaizanAli/text-to-speech-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file text_to_speech_mcp-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for text_to_speech_mcp-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2854381b5b5709d48fe1baa37129576c90d464847cf878020f278e96d526bb9
MD5 1df5335c3b2eb3e02242f0f4915712cb
BLAKE2b-256 25e3d6efdf328d5227d45c0ec0db9b4001d7947a0f48a7b0284dea4a0a876802

See more details on using hashes here.

Provenance

The following attestation bundles were made for text_to_speech_mcp-0.4.0-py3-none-any.whl:

Publisher: publish.yml on Engr-FaizanAli/text-to-speech-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page