npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

openai-elevenlabs-tts-mcp-server

v0.1.2

Published

MCP server that converts text to speech using OpenAI for transformation and ElevenLabs for voice synthesis

Downloads

47

Readme

OpenAI + ElevenLabs TTS MCP Server

MCP Server License Website

A powerful Model Context Protocol (MCP) server that I created to convert text to speech using OpenAI for text transformation and ElevenLabs for text-to-speech conversion.

🌟 Features

  • Text Transformation: Uses OpenAI's GPT-4o to transform plain text into engaging, light-hearted scripts
  • Text-to-Speech Conversion: Leverages ElevenLabs' high-quality voice synthesis API
  • File Input Support: Process text directly or from .txt files
  • Persistent Storage: Automatically saves generated audio files to the outputs directory
  • MCP Integration: Seamlessly integrates with Claude and other MCP-compatible AI assistants

📋 Prerequisites

  • Node.js (v16 or higher)
  • OpenAI API key
  • ElevenLabs API key

🚀 Installation

  1. Clone the repository:

    git clone https://github.com/Gitmaxd/openai-elevenlabs-tts-mcp-server.git
    cd openai-elevenlabs-tts-mcp-server
  2. Install dependencies:

    npm install
  3. Build the server:

    npm run build
  4. Set up your API keys as environment variables:

    export OPENAI_API_KEY="your-openai-api-key"
    export ELEVENLABS_API_KEY="your-elevenlabs-api-key"

🔧 Configuration

Output Directory

By default, audio files are saved to the outputs directory in the current working directory. You can customize the output location by setting the TTS_OUTPUT_DIR environment variable:

export TTS_OUTPUT_DIR="/path/to/custom/output/directory"

Claude Desktop Integration

To use with Claude Desktop, add the server configuration to your Claude Desktop config file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "openai-elevenlabs-tts-mcp-server": {
      "command": "/absolute/path/to/openai-elevenlabs-tts-mcp-server/build/index.js"
    }
  }
}

🛠️ Available Tools

generate_audio

Converts text to speech using OpenAI for transformation and ElevenLabs for TTS.

Parameters:

  • text (string, required): Text content or path to a .txt file to convert to speech

Example Usage in Claude:

I'd like to convert this text to speech: "Hello world, this is a test of the text-to-speech system."

🧪 Development

For development with auto-rebuild:

npm run watch

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. I recommend using the MCP Inspector:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

📁 Project Structure

.
├── src/
│   └── index.ts         # Main server implementation
├── build/               # Compiled JavaScript files
├── outputs/             # Generated audio files
├── package.json         # Project dependencies and scripts
└── README.md            # This documentation

🔄 How It Works

  1. The server receives a text input (direct text or file path)
  2. OpenAI transforms the text into an engaging script
  3. ElevenLabs converts the transformed text to speech
  4. The audio file is saved to the outputs directory
  5. The server returns the path to the generated audio file

📚 About MCP (Model Context Protocol)

The Model Context Protocol (MCP) is an open standard that enables AI assistants like Claude to interact with external tools and services. MCP servers provide a standardized way for AI models to access capabilities beyond their training data, such as accessing real-time information or controlling external systems.

Learn more about MCP at modelcontextprotocol.github.io.

👨‍💻 Created by

This MCP Server was created by me, GitMaxd.

📄 License

This project is open source and available under the MIT License.

🔗 Links