MCP TTS Say is a tool that converts text to speech and plays it in your local environment using OpenAI's TTS SDK. It integrates with an MCP server to provide a simple way to generate and play high-quality synthesized voice audio.
First, clone the repository and install the required dependencies:
# Clone the project
git clone https://github.com/hirokidaichi/mcp-tts-say.git
cd mcp-tts-say
# Install dependencies
npm install
Set up your environment variables:
.env
file in the project root directoryOPENAI_API_KEY=your_api_key_here
To start the MCP TTS server in development mode:
npm run dev
For debugging purposes, you can use the MCP Inspector tool:
npm run inspect
This will launch the server in a mode that allows for detailed inspection of requests and responses.
The server provides text-to-speech capabilities. To use it, you'll need to send requests to the MCP server with the text you want to convert to speech. The server will then generate the audio and play it in your local environment.
While the README doesn't provide specific API examples, you would typically interact with the MCP server by sending properly formatted requests containing the text to be spoken, and potentially parameters like voice type, speed, and other audio characteristics supported by OpenAI's TTS SDK.
The service handles the API communication with OpenAI and the audio playback on your behalf, simplifying the process of converting text to speech in your applications.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.