This MCP server provides local speech-to-text transcription using whisper.cpp, optimized for Apple Silicon performance. It processes audio files entirely on your device without requiring internet connectivity, supporting multiple whisper models and output formats.
# Install whisper.cpp
brew install whisper-cpp
# Clone and setup
git clone <repo-url>
cd whisper-mcp-server
npm install
npm run build
# Download base model (recommended starting point)
mkdir -p ../models
cd ../models
curl -L -O https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin
# Install required Python package
pip install pyannote.audio
You'll also need a HuggingFace token:
export HF_TOKEN="your_token_here"
# Test server functionality
node test-server.js
# Test with MCP Inspector
npx @modelcontextprotocol/inspector@latest dist/index.js
Convert audio files to text using whisper.cpp.
Parameters:
audio_path
(string): Path to audio fileoptions
(object, optional):
model
(string): Model to use (default: 'base.en')language
(string): Language code (default: 'auto')output_format
(string): Output format - txt, vtt, srt, json, csv (default: 'txt')temperature
(number): Sampling temperature 0-1 (default: 0)threads
(number): CPU threads to use (default: 4)translate
(boolean): Translate to English (default: false)word_timestamps
(boolean): Include word-level timestamps (default: false)Example request:
{
"audio_path": "/path/to/audio.mp3",
"options": {
"model": "base.en",
"output_format": "json",
"word_timestamps": true
}
}
View available whisper models with performance recommendations.
Example response:
{
"available_models": [
{
"model": "base.en",
"available": true,
"size": "142 MB",
"speed_rating": 4,
"accuracy_rating": 3,
"recommended_for": ["general transcription", "Apple Silicon"]
}
],
"recommended_for_apple_silicon": "base.en"
}
Verify whisper.cpp installation and system configuration.
Example response:
{
"status": "healthy",
"whisper_installed": true,
"models_available": ["base.en"],
"system_info": {
"platform": "darwin",
"arch": "arm64",
"threads_available": 8
},
"diagnostics": {
"overall_status": "healthy",
"apple_silicon_optimization": "available",
"recommended_threads": 4
}
}
Use the included .mcp.json
file in the project root:
{
"mcpServers": {
"whisper-mcp": {
"command": "node",
"args": ["mcp-server/dist/index.js"],
"cwd": "/path/to/your/local-stt-mcp",
"env": {},
"description": "whisper.cpp MCP server for local speech-to-text transcription"
}
}
}
Add to your MCP client configuration:
{
"mcpServers": {
"whisper-mcp": {
"command": "node",
"args": ["/path/to/whisper-mcp-server/dist/index.js"],
"env": {}
}
}
}
WHISPER_MODELS_PATH
: Custom path to whisper models (default: ../models)WHISPER_BINARY
: Custom whisper binary path (default: whisper-cli)Model | Size | Speed | Accuracy | Best For |
---|---|---|---|---|
tiny.en | 39MB | ⭐⭐⭐⭐⭐ | ⭐⭐ | Quick transcription |
base.en | 142MB | ⭐⭐⭐⭐ | ⭐⭐⭐ | Balanced performance |
small.en | 488MB | ⭐⭐⭐ | ⭐⭐⭐⭐ | High accuracy |
whisper.cpp not found:
# Install via Homebrew
brew install whisper-cpp
# Verify installation
which whisper-cli
No models found:
# Download base.en model
mkdir -p models
cd models
curl -L -O https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin
Performance issues:
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.