Local Speech-to-Text MCP server

Provides local speech-to-text transcription using whisper.cpp with automatic audio format conversion, intelligent chunking for long files, speaker diarization, and multiple output formats for private transcription workflows without cloud dependencies.
Back to servers
Provider
SmartLittleApps
Release date
Jun 03, 2025
Language
TypeScript
Stats
1 star

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.

Prerequisites

  • Node.js 18+
  • whisper.cpp installed via Homebrew
  • At least one whisper model downloaded
  • For speaker diarization: Python 3.8+ with pyannote.audio
  • For speaker diarization: HuggingFace account and token (free)

Installation

Basic Setup

# 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

Speaker Diarization Setup (Optional)

# Install required Python package
pip install pyannote.audio

You'll also need a HuggingFace token:

  1. Create account at huggingface.co
  2. Generate token at Settings > Access Tokens
  3. Accept the license for pyannote/speaker-diarization-3.1
  4. Set environment variable:
    export HF_TOKEN="your_token_here"
    

Testing the Installation

# Test server functionality
node test-server.js

# Test with MCP Inspector
npx @modelcontextprotocol/inspector@latest dist/index.js

Using the MCP Server

Available Tools

Transcribe Audio

Convert audio files to text using whisper.cpp.

Parameters:

  • audio_path (string): Path to audio file
  • options (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
  }
}

List Models

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"
}

Health Check

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
  }
}

Client Integration

MCP Client Integration

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"
    }
  }
}

MCP Desktop Client Integration

Add to your MCP client configuration:

{
  "mcpServers": {
    "whisper-mcp": {
      "command": "node",
      "args": ["/path/to/whisper-mcp-server/dist/index.js"],
      "env": {}
    }
  }
}

Configuration Options

Environment Variables

  • WHISPER_MODELS_PATH: Custom path to whisper models (default: ../models)
  • WHISPER_BINARY: Custom whisper binary path (default: whisper-cli)

Supported Audio Formats

  • WAV (recommended for best quality)
  • MP3
  • M4A
  • FLAC
  • OGG

Model Performance

Apple Silicon Benchmarks

  • base.en model: ~15x real-time transcription speed
  • Memory usage: <2GB typical
  • Startup time: <5 seconds
  • Optimal threads: 4 for Apple Silicon

Model Comparison

Model Size Speed Accuracy Best For
tiny.en 39MB ⭐⭐⭐⭐⭐ ⭐⭐ Quick transcription
base.en 142MB ⭐⭐⭐⭐ ⭐⭐⭐ Balanced performance
small.en 488MB ⭐⭐⭐ ⭐⭐⭐⭐ High accuracy

Troubleshooting

Common Issues

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:

  • Use 4 threads on Apple Silicon for optimal performance
  • Ensure adequate memory (2GB+ free)
  • Try smaller models for faster processing

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later