OpenAI TTS logo

OpenAI TTS

Community
nakamurau1

A Model Context Protocol (MCP) server and command-line tool for high-quality text-to-speech generation using the OpenAI TTS API.

Publishernakamurau1
Repositorytts-mcp
LanguageTypeScript
Forks
2
Stars
1
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    OpenAI TTS exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    1 stars and 2 forks from the linked repository.

tts-mcp

A Model Context Protocol (MCP) server and command-line tool for high-quality text-to-speech generation using the OpenAI TTS API.

Main Features

  • MCP Server: Integrate text-to-speech capabilities with Claude Desktop and other MCP-compatible clients
  • Voice Options: Support for multiple voice characters (alloy, nova, echo, etc.)
  • High-Quality Audio: Support for various output formats (MP3, WAV, OPUS, AAC)
  • Customizable: Configure speech speed, voice character, and additional instructions
  • CLI Tool: Also available as a command-line utility for direct text-to-speech conversion

Installation

Method 1: Install from Repository

bash
# Clone the repository
git clone https://github.com/nakamurau1/tts-mcp.git
cd tts-mcp

# Install dependencies
npm install

# Optional: Install globally
npm install -g .

Method 2: Run Directly with npx (No Installation Required)

bash
# Start the MCP server directly
npx tts-mcp tts-mcp-server --voice nova --model tts-1-hd

# Use the CLI tool directly
npx tts-mcp -t "Hello, world" -o hello.mp3

MCP Server Usage

The MCP server allows you to integrate text-to-speech functionality with Model Context Protocol (MCP) compatible clients like Claude Desktop.

Starting the MCP Server

bash
# Start with default settings
npm run server

# Start with custom settings
npm run server -- --voice nova --model tts-1-hd

# Or directly with API key
node bin/tts-mcp-server.js --voice echo --api-key your-openai-api-key

MCP Server Options

Options:
  -V, --version       Display version information
  -m, --model <model> TTS model to use (default: "gpt-4o-mini-tts")
  -v, --voice <voice> Voice character (default: "alloy")
  -f, --format <format> Audio format (default: "mp3")
  --api-key <key>     OpenAI API key (can also be set via environment variable)
  -h, --help          Display help information

Integrating with MCP Clients

The MCP server can be used with Claude Desktop and other MCP-compatible clients. For Claude Desktop integration:

  1. Open the Claude Desktop configuration file (typically at ~/Library/Application Support/Claude/claude_desktop_config.json)
  2. Add the following configuration, including your OpenAI API key:
json
{
  "mcpServers": {
    "tts-mcp": {
      "command": "node",
      "args": ["full/path/to/bin/tts-mcp-server.js", "--voice", "nova", "--api-key", "your-openai-api-key"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key"
      }
    }
  }
}

Alternatively, you can use npx for easier setup:

json
{
  "mcpServers": {
    "tts-mcp": {
      "command": "npx",
      "args": ["-p", "tts-mcp", "tts-mcp-server", "--voice", "nova", "--model", "gpt-4o-mini-tts"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key"
      }
    }
  }
}

You can provide the API key in two ways:

  1. Direct method (recommended for testing): Include it in the args array using the --api-key parameter
  2. Environment variable method (more secure): Set it in the env object as shown above

Security Note: Make sure to secure your configuration file when including API keys.

  1. Restart Claude Desktop
  2. When you ask Claude to "read this text aloud" or similar requests, the text will be converted to speech

Available MCP Tools

  • text-to-speech: Tool for converting text to speech and playing it

CLI Tool Usage

You can also use tts-mcp as a standalone command-line tool:

bash
# Convert text directly
tts-mcp -t "Hello, world" -o hello.mp3

# Convert from a text file
tts-mcp -f speech.txt -o speech.mp3

# Specify custom voice
tts-mcp -t "Welcome to the future" -o welcome.mp3 -v nova

CLI Tool Options

Options:
  -V, --version           Display version information
  -t, --text <text>       Text to convert
  -f, --file <path>       Path to input text file
  -o, --output <path>     Path to output audio file (required)
  -m, --model <n>         Model to use (default: "gpt-4o-mini-tts")
  -v, --voice <n>         Voice character (default: "alloy")
  -s, --speed <number>    Speech speed (0.25-4.0) (default: 1)
  --format <format>       Output format (default: "mp3")
  -i, --instructions <text> Additional instructions for speech generation
  --api-key <key>         OpenAI API key (can also be set via environment variable)
  -h, --help              Display help information

Supported Voices

The following voice characters are supported:

  • alloy (default)
  • ash
  • coral
  • echo
  • fable
  • onyx
  • nova
  • sage
  • shimmer

Supported Models

  • tts-1
  • tts-1-hd
  • gpt-4o-mini-tts (default)

Output Formats

The following output formats are supported:

  • mp3 (default)
  • opus
  • aac
  • flac
  • wav
  • pcm

Environment Variables

You can also configure the tool using system environment variables:

OPENAI_API_KEY=your-api-key-here

License

MIT

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "tts-mcp": {
      "command": "npx",
      "args": [
        "-p",
        "tts-mcp",
        "tts-mcp-server",
        "--voice",
        "nova",
        "--model",
        "gpt-4o-mini-tts"
      ],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key"
      }
    }
  }
}

Use OpenAI TTS MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once OpenAI TTS is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add OpenAI TTS as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the OpenAI TTS MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "openai-tts": {
      "command": "npx",
      "args": [
        "-y",
        "tts-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the OpenAI TTS MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the OpenAI TTS MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use OpenAI TTS to help me with this task?
OpenAI TTS
Sure. I read it.
Here is what I found using OpenAI TTS.

Frequently asked questions

What is the OpenAI TTS MCP server used for?

OpenAI TTS is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use OpenAI TTS MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use OpenAI TTS with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use OpenAI TTS MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With OpenAI TTS connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect OpenAI TTS MCP to TypingMind?

OpenAI TTS runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does OpenAI TTS MCP provide in TypingMind?

OpenAI TTS exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use OpenAI TTS MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If OpenAI TTS requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇