DeepSeek Harness Plugin

klingai-dev/deepseek-plugin

Stars ★ 2 Category Vision & Multimodal Added 2026-08-29

Turn every idea into an image or video with Kling AI. In DeepSeek Harness, use natural language for text-to-image, image-to-image, text-to-video, image-to-video, reference-image creation, task tracking, and result previews.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:klingai-dev/deepseek-plugin

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

This plugin publishes its README in Chinese only.

在 DeepSeek Harness Web 对话中用自然语言生成可灵图片和视频。插件支持文生图、 图生图、文生视频、图生视频和动作控制,也能上传参考素材、查询灵感值、跟踪任务 和预览结果。当前版本连接国内服务 https://klingai.com/mcp,请使用国内可灵账号授权。 可灵 MCP 官方使用指南

快速开始

1. 安装插件并启动 Harness Web

准备 Node.js 24、Git、pnpm 和国内可灵账号。若尚未安装 pnpm,先运行 npm install -g pnpm。 在终端运行以下命令,安装已发布的插件 v1.0.0。如果已安装兼容的 Harness CLI, 可以把两行命令开头的 npx --yes @deepseek-ai/dsh@0.1.0-rc.6 换成 dsh。 DeepSeek Harness 安装文档

npx --yes @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web add github:klingai-dev/deepseek-plugin#v1.0.0
npx --yes @deepseek-ai/dsh@0.1.0-rc.6 web --host 127.0.0.1 --port 3080

如果 Harness Web 已经在运行,安装完成后先停止旧进程,再运行第二条命令。

2. 在浏览器授权国内可灵账号

保持终端里的 Web 进程运行。首次连接可灵时,在自动打开的浏览器授权页登录并确认授权。 授权完成后回到 Harness Web(http://127.0.0.1:3080)。

3. 检查连接

首次使用 Harness Web 时,先在「设置 → 模型」配置对话用的模型,再选择工作区。 Harness Web 使用指南

新建对话,输入 /kling-ai,再发送下面这条消息。

检查我的可灵账号是否已连接,并查看剩余灵感值。只查询,不创建生成任务。

插件会先通过 who_am_i 检查账号和可用模型,再查询灵感值。收到账号和额度信息后即可开始创作。 可灵 MCP 工具说明

创建图片或视频

在加载了 /kling-ai 的对话中描述你想要的画面。需要用参考图时,带上素材并说明它是 视频首帧、待编辑的原图还是风格参考。

  • 文生图 生成一张 16:9 的产品海报。一只深绿色保温杯放在浅灰水泥台上,柔和的侧光照亮杯身。
  • 图生视频 用我提供的图片作为首帧,生成一段 5 秒的 16:9 产品视频。镜头缓慢推近,产品保持静止。
  • 查询已有任务 查询可灵任务 <任务编号> 的进度,并返回可用的结果链接。

提交前,插件会列出模型、提示词、画幅、时长或分辨率、生成数量,并提醒你会消耗灵感值。 确认后,插件会提交一次任务,用返回的任务编号(generationId)跟踪进度。完成后可在 Harness 工具卡中预览,也可以通过「打开生成结果」保存文件。

常见问题

  • 找不到 /kling-ai 确认插件装在 web profile,重启 Harness Web,再新建对话。
  • 授权页没打开、授权超时或提示未授权 停止并重启 Harness Web,让插件重新发起浏览器授权。 保持进程运行,在本轮打开的授权页面完成登录。插件的授权回调等待时间为 180 秒。
  • 灵感值不足 在国内可灵账号中补充可用灵感值后再提交。
  • 链接打不开或返回 403 复制结果链接时保留 ? 之后的全部参数。若临时链接已失效, 用原任务编号重新查询,并及时保存文件。

本地开发与验证

DeepSeek Harness 插件通过 Harness 官方 MCP tools bridge 和固定版本 mcp-remote 的标准 OAuth 流程连接国内服务。安装包只注册 cordis.patch.yml 中的 https://klingai.com/mcp,并且只创建一个 Plugin-DeepSeek-kling-ai MCP 客户端。

git clone https://github.com/klingai-dev/deepseek-plugin.git
cd deepseek-plugin
npm install
npm run build
npm run check
npm run verify:bridge
npm run verify:installed
dsh plugin --profile web add "$PWD"
dsh web --host 127.0.0.1 --port 3080

verify:bridge 使用本地模拟 OAuth/MCP。verify:installed 在临时 DSH_HOME 内安装和合成配置。

运行 dsh --profile web --dump-config 可在授权前检查有效配置。输出中应只出现 一个 Plugin-DeepSeek-kling-ai 客户端和国内 MCP 地址。

mcp-remote 通过 --static-oauth-client-metadata 将 DCR client_name 设为 Plugin-DeepSeek,携带 X-Kling-Integration: Plugin-DeepSeek,并将回调超时设为 180 秒。 工具名使用 mcp__Plugin-DeepSeek-kling-ai__ 前缀。

Harness 官方 MCP 客户端 0.1.0-rc.6 目前只桥接 tools,不消费 MCP resources, 也没有标准 MCP Apps 容器。本包因此不复制远端 App、不注册第二个 MCP server, 而是使用 Harness 官方 tool.call.toolview 扩展点提供一个宿主原生结果卡:它只从 同一次可灵工具调用保留下来的文本结果中读取完整 https://*.klingai.com 媒体 URL, 内嵌预览图片或视频,并保留原始链接。它不是 MCP App,也不会调用工具、自动刷新或 提交生成;真实生成仍由远端 MCP 完成并受 Skill 的确认与单次提交约束。

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.