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

n8n-nodes-duomi-video-mcp

v1.0.0

Published

MCP server for Duomi Kling video generation API with Civitai image query tool

Readme

Duomi Video MCP Server

一个用于 Duomi Kling 视频生成 API 的 Model Context Protocol (MCP) 服务器。

功能特性

  • 🎬 文本生成视频 - 使用 Kling AI 从文本描述生成视频
  • 📊 任务状态查询 - 实时查询视频生成进度
  • 🐍 Python 集成 - 支持通过现有 Python 脚本生成视频
  • 🎛️ 灵活配置 - 支持多种参数配置(比例、时长、模式等)
  • 🖼️ Civitai 图像查询 - 查询和筛选 Civitai 图片(用户名、模型等)

安装

  1. 安装依赖:
npm install
  1. 设置 API 密钥(可选):
export DUOMI_API_KEY="your_api_key_here"

使用方法

启动 MCP 服务器

npm start

在 Claude Desktop 中配置

在 Claude Desktop 的配置文件中添加:

{
  "mcpServers": {
    "duomi-video": {
      "command": "node",
      "args": ["path/to/your/server.js"],
      "env": {
        "DUOMI_API_KEY": "your_api_key_here"
      }
    }
  }
}

可用工具

1. generate_video

生成视频的主要工具。

参数:

  • prompt (必需): 视频描述文本
  • negative_prompt (可选): 负面提示词,默认为空
  • duration (可选): 视频时长,5或10秒,默认5秒
  • aspect_ratio (可选): 视频比例,'16:9'、'9:16'或'1:1',默认'9:16'
  • mode (可选): 生成模式,'std'或'pro',默认'std'
  • model_name (可选): 模型名称,默认'kling-v1-6'
  • cfg_scale (可选): 创意相关度,0-1之间,默认0.5

示例:

使用 generate_video 工具,prompt="A cute cat playing in a sunny garden",aspect_ratio="9:16"

2. generate_video_with_ai_enhancement ⭐ 新功能

🎨 AI增强视频生成 - 自动翻译中文并添加专业的视觉描述。

参数:

  • raw_prompt (必需): 原始描述文本(支持中文)
  • duration (可选): 视频时长,5或10秒,默认5秒
  • aspect_ratio (可选): 视频比例,'16:9'、'9:16'或'1:1',默认'9:16'
  • mode (可选): 生成模式,'std'或'pro',默认'std'
  • enhancement_style (可选): 增强风格,默认'cinematic'
    • cinematic: 电影级效果(戏剧性灯光、专业构图)
    • artistic: 艺术风格(创意构图、鲜艳色彩)
    • realistic: 写实风格(自然光影、真实细节)
    • anime: 动漫风格(日式动画美学)
    • documentary: 纪录片风格(自然观察视角)
  • max_words (可选): 增强后提示词最大单词数,默认300

功能特点:

  • 🌐 智能翻译: 自动将中文转换为英文
  • 🎬 专业润色: 添加电影级描述和技术细节
  • 🎨 多种风格: 支持5种不同的视觉风格
  • 📝 详细输出: 显示原始提示词和增强后的对比

示例:

使用 generate_video_with_ai_enhancement 工具,raw_prompt="帮我生成一个猫捉老鼠的视频",enhancement_style="cinematic"

输出示例:

  • 原始提示词: "帮我生成一个猫捉老鼠的视频"
  • 增强后: "A beautiful scene of a playful cat chasing and catching a quick mouse, featuring cinematic lighting, dramatic composition, with depth of field and atmospheric ambiance..."

3. get_video_status

查询视频生成任务的状态。

参数:

  • task_id (必需): 视频生成任务的ID

示例:

使用 get_video_status 工具,task_id="your-task-id-here"

4. generate_video_python

通过 Python 脚本生成视频的替代方法。

参数:

  • prompt (必需): 视频描述文本
  • negative_prompt (可选): 负面提示词

5. civitai_image_query

查询 Civitai 的图像信息。

参数:

  • limit (可选): 返回数量,默认 5
  • postId (可选): 帖子 ID
  • modelId (可选): 模型 ID
  • modelVersionId (可选): 模型版本 ID
  • username (可选): 用户名
  • nsfw (可选): NSFW 过滤,'None'、'Soft'、'Moderate'、'Mature'、'X'
  • sort (可选): 排序,'Newest'、'Oldest'、'Most Reactions'、'Most Comments'、'Most Downloads'
  • period (可选): 时间范围,'Day'、'Week'、'Month'、'Year'、'AllTime'
  • page (可选): 页码

示例:

使用 civitai_image_query 工具,username="C29",limit=5,sort="Newest"

API 响应状态

  • submitted: 任务已提交
  • processing: 正在处理中
  • succeed: 生成成功
  • failed: 生成失败

错误处理

  • 429 Too Many Requests: API 频率限制,请稍后重试
  • 400 Bad Request: 任务不存在或参数错误
  • 认证错误: 检查 API 密钥是否正确

项目结构

duomi-image-to-video/
├── server.js              # MCP 服务器主文件
├── generate_video.py      # Python 视频生成脚本
├── package.json          # 项目配置
├── requirements.txt      # Python 依赖
└── README.md            # 使用说明

开发说明

本项目结合了 Node.js MCP 服务器和 Python API 调用脚本,提供了两种视频生成方式:

  1. 直接 API 调用 (推荐): 通过 Node.js axios 直接调用 Duomi API
  2. Python 脚本调用: 通过包装现有的 Python 脚本实现

许可证

ISC License