AssemblyAI MCP Server

AssemblyAI MCP Server

Enables 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.

Category
访问服务器

README

AssemblyAI MCP Server

A Model Context Protocol (MCP) server that provides access to AssemblyAI's transcription services. This server enables AI assistants to transcribe audio files and manage transcription jobs through a standardized interface.

Vibe Code Spectrum

On a scale of 1 to 10, 10 being the most vibey, this is a 9.

Features

  • Audio transcription from URLs and local files
  • Asynchronous job submission for large files
  • Transcript retrieval and status checking
  • Resource access to transcript data
  • Type-safe implementation with Zod validation
  • Error handling and graceful shutdown

Installation

  1. Clone or create this project directory
  2. Install dependencies:
    npm install
    
  3. Set up your AssemblyAI API key (see Configuration section)
  4. Build the TypeScript code:
    npm run build
    

Configuration

You need an AssemblyAI API key to use this server. Get one from AssemblyAI.

Set the environment variable:

export ASSEMBLYAI_API_KEY="your-api-key-here"

Or create a .env file:

ASSEMBLYAI_API_KEY=your-api-key-here

Usage

Running the Server

You can run the AssemblyAI MCP server in several ways:

Direct execution with npx/pnpm dlx (recommended)

# Using npx
npx assembly-ai-mcp@latest

# Using pnpm dlx
pnpm dlx assembly-ai-mcp@latest

Adding to Claude Code

claude mcp add assembly-ai-mcp --scope user -- pnpm dlx assembly-ai-mcp@latest

Local development

Start the MCP server:

npm start

For development with auto-rebuild:

npm run watch

MCP Tools

The server provides the following tools:

transcribe_url

Transcribe audio from a remote URL and wait for completion.

Parameters:

  • audioUrl (string, required): URL of the audio file
  • options (object, optional): Transcription options
    • speaker_labels (boolean): Enable speaker diarization
    • language_code (string): Specify language (e.g., "en")
    • punctuate (boolean): Add punctuation
    • format_text (boolean): Format text for readability

Example:

{
  "audioUrl": "https://example.com/audio.mp3",
  "options": {
    "speaker_labels": true,
    "punctuate": true
  }
}

transcribe_file

Transcribe audio from a local file path and wait for completion.

Parameters:

  • filePath (string, required): Local path to the audio file
  • options (object, optional): Same as transcribe_url

Example:

{
  "filePath": "/path/to/audio.wav",
  "options": {
    "language_code": "en"
  }
}

submit_transcription

Submit audio for transcription without waiting for completion. Returns immediately with a job ID.

Parameters:

  • audio (string, required): URL or local file path
  • options (object, optional): Same transcription options

Example:

{
  "audio": "https://example.com/large-audio.mp3",
  "options": {
    "speaker_labels": true
  }
}

get_transcript

Retrieve the status and results of a transcription job.

Parameters:

  • transcriptId (string, required): The transcript ID returned from previous calls

Example:

{
  "transcriptId": "1234567890"
}

MCP Resources

transcript://{id}

Access transcript data directly by ID. Provides structured JSON with all transcript information.

Example URI: transcript://1234567890

Returns:

{
  "id": "1234567890",
  "status": "completed",
  "text": "Hello, this is a test transcription...",
  "confidence": 0.95,
  "words": [...],
  "utterances": [...],
  "created": "2024-01-01T00:00:00Z",
  "completed": "2024-01-01T00:01:30Z"
}

Integration Examples

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "assemblyai": {
      "command": "node",
      "args": ["/path/to/assemblyai-mcp-server/dist/index.js"],
      "env": {
        "ASSEMBLYAI_API_KEY": "your-api-key-here"
      }
    }
  }
}

With Other MCP Clients

The server uses stdio transport, so it's compatible with any MCP client that supports this transport method.

Workflow Examples

Quick Transcription

  1. Use transcribe_url or transcribe_file for immediate results
  2. The tool waits for completion and returns the full transcript

Async Processing

  1. Use submit_transcription for large files
  2. Use get_transcript to check status and retrieve results
  3. Use the transcript:// resource for structured data access

Speaker Identification

{
  "audioUrl": "https://example.com/meeting.mp3",
  "options": {
    "speaker_labels": true,
    "punctuate": true,
    "format_text": true
  }
}

Error Handling

The server provides detailed error messages for common issues:

  • Missing API key: Server won't start without ASSEMBLYAI_API_KEY
  • Invalid audio URLs: Clear error messages for inaccessible files
  • File not found: Helpful messages for local file issues
  • API errors: AssemblyAI error messages passed through
  • Invalid transcript IDs: Clear feedback for non-existent transcripts

Development

Building

npm run build

Development Mode

npm run dev

Watch Mode

npm run watch

Requirements

  • Node.js 18.0.0 or higher
  • AssemblyAI API key
  • MCP-compatible client

License

MIT License

Support

For AssemblyAI API issues, visit AssemblyAI Documentation. For MCP protocol questions, see Model Context Protocol.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选