Sponsored by Deepsite.site

MLX Whisper MCP Server

Created By
kachiO8 months ago
Local MCP server for MLX Whisper transcription
Content

MLX Whisper MCP Server

A simple Model Context Protocol (MCP) server that provides audio transcription capabilities using MLX Whisper on Apple Silicon Macs.

Features

  • Transcribe audio files directly from disk
  • Transcribe audio from base64-encoded data
  • Download and transcribe YouTube videos
  • Uses the high-quality mlx-community/whisper-large-v3-turbo model
  • Self-contained script with automatic dependency management via uv run
  • Rich console output for easy debugging
  • Saves transcription text files alongside audio files

Requirements

  • Python 3.12 or higher
  • Apple Silicon Mac (M-series)
  • uv installed (pip install uv or curl -sS https://astral.sh/uv/install.sh | bash)

Quick Start

Run directly with uv run:

uv run mlx_whisper_mcp.py

That's it! The script will automatically install its own dependencies and start the MCP server.

Using with Claude Desktop

  1. Edit your Claude Desktop configuration file:
# On macOS:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json

# On Windows:
code %APPDATA%\Claude\claude_desktop_config.json
  1. Add the MLX Whisper MCP server configuration:
{
  "mcpServers": {
    "mlx-whisper": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/mlx_whisper_mcp/",
        "run",
        "mlx_whisper_mcp.py"
      ]
    }
  }
}
  1. Restart Claude Desktop

Available Tools

The server provides the following tools:

1. transcribe_file

Transcribes an audio file from a path on disk.

Parameters:

  • file_path: Path to the audio file
  • language: (Optional) Language code to force a specific language
  • task: "transcribe" or "translate" (translates to English)

2. transcribe_audio

Transcribes audio from base64-encoded data.

Parameters:

  • audio_data: Base64-encoded audio data
  • language: (Optional) Language code to force a specific language
  • file_format: Audio file format (wav, mp3, etc.)
  • task: "transcribe" or "translate" (translates to English)

3. download_youtube

Downloads a YouTube video.

Parameters:

  • url: YouTube video URL
  • keep_file: If True, keeps the downloaded file (default: True)

4. transcribe_youtube

Downloads and transcribes a YouTube video.

Parameters:

  • url: YouTube video URL
  • language: (Optional) Language code to force a specific language
  • task: "transcribe" or "translate" (translates to English)
  • keep_file: If True, keeps the downloaded file (default: True)

Example Prompts for Claude Desktop

How It Works

This server uses the MCP Python SDK to expose MLX Whisper's transcription capabilities to clients like Claude. When a transcription is requested:

  1. The audio data is received (either as a file path, base64-encoded data, or YouTube URL)
  2. For YouTube URLs, the video is downloaded to ~/.mlx-whisper-mcp/downloads
  3. For base64 data, a temporary file is created
  4. MLX Whisper is used to perform the transcription
  5. The transcription text is saved to a .txt file alongside the audio file
  6. The transcription text is returned to the client
  7. Temporary files are cleaned up (unless keep_file=True)

Troubleshooting

  • Import Error: If you see an error about MLX Whisper not being found, make sure you're running on an Apple Silicon Mac
  • File Not Found: Make sure you're using absolute paths when referencing audio files
  • Memory Issues: Very long audio files may cause memory pressure with the large model
  • YouTube Download Errors: Some videos may be restricted or require authentication
  • JSON Errors: If you see "not valid JSON" errors in logs, make sure server logging output is properly directed to stderr

License

Apache License 2.0 See LICENSE for details.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
Playwright McpPlaywright MCP server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor