Skip to main content
Glama

volcengine-api-mcp

把火山引擎 OpenAPI 封装为 MCP 服务,供 Claude / Cursor / Cline 等 Agent 直接调用。

项目结构

单包仓库:src/lib/ 是火山各产品的 API 客户端,src/tools/ 是 MCP 工具,src/index.ts 为 server 入口。

src/
  lib/     # API 客户端:ark(方舟生图)/ tts(语音合成)/ tos(对象存储)/ auc(语音识别)/ search(联网搜索)/ client + signer(V4 签名底座)
  tools/   # MCP 工具封装(每个文件对应一类 API)
  index.ts # MCP Server 入口(stdio 传输)

Related MCP server: Taskade MCP Server

快速开始

pnpm install
pnpm build          # 构建到 dist/
pnpm dev            # 以 tsx 直接启动 MCP server(开发)

配置凭据

各工具独立取自己的环境变量(参考 .env.example),不用哪个工具就不用配;配置缺失只在调用对应工具时报错。

工具

必需

可选

plan_images_generations

ARK_API_KEY(ark- 开头,必须显式配置,不做其他回退)

—

plan_tts_unidirectional

同上(复用 ARK_API_KEY,走方舟 Agent Plan 网关)

—

tos_object_put

VOLC_TOS_ACCESS_KEY / VOLC_TOS_SECRET_KEY / VOLC_TOS_BUCKET / VOLC_TOS_REGION

VOLC_TOS_ENDPOINT、VOLC_TOS_PREFIX(key 前缀,默认 volcengine-api-mcp)

auc_bigmodel_transcribe

VOLC_ASR_API_KEY(火山语音控制台 API Key);传本地音频时还需 TOS 四件套(同上)

—

askecho_web_search

ASK_ECHO_SEARCH_INFINITY_API_KEY(搜索 API Key)或 VOLCENGINE_ACCESS_KEY + VOLCENGINE_SECRET_KEY(V4 签名)二者其一

—

VOLCENGINE_ACCESS_KEY / VOLCENGINE_SECRET_KEY 除 askecho_web_search 的 AK/SK 鉴权模式外,也供 core 的 V4 签名客户端后续封装其他 OpenAPI 工具使用。

接入 Claude Code / Cursor

{
  "mcpServers": {
    "volcengine-api": {
      "command": "npx",
      "args": ["-y", "volcengine-api-mcp"],
      "env": {
        "VOLCENGINE_ACCESS_KEY": "your-ak",
        "VOLCENGINE_SECRET_KEY": "your-sk",
        "VOLCENGINE_REGION": "cn-north-1",
        "ARK_API_KEY": "ark-xxx",
        "VOLC_TOS_ACCESS_KEY": "your-ak",
        "VOLC_TOS_SECRET_KEY": "your-sk",
        "VOLC_TOS_BUCKET": "your-bucket",
        "VOLC_TOS_REGION": "cn-beijing",
        "VOLC_ASR_API_KEY": "xxx"
      }
    }
  }
}

npx volcengine-api-mcp 要求本包已发布到 npm;发布前可临时用本地路径: "command": "node", "args": ["/absolute/path/to/volcengine-api-mcp/dist/index.js"]

提供的工具

工具

说明

plan_images_generations

火山方舟文生图(/api/plan/v3/images/generations):生成图片落盘并直接返回给 Agent(抽自 nova-voyage 的 ark-image.mjs 逻辑)

plan_tts_unidirectional

豆包语音合成大模型-单向流式(/api/v3/plan/tts/unidirectional):文本合成音频落盘并返回给 Agent

tos_object_put

火山引擎 TOS 上传(Action: PutObject):文件落 bucket 并返回预签名下载 URL,bucket 保持私有

auc_bigmodel_transcribe

大模型录音文件识别(/api/v3/auc/bigmodel/submit + query):提交音频轮询至完成,返回全文 + 分句时间戳 + 说话人(抽自 content-forge clip 的 doubao.ts)

askecho_web_search

联网搜索(豆包搜索,服务 volc_torchlight_api / Action WebSearch):网页/图片搜索,支持时间/站点/行业过滤与正文返回(移植自 mcp-server 的 askecho_search_infinity)

新增具体工具

在 src/tools/ 下新建文件,参照 tos.ts(单 API 专用工具)或 image.ts(含图片回传的处理类工具),API 客户端放 src/lib/:

  1. 定义 name / description / zod inputSchema / handler

  2. 在 index.ts 中 registerTool 注册

工具命名约定

统一 服务_资源_动作(全小写下划线),从火山 API 推导,让用户一眼对上背后调的是哪个 API:

  • REST 路径类:取端点路径段,如 /api/plan/v3/images/generations → plan_images_generations

  • OpenAPI Action 类:拆 Action 名,如 TOS PutObject → tos_object_put、ECS DescribeInstances → ecs_describe_instances

  • 语音识别放在 auc* 前缀下(openspeech 的 /api/v3/auc/... 端点)

工具 description 里务必写明实际端点路径或 Action 名,方便对照文档。

src/lib/ 自带火山 Signature V4 签名客户端(client.ts + signer.ts), 可直接调任何火山 OpenAPI(askecho_web_search 的 AK/SK 模式已在用);后续封装其他 OpenAPI 工具时 配合 SERVICE_HOSTS(已映射 ecs / vpc / iam / vod / live / tls / ces)即可。

Available Tools

5 tools
auc_bigmodel_transcribe大模型录音文件识别 auc/bigmodelA

火山引擎语音技术-大模型录音文件识别(端点 openspeech.bytedance.com/api/v3/auc/bigmodel/submit + query)。提交音频并轮询直到完成,返回全文、分句时间戳与说话人。音频源二选一:url(公网可访问)或 file_path(本地文件,自动上传 TOS 换取预签名地址,需 VOLC_TOS_* 配置)。需要环境变量 VOLC_ASR_API_KEY。

Inputs: url, model, format, language, +6 more.

plan_images_generations火山方舟图片生成 plan/images/generationsA

火山方舟图片生成(端点 /api/plan/v3/images/generations,Seedream 文生图)。输入 prompt 与保存路径,生成图片并落盘,同时把图片直接返回给 Agent 查看。默认模型 doubao-seedream-5-0-flash,默认尺寸 1728x2304(宽x高,或 1K/2K/4K)。

Inputs: prompt (required), output_path (required), seed, size, +3 more.

plan_tts_unidirectional语音合成(单向流式)plan/tts/unidirectionalA

火山豆包语音合成大模型-单向流式(端点 /api/v3/plan/tts/unidirectional,HTTP Chunked)。输入文本一次性合成音频,落盘并返回给 Agent。默认音色 zh_male_liufei_uranus_bigtts(流飞,男声),音色 ID 从控制台>音色库获取;复刻音色需 resource_id=seed-icl-2.0 并传 model。需要环境变量 ARK_API_KEY。

Inputs: text (required), output_path (required), model, format, +7 more.

tos_object_putTOS 上传文件 tos/object/putA

上传本地文件到火山引擎 TOS(API Action: PutObject,对应工具名 tos_object_put = 服务_资源_动作),bucket 保持私有,返回预签名下载 URL(默认 24h 有效)。对象 key 默认为 //<文件名>。需要环境变量 VOLC_TOS_ACCESS_KEY / VOLC_TOS_SECRET_KEY / VOLC_TOS_BUCKET / VOLC_TOS_REGION。

Inputs: file_path (required), key, bucket, prefix, +4 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation4/5

    Each tool targets a clearly different modality or service (image generation, ASR transcription, TOS upload, TTS, web search), so an agent can generally pick the right one. The only mild overlap is that tos_object_put is also performed implicitly inside auc_bigmodel_transcribe, so an agent may be unsure whether it needs to call the upload tool explicitly.

    Naming Consistency3/5

    There is a loose <service>_<resource>_<action> convention (tos_object_put is explicitly documented as such), but prefixes mix service names (plan_, auc_, tos_, askecho_) and forms vary, e.g. plural 'plan_images_generations' versus the adjective 'plan_tts_unidirectional'. It is readable but not a single predictable pattern.

    Tool Count4/5

    Five tools is a compact, sensible set where each tool exposes a distinct capability of the Volcengine API surface. It is slightly thin for a multi-service gateway, but no tool feels redundant or filler.

    Completeness3/5

    Core multimodal workflows (generate image, transcribe audio, synthesize speech, upload file, search web) are present, but TOS only exposes PutObject with no get/list/delete, and each speech/image tool offers only one mode. Agents can do the happy path but will hit dead ends for object management and other operations.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers