asr-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@asr-mcp transcribe this audio file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
asr-mcp
基于本地 Whisper Large V3 (MLX) 模型的语音转文本 MCP 服务(stdio 传输)。转写全程本地运行,不联网、不上传音频。
功能
对外暴露两个 MCP 工具:
工具 | 说明 |
| 将音频转写为文本,支持三种输出: |
| 调用当前会话的 LLM 对转写结果纠错,支持 |
设计要点:
工具调用与重任务解耦:转写在独立子进程(
worker.py)中执行,server 以事件驱动方式等待并每 15 秒上报心跳进度,不轮询进程状态。超时语义诚实:默认超时 10 分钟;超时后不杀子进程,任务继续在后台跑完并自行落盘,工具如实返回「未完成」而非「出错」,并提示稍后检查输出文件。
中文标点修复:该模型转写中文时默认不输出任何标点,本服务按语言注入
initial_prompt引导生成规范标点。Sampling 优雅回退:纠错优先走 MCP Sampling;客户端不支持时(多数客户端的现状),工具返回一份现成的纠错提示词,由当前会话的 LLM 直接完成纠错。
Related MCP server: whisper-transcribe-mcp
环境要求
macOS + Apple Silicon(MLX 仅支持 Apple 芯片)
Python ≥ 3.12
uv 包管理器
本地模型目录(见下节)
安装
git clone https://github.com/fengredrum/asr-mcp.git
cd asr-mcp
uv sync本项目默认 PyPI 索引为阿里云镜像(见
pyproject.toml),海外网络可在[tool.uv]中删除或替换该配置。
准备模型
下载模型到本地任意目录,例如:
huggingface-cli download mlx-community/whisper-large-v3-mlx --local-dir ~/models/whisper-large-v3-mlx通过环境变量 ASR_MCP_MODEL_PATH 指定模型目录(也支持直接填 Hugging Face 仓库 ID,mlx_whisper 会自动下载):
export ASR_MCP_MODEL_PATH=~/models/whisper-large-v3-mlx接入 MCP 客户端
以 Claude Code 为例:
claude mcp add asr-mcp \
--env ASR_MCP_MODEL_PATH=$HOME/models/whisper-large-v3-mlx \
-- uv --directory /绝对路径/asr-mcp run server.py或在客户端的 MCP 配置中手动添加:
{
"mcpServers": {
"asr-mcp": {
"command": "uv",
"args": ["--directory", "/绝对路径/asr-mcp", "run", "server.py"],
"env": {
"ASR_MCP_MODEL_PATH": "/你的模型目录/whisper-large-v3-mlx"
}
}
}
}接入后直接让 LLM「转写这个音频文件」即可,它会调用 transcribe_audio 并在完成后询问是否需要纠错。
调试转写链路
可绕过 MCP 直接运行 worker:
.venv/bin/python worker.py <音频路径> <text|timestamps|srt> <输出文件> [语言]输出文件命名约定
类型 | 文件名 |
纯文本 |
|
时间轴 |
|
字幕 |
|
纠错结果(约定) |
|
输出默认与音频文件同目录,也可由调用方指定输出目录。
项目结构
server.py # MCP server:工具定义、子进程调度、心跳进度、Sampling 回退
worker.py # 一次性转写工作进程,stdout 最后一行 JSON 为状态协议
transcriber.py # mlx_whisper.transcribe 薄封装(含中文标点 workaround)
formatter.py # text / timestamps / srt 三种格式化输出许可证
Available Tools
2 toolscorrect_transcriptionA
调用当前会话的 LLM 对转写文本进行纠错。调用前应先询问用户是否需要纠错及使用哪种模式。
若当前 MCP 客户端支持 Sampling,则由服务端请求客户端 LLM 完成纠错; 若不支持(多数客户端的现状),则返回现成的纠错提示词, 当前会话的 LLM 应直接按提示词完成纠错并把结果返回给用户。
Args: transcription_text: 需要纠错的转写文本 correction_mode: 纠错模式。semantic=结合语义/专业术语/互联网资料纠错(默认),reference=对照标准文本纠错 reference_text: 标准参考文本(reference 模式必填,一般用于字幕制作场景)
Inputs: transcription_text (required), reference_text, correction_mode. Returns: result
transcribe_audioA
将音频文件转写为文本。调用前若用户未明确指定,应先询问用户选择哪种转写类型。
转写在后台子进程中运行,完成后自动上报结果,不需要轮询进度。 默认超时 10 分钟;超时后会如实检查并告知是「尚未完成」(任务继续后台运行, 完成后结果自动写入输出文件)还是「转写出错」(附带错误信息)。
Args: audio_path: 音频文件的绝对路径(支持 m4a/mp3/wav/flac 等常见格式) task_type: 转写类型。text=纯文本含标点(默认),timestamps=带时间轴,srt=SRT 字幕 output_dir: 输出目录,默认与音频文件同目录 language: 语言提示,如 zh、en。不指定则自动检测 timeout: 超时时间(秒),默认 600(10 分钟)
Inputs: audio_path (required), timeout, language, task_type, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one transcribes audio to text, the other corrects existing transcription text. There is no overlap or ambiguity between them.
Both tool names follow a consistent verb_noun snake_case pattern: transcribe_audio and correct_transcription. This makes the naming predictable and easy to infer.
With only 2 tools, the server feels thin for a typical MCP surface, but the scope is narrow and focused on transcription plus correction. It sits at the borderline of being too minimal.
The core ASR workflow is covered: transcription with multiple output formats and language support, plus a correction step. Minor gaps exist like no explicit job status query, but the background processing design mitigates this.
Maintenance
Related MCP Connectors
MCP server for Speech-to-Text
An MCP server that gives any LLM or agent clean YouTube transcripts on demand: a single video, a whole channel, or a playlist, plus AI cleanup of auto-generated captions. API-key auth, credit-based, same backend as the public v1 API. Get a free API key with 25 free credits at youtubetranscriptdownload.com/account.
Bot-free macOS Zoom/Meet/Teams call transcripts, Apple Vision screen OCR, and live SQLite MCP.
1MCP server for structured access to Lenny Rachitsky podcast transcripts. For content creators.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMinimal MCP server for local speech recognition using faster-whisper. Runs on CPU, no cloud required.MIT
- AlicenseAqualityBmaintenanceMCP server for audio transcription using local faster-whisper or OpenAI Whisper API, enabling multilingual transcription with optional GPT post-processing.3117 PyPIMIT
- AlicenseNot gradedqualityFmaintenanceAn MCP server for audio/video transcription using MLX-optimized Whisper models, offering fast performance on Apple Silicon with support for multiple output formats and batch processing.1MIT
- AlicenseAqualityDmaintenanceLocal, private audio transcription MCP server enabling AI agents to transcribe audio files entirely on-device without uploading data.3MIT