This MCP server provides text-to-speech and speech-to-text capabilities using Windows' built-in speech services. It leverages the native Windows Speech API (SAPI) through PowerShell commands, eliminating the need for external APIs or services while offering a simple web interface for testing.
Clone the repository:
git clone https://github.com/ExpressionsBot/MS-Lucidia-Voice-Gateway-MCP.git
cd MS-Lucidia-Voice-Gateway-MCP
Install dependencies:
npm install
Build the project:
npm run build
Start the test server:
npm run test
Open http://localhost:3000
in your browser
Use the web interface to test TTS and STT capabilities
Converts text to speech using Windows SAPI.
Parameters:
text
(required): The text to convert to speechvoice
(optional): The voice to use (e.g., "Microsoft David Desktop")speed
(optional): Speech rate from 0.5 to 2.0 (default: 1.0)Example:
fetch('http://localhost:3000/tts', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
text: "Hello, this is a test",
voice: "Microsoft David Desktop",
speed: 1.0
})
});
Records audio and converts it to text using Windows Speech Recognition.
Parameters:
duration
(optional): Recording duration in seconds (default: 5, max: 60)Example:
fetch('http://localhost:3000/stt', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
duration: 5
})
}).then(response => response.json())
.then(data => console.log(data.text));
Make sure Windows Speech Recognition is enabled:
To see which voices are available on your system:
Add-Type -AssemblyName System.Speech
(New-Object System.Speech.Synthesis.SpeechSynthesizer).GetInstalledVoices().VoiceInfo.Name
If speech recognition isn't working:
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.