gpu-transcription-mcp
GPU Queue
一个 faster-whisper 转录服务,内置任务队列,多个智能体可以共享一个 GPU 而不会发生冲突。队列/worker/引擎核心与传输层无关,并通过 两个可互换的服务器 暴露 —— 选择你的客户端能对接的那一个:
服务器 | 入口点 | 默认端口 | 客户端 |
MCP |
| 8000 | 支持 MCP 的智能体(FastMCP) |
Flask |
| 8001 | 任意 HTTP/JSON 客户端 |
两个服务器都封装同一个 QueueManager,因此任务仍然一次处理一个,并且响应负载完全相同(共用 app/service.py)。
工作原理
submit ─► ┌──────────────┐ one worker, one GPU ┌───────────────┐
│ job queue │ ──────────────────────► │ WhisperEngine │
poll ◄─ └──────────────┘ processed serially └───────────────┘任务入队后立即返回一个 job_id;随后你可以轮询它的状态,直到状态变为 done(或 error)。单个 worker 会按顺序取出队列中的任务,因此共享 GPU 永远不会同时运行两个转录任务。
Related MCP server: AssemblyAI MCP Server
安装
pip install -e . # or: uv sync这会安装 fastmcp(MCP 传输)、flask + waitress(HTTP 传输)以及 faster-whisper(引擎)。
运行服务器
选择一个服务器(两个服务器相互独立 —— 互不导入):
# MCP transport (streamable-http on :8000)
python server.py
python server.py --port 9000
python server.py --transport stdio # for stdio MCP clients
# Flask transport (HTTP/JSON on :8001)
python flask_server.py
python flask_server.py --port 9001
python flask_server.py --debug # Flask dev server with auto-reload仅运行一个进程 —— 队列和任务注册表只保存在内存中。 多线程没问题(waitress 使用线程池);但多个 worker 进程 不行,因为它们会各自持有独立、不共享的队列。
Flask 服务器(包含生产环境 waitress 路径)会打印启动横幅,并在 stdout 上为每个请求记录一行日志,例如 GET /queue -> 200 (1.2ms)。
引擎配置(两个服务器均适用)
通过环境变量读取:
WHISPER_MODEL(默认distil-large-v3.5)WHISPER_DEVICE(默认auto)WHISPER_DEVICE(默认auto)WHISPER_COMPUTE_TYPE(默认auto)WHISPER_MODEL_DIR
HTTP API(Flask 传输)
方法 + 路径 | 说明 |
| 健康检查 → |
| 存活检查 → |
| 提交一个任务: |
| 轮询状态;当 |
| 取消排队中或运行中的任务 |
| 当前运行的任务、已经排队的任务、相符数量 |
示例会话:
curl localhost:8001/ping
# submit
curl -X POST localhost:8001/transcriptions \
-H 'Content-Type: application/json' \
-d '{"audio_path":"/abs/path/audio.mp3","args":"--format text"}'
# → {"job_id":"j_ab12cd34","position":1, ...}
# poll until "status":"done"
curl localhost:8001/transcriptions/j_ab12cd34
# inspect the queue / cancel
curl localhost:8001/queue
curl -X POST localhost:8001/transcriptions/j_ab12cd34/cancelMCP API(MCP 传输层)
同样的操作通过五个 FastMCP 工具暴露:
工具 | 描述 |
| 存活检查 |
| 入队一个任务,返回一个 |
| 轮询一个 |
| 取消排队中或运行中的任务 |
| 运行中的任务、排队任务、已完成数量 |
对运行中的 MCP 服务器进行快速检查(使用 fastmcp 客户端):
python test_ping.py # ping the server
python test_live.py --audio /path/audio.mp3 # full submit → poll → print transcriptargs 标志(两种传输方式均适用)
args 字符串在任意传输方式上接受相同的 faster-whisper CLI 标志,例如 --format srt、--model large-v3、--language en、--diarize、--word-timestamps、--beam-size 5。完整列表请参见 app/queue_manager.py 中的 _ARG_MAP。
完整 HTTP 参考
完整请求/响应模式、状态代码、任务生命周期以及 args 标志请参见 docs/HTTP_API.md。
项目
app/
queue_manager.py queue, worker, engine lifecycle, CLI-arg → kwargs bridge
whisper/engine.py faster-whisper wrapper (model stays loaded between jobs)
models.py JobRecord dataclass
service.py payload-shaping shared by both transports
main.py / tools.py MCP transport (create_mcp_app + tool definitions)
flask_app.py Flask transport (create_flask_app + routes)
server.py run the MCP server (:8000)
flask_server.py run the Flask server (:8001)Docker
附带的 Dockerfile 和 docker-compose.yml 使用 Docker MCP 服务器(CMD ["python", "server.py"],端口 8000),并为 NVIDIA GPU 预留资源。要改为容器中的 Flask 传输,可以覆盖启动命令,例如:
command: python flask_server.py --port 8000测试
pytest -m "not integration" # unit tests (engine mocked) — covers core, MCP, and Flask
pytest -m integration # requires faster-whisper + a real model/audio filetest/test_queue_manager.py— 队列/worker/取消功能tests/test_service.py— 共享的载荷构造逻辑tests/test_tools.py— MCP 传输端到端测试(模拟引擎)tests/test_flask_app.py— 通过test_client对 Flask 路由进行端到端测试
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables high-performance audio transcription using Faster Whisper with CUDA acceleration, supporting single and batch audio file processing with multiple output formats (VTT, SRT, JSON).
- AlicenseAqualityFmaintenanceEnables AI assistants to transcribe audio files from URLs or local paths using AssemblyAI's services, with support for speaker diarization, language detection, and asynchronous job management through a standardized MCP interface.4132MIT
- FlicenseAqualityDmaintenanceEnables high-quality transcription and subtitle generation from local media files or URLs using Faster Whisper on local hardware. It supports automatic language detection and integration with MCP clients for seamless speech-to-text workflows.3
- AlicenseAqualityFmaintenanceProvides local audio transcription using whisper.cpp, supporting multiple models and audio formats. Enables transcription of audio files via MCP tools with optional timestamps.3673MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ollayf/gpu-transcription-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server