npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

coze-video-concatenator-mcp

v1.0.13

Published

MCP Server for Coze video concatenation workflow

Readme

Coze视频拼接工作流 MCP 插件

这是一个基于Model Context Protocol (MCP)的Coze视频拼接工作流插件,可以让AI助手直接调用Coze的视频拼接能力。

功能特性

  • 🎬 视频拼接: 将多个视频按顺序拼接成一个完整视频
  • 🔧 MCP集成: 完全兼容MCP协议,可与支持MCP的AI助手集成
  • 📹 多视频输入: 支持多个URL视频作为输入源
  • 🚀 工作流集成: 使用Coze预定义的工作流进行视频处理
  • 批量处理: 一次性处理多个视频文件

安装和配置

1. 安装依赖

npm install

2. 设置API密钥

设置环境变量 COZE_API_KEY

Windows (PowerShell):

$env:COZE_API_KEY="your_api_key_here"

Windows (CMD):

set COZE_API_KEY=your_api_key_here

Linux/Mac:

export COZE_API_KEY="your_api_key_here"

3. 配置工作流ID

默认使用工作流ID:7543475034791936027

使用方法

启动MCP服务器

npm start

可用的MCP工具

1. 视频拼接工作流 (run_video_concatenation_workflow)

{
  "name": "run_video_concatenation_workflow",
  "arguments": {
    "video_urls": [
      "https://example.com/video1.mp4",
      "https://example.com/video2.mp4"
    ]
  }
}

参数说明:

  • video_urls (必需): 输入视频的URL地址数组,多个视频将按顺序拼接
  • workflow_id: Coze工作流ID,默认: 7543475034791936027

测试

使用Node.js脚本测试

运行提供的测试脚本:

npm test

使用MCP客户端测试

如果你有支持MCP的客户端,可以直接调用工具:

# 示例:运行视频拼接工作流
curl -X POST "http://localhost:3000/tools/run_video_concatenation_workflow" \
  -H "Content-Type: application/json" \
  -d '{
    "video_urls": [
      "https://example.com/video1.mp4",
      "https://example.com/video2.mp4"
    ]
  }'

配置选项

环境变量

  • COZE_API_KEY: Coze API密钥 (必需)

默认参数

  • 工作流ID: 7543475034791936027

API响应格式

成功响应示例:

{
    "code": 0,
    "data": "{\"output\":\"https://coze-dianbo.tos-cn-beijing.volces.com/******.mp4\"}",
    "debug_url": "https://www.coze.cn/work_flow?execute_id=******",
    "msg": "Success",
    "usage": {
        "input_count": 0,
        "output_count": 0,
        "token_count": 0
    }
}

错误处理

插件包含完善的错误处理:

  • API密钥验证
  • 网络请求超时
  • 参数验证
  • 错误信息返回

注意事项

  1. API密钥安全: 请妥善保管你的API密钥,不要提交到代码仓库
  2. 请求限制: 注意Coze API的请求频率限制
  3. 视频URL: 确保输入视频URL可以正常访问
  4. 网络环境: 确保能够访问Coze API服务器
  5. 视频格式: 确保所有输入视频格式兼容

故障排除

常见问题

  1. API密钥错误

    • 检查环境变量是否正确设置
    • 确认API密钥是否有效
  2. 网络连接问题

    • 检查网络连接
    • 确认防火墙设置
  3. 视频URL问题

    • 检查输入视频URL是否可访问
    • 确认视频格式是否支持
  4. 拼接失败

    • 检查视频格式是否一致
    • 确认视频分辨率是否兼容

日志查看

MCP服务器会在控制台输出错误信息,包括:

  • API请求状态
  • 错误详情
  • 调试信息

许可证

MIT License

贡献

欢迎提交Issue和Pull Request来改进这个插件!

更新日志

v1.0.0

  • 添加Coze视频拼接工作流功能
  • 集成MCP协议支持
  • 支持多个视频URL输入
  • 完善错误处理和配置管理