# Text to Speech

> Open-source local Windows text-to-speech through SAPI; no API key or cloud service required.

- **Type:** MCP server
- **Install:** `agentstack add mcp-engr-faizanali-text-to-speech-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Engr-FaizanAli](https://agentstack.voostack.com/s/engr-faizanali)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.2.1
- **License:** MIT
- **Upstream author:** [Engr-FaizanAli](https://github.com/Engr-FaizanAli)
- **Source:** https://github.com/Engr-FaizanAli/text-to-speech-mcp
- **Website:** https://pypi.org/project/text-to-speech-mcp/

## Install

```sh
agentstack add mcp-engr-faizanali-text-to-speech-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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:

```text
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:

```text
uvx text-to-speech-mcp
```

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

```toml
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

```powershell
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:

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

Read the final answer:

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

Read visible intermediate progress updates in order:

```text
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-10,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:

```toml
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](https://github.com/engr-faizanali/text-to-speech-mcp/blob/main/CONFIGURATION.md).

## 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](LICENSE).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Engr-FaizanAli](https://github.com/Engr-FaizanAli)
- **Source:** [Engr-FaizanAli/text-to-speech-mcp](https://github.com/Engr-FaizanAli/text-to-speech-mcp)
- **License:** MIT
- **Homepage:** https://pypi.org/project/text-to-speech-mcp/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.2.1 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.2.1** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-engr-faizanali-text-to-speech-mcp
- Seller: https://agentstack.voostack.com/s/engr-faizanali
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
