Skip to main content
Glama

assemblyai-mcp

一个用于 AssemblyAI API 的 MCP 服务器。转写、字幕、说话人区分、单词搜索和 LeMUR,都以智能体可调用的工具形式提供。

写它是因为我需要一个,而当时没有。

安装

npm install -g assemblyai-mcp

Claude Code:

claude mcp add assemblyai -e ASSEMBLYAI_API_KEY=your-key -- npx -y assemblyai-mcp

任何其他通过 stdio 使用 MCP 的客户端:

{
  "mcpServers": {
    "assemblyai": {
      "command": "npx",
      "args": ["-y", "assemblyai-mcp"],
      "env": { "ASSEMBLYAI_API_KEY": "your-key" }
    }
  }
}

密钥来自仪表板。

Related MCP server: audio-transcription-mcp

工具

工具

作用

upload_file

上传本地音频或视频文件,获取一个 transcribe 可接受的 URL

transcribe

从 URL 转写音频或视频。默认等待结果

get_transcript

按 id 获取转写记录;如果仍在运行则附带其状态

list_transcripts

账户上最近的转写记录

get_subtitles

为已完成的转写记录生成 SRT 或 VTT 字幕

search_transcript

单词出现的位置,附带计数和时间戳

get_speaker_turns

当使用 speaker_labels 生成转写记录时,谁说了什么

ask_transcript

通过 LeMUR 根据一个或多个转写记录回答问题

summarize_transcript

通过 LeMUR 总结转写记录

三个值得了解的决策

transcribe 会等待。 如果智能体只拿到了一个任务 id 和 queued 状态,它就必须自己实现一个轮询循环,而且通常实现得很糟糕:固定间隔、没有上限、放弃时也没有任何提示。等待才是调用者的本意。如果你确实想要这个 id,请传入 wait: false。超时时,错误信息会说明转写记录并未丢失,并指出可以用哪个工具获取它。

长输出会被设置上限,并且会明确说明。 转写记录可能达到数百 KB。如果某个工具把全部内容都返回,就会把上下文窗口浪费在那些智能体反正要总结的文本上。任何可能产生较长输出的工具都会接受一个限制,并报告它裁剪了多少,而不是悄悄截断。

毫秒会变成秒。 API 使用毫秒,这对 API 来说是正确的,但对一个正在写给人看的回答的模型来说就是错误的。时间戳以秒为单位输出,保留一位小数。

开发

npm install
npm run build
npm test

API 客户端(src/api.ts)对 MCP 一无所知,只接受注入的 fetch,因此测试可以针对脚本化的传输层运行,既不需要网络,也不需要密钥。测试覆盖了薄 API 封装层中容易出错的点:密钥永远不会出现在 URL 中;id 会被转义,使恶意 id 无法篡改路径;非 JSON 响应(字幕以文本形式到达);错误体会呈现 API 写的句子,而不是一个光秃秃的状态码;轮询循环在 completed 和 error 两种状态下都会停止。

给 AssemblyAI 的说明

如果其中任何内容对你有用,尽管拿去。它是 MIT 许可的,你可以随意复刻、重命名、吸收或丢弃。如果你们更希望它成为第一方服务器,我很乐意帮助实现。

MIT。

Available Tools

9 tools
ask_transcriptC

Ask a question answered from one or more transcripts.

Inputs: question (required), transcript_ids (required), model.

get_speaker_turnsB

Get who said what, for a transcript made with speaker_labels.

Inputs: transcript_id (required), max_turns.

get_subtitlesA

Get SRT or VTT subtitles for a completed transcript.

Inputs: format (required), transcript_id (required), chars_per_caption.

get_transcriptA

Fetch a transcript by id, including its status if it is still running.

Inputs: transcript_id (required), max_characters.

list_transcriptsB

List recent transcripts on the account.

Inputs: limit, status.

search_transcriptA

Find where words are spoken in a transcript. Returns counts and timestamps.

Inputs: words (required), transcript_id (required).

summarize_transcriptC

Summarise one or more transcripts.

Inputs: transcript_ids (required), model, context, answer_format.

transcribeB

Transcribe an audio or video file from a URL. Waits for the result by default.

Inputs: audio_url (required), wait, auto_chapters, language_code, +2 more.

upload_fileA

Upload a local audio or video file and get a URL that transcribe accepts.

Inputs: file_path (required), max_size_mb.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct part of the transcription workflow: upload, transcribe, retrieve, list, subtitles, search, speaker turns, Q&A, and summarization. Even the two transcript-based text tools, ask_transcript and summarize_transcript, are clearly separated by their descriptions.

    Naming Consistency4/5

    Almost all tools follow a clear verb_noun pattern (upload_file, get_transcript, list_transcripts, ask_transcript). The only minor deviation is 'transcribe', which is a bare verb without an explicit object, but it remains predictable given the server's purpose.

    Tool Count5/5

    Nine tools is a well-scoped set for a transcription-focused MCP server. Each tool earns its place, covering the main AssemblyAI features without unnecessary duplication or bloat.

    Completeness4/5

    The set covers the core lifecycle well: upload, transcribe, retrieve, list, subtitles, and several post-processing features. The main gap is the absence of a delete_transcript tool, which prevents full CRUD coverage, but agents can still complete typical transcription workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers