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 🙏

© 2026 – Pkg Stats / Ryan Hefner

duomi-video-mcp

v1.3.1

Published

这是一个用于通过 DuomiAPI 生成视频的 Model Context Protocol (MCP) 服务器。它将 DuomiAPI 的视频生成功能封装为一个可供 MCP 客户端调用的工具。

Readme

Duomi Video MCP Server

这是一个用于通过 DuomiAPI 生成视频的 Model Context Protocol (MCP) 服务器。它将 DuomiAPI 的视频生成功能封装为一个可供 MCP 客户端调用的工具。

安装

作为 npm 包安装

如果您已将此 MCP 服务器发布到 npm,用户可以通过以下方式安装:

npm install your-package-name # 将 'your-package-name' 替换为您的实际包名

从源代码安装

  1. 克隆此仓库或下载项目文件。
  2. 导航到项目根目录:
    cd duomi-video-mcp
  3. 安装依赖:
    npm install
  4. 构建项目:
    npm run build

配置 MCP 服务器

要让 Cline 识别并使用此 MCP 服务器,您需要将其配置添加到您的 cline_mcp_settings.json 文件中。此文件通常位于: c:\Users\您的用户名\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

请将以下 JSON 片段合并到您的 cline_mcp_settings.json 文件中的 mcpServers 对象下。请将 your-package-name 替换为您实际发布的 npm 包名称。

{
  "mcpServers": {
    "duomi-video": {
      "command": "npx",
      "args": ["your-package-name", "duomi-video-mcp-server"],
      "env": {
        "DUOMI_API_KEY": "您的DuomiAPI密钥",
        "DUOMI_MODEL_NAME": "kling-v1"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

重要提示:

  • 请确保 args 中的 your-package-name 替换为您实际发布的 npm 包名称。duomi-video-mcp-server 是包内可执行脚本的名称。
  • DUOMI_API_KEYDUOMI_MODEL_NAME 必须env 对象中配置,而不是在工具调用时作为参数传递。
  • 如果您的 cline_mcp_settings.json 中已经存在 mcpServers 对象,请将此新的 duomi-video 条目合并到现有对象中,而不是覆盖整个文件。

使用 generate_video 工具

配置完成后,您就可以在 Cline 中使用 generate_video 工具来生成视频了。

工具名称

generate_video

描述

使用 DuomiAPI Kling v1 生成视频。

输入参数 (arguments)

该工具接受一个 JSON 对象作为参数,包含以下属性:

| 参数名 | 类型 | 描述 | 默认值 | 是否必需 | | :-------------- | :------- | :--------------------------------------- | :------------------------------------------------------------------ | :------- | | prompt | string | 用于视频生成的文本描述 | 无 | 是 | | negative_prompt | string | 视频中要避免的文本描述 | hi | 否 | | duration | number | 视频时长 (秒) | 5 | 否 | | cfg_scale | number | CFG 比例 | 0.5 | 否 | | aspect_ratio | string | 视频宽高比 (例如: 16:9, 9:16, 1:1) | 16:9 | 否 | | callback_url | string | 视频生成状态更新的回调 URL | https://webhook.site/147b0a91-39f2-498c-8022-9ceb707180b1 | 否 |

示例用法

<use_mcp_tool>
<server_name>duomi-video</server_name>
<tool_name>generate_video</tool_name>
<arguments>
  {
    "prompt": "一只猫在弹钢琴",
    "negative_prompt": "模糊, 质量差",
    "duration": 5,
    "cfg_scale": 0.7,
    "aspect_ratio": "16:9",
    "callback_url": "https://您的webhook-url.com"
  }
</arguments>
</use_mcp_tool>

使用 get_video_status 工具

此工具用于查询视频生成任务的状态。

工具名称

get_video_status

描述

获取 DuomiAPI 视频生成任务的状态。

输入参数 (arguments)

该工具接受一个 JSON 对象作为参数,包含以下属性:

| 参数名 | 类型 | 描述 | 默认值 | 是否必需 | | :-------- | :------- | :------------------- | :----- | :------- | | task_id | string | 视频生成任务的 ID | 无 | 是 |

示例用法

<use_mcp_tool>
<server_name>duomi-video</server_name>
<tool_name>get_video_status</tool_name>
<arguments>
  {
    "task_id": "您的视频任务ID"
  }
</arguments>
</use_mcp_tool>

使用 generate_image_video 工具

此工具用于通过图片生成视频。

工具名称

generate_image_video

描述

使用 DuomiAPI Kling v1 从图片生成视频。

输入参数 (arguments)

该工具接受一个 JSON 对象作为参数,包含以下属性:

| 参数名 | 类型 | 描述 | 默认值 | 是否必需 | | :-------------- | :------- | :--------------------------------------- | :------------------------------------------------------------------ | :------- | | model_name | string | 用于生成的模型 (例如: kling-v1-6) | kling-v1-6 | 是 | | image | string | 用于视频生成的图片 URL | 无 | 是 | | prompt | string | 用于视频生成的文本描述 | 无 | 是 | | negative_prompt | string | 视频中要避免的文本描述 | "" | 否 | | cfg_scale | number | CFG 比例 | 0.5 | 否 | | mode | string | 视频生成模式 (例如: std) | std | 否 | | duration | number | 视频时长 (秒) | 5 | 否 | | callback_url | string | 视频生成状态更新的回调 URL | https://webhook.site/851ea22f-e43e-49d7-9e1d-af68e90f52b1 | 否 |

示例用法

<use_mcp_tool>
<server_name>duomi-video</server_name>
<tool_name>generate_image_video</tool_name>
<arguments>
  {
    "model_name": "kling-v1-6",
    "image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
    "prompt": "宇航员站起身走了",
    "negative_prompt": "",
    "cfg_scale": 0.5,
    "mode": "std",
    "duration": 5,
    "callback_url": "https://webhook.site/851ea22f-e43e-49d7-9e1d-af68e90f52b1"
  }
</arguments>
</use_mcp_tool>

开发

项目结构

duomi-video-mcp/
├── src/
│   └── index.ts      # MCP 服务器的核心实现
├── build/            # 编译后的 JavaScript 文件
├── node_modules/     # 项目依赖
├── package.json      # 项目元数据和脚本
├── tsconfig.json     # TypeScript 配置文件
└── README.md         # 本文件

构建项目

在对 src/index.ts 进行任何更改后,您需要重新构建项目:

cd duomi-video-mcp
npm run build