跳到正文
FunCoding

Kling

官方 MCP Registry 已收录

Kling AI video generation MCP server for Model Context Protocol hosts

Star
15
版本
v0.7.1
最近提交
2026年11月30日

@mindstone/mcp-server-kling

npm version License: FSL-1.1-MIT

Kling AI video and image generation MCP server for Model Context Protocol hosts. Generate AI videos from text or images, extend them, add lip-sync, generate images, and manage generation tasks through a standardised MCP interface.

Status

Requirements

  • Node.js 20+
  • npm

One-click install

Add to Cursor Add to VS Code Add to VS Code Insiders

After clicking the button, your host will prompt you to fill: KLING_ACCESS_KEY, KLING_SECRET_KEY, KLING_REQUEST_TIMEOUT_MS.

Manual config for Claude Desktop / Claude Code / Goose / Continue.dev (Kling)
{
  "mcpServers": {
    "Kling": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-kling"
      ],
      "env": {
        "KLING_ACCESS_KEY": "",
        "KLING_SECRET_KEY": "",
        "KLING_REQUEST_TIMEOUT_MS": "60000"
      }
    }
  }
}

Quick Start

Install & build

cd <path-to-repo>/connectors/kling
npm install
npm run build

npx (once published)

npx -y @mindstone/mcp-server-kling

Local

node dist/index.js

Configuration

Environment variables

  • KLING_ACCESS_KEY — Kling API access key
  • KLING_SECRET_KEY — Kling API secret key
  • MCP_HOST_BRIDGE_STATE — optional path to a host bridge state file used for credential management
  • MINDSTONE_REBEL_BRIDGE_STATE — backwards-compatible alias for MCP_HOST_BRIDGE_STATE
  • MCP_WORKSPACE_PATH — optional directory for local media inputs (image_path, audio_path). Defaults to the system temp directory when unset. For standalone clients, including clients that do not negotiate files/readModes version 1, inputs must live inside this directory; files elsewhere are refused before any read. With negotiated version 1, the host selects a mode for each call: in central mode, input reads use only the host-authorized canonical path described under Host-authorized local inputs; in standalone mode, the standalone restrictions apply.
  • KLING_DOWNLOAD_ROOT — optional directory that download_kling_video output paths must live inside. It must itself resolve inside the workspace (MCP_WORKSPACE_PATH, or the system temp directory when unset); anything else is refused with guidance. Default: <workspace>/kling-downloads (auto-created). Sensitive paths (~/.ssh, ~/.aws, /etc, shell rc files) are refused even when the root would otherwise permit them.
  • KLING_REQUEST_TIMEOUT_MS — optional override (positive integer ms, max 30 min) for the outbound HTTP request timeout applied to both Kling API and host-bridge calls. Default: 60000 (60s). Raise this if you see TIMEOUT errors on slow submits; lower it if you want tighter bounds.

Host configuration examples

Claude Desktop / Cursor

{
  "mcpServers": {
    "Kling": {
      "command": "npx",
      "args": ["-y", "@mindstone/mcp-server-kling"],
      "env": {
        "KLING_ACCESS_KEY": "your-access-key",
        "KLING_SECRET_KEY": "your-secret-key"
      }
    }
  }
}

Local development (no npm publish needed)

{
  "mcpServers": {
    "Kling": {
      "command": "node",
      "args": ["<path-to-repo>/connectors/kling/dist/index.js"],
      "env": {
        "KLING_ACCESS_KEY": "your-access-key",
        "KLING_SECRET_KEY": "your-secret-key"
      }
    }
  }
}

Tools (10)

Configuration

  • configure_kling_api_keys — Set Kling API credentials (the host app saves them; without one they last only while the connector runs)

Video generation

  • generate_kling_video — Create an AI-generated video from a text description
  • generate_kling_image_to_video — Animate a still image into a video (public HTTPS URL or local file via image_path)
  • extend_kling_video — Continue a generated video, adding ~4-5 seconds per call
  • generate_kling_lip_sync — Make a person in a video speak, from text (text-to-speech) or an audio file

Image generation

  • generate_kling_image — Create an AI-generated image from a text description, with optional reference image

Models: the video tools default to kling-v2-6 and the image tool to kling-v2-1. kling-v3 (Kling 3.0) is available on all three generation tools through the model parameter; it costs about twice as many Kling units per second of video and per image, so it is not the default.

Task management

  • check_kling_task — Check if a generation task is complete (task types: text2video, image2video, video-extend, lip-sync, image)
  • list_kling_tasks — List your generation tasks with pagination
  • download_kling_video — Save a generated video or image to a local file (result URLs expire 30 days after generation). Only Kling result URLs (klingai.com hosts) are accepted.

Account

  • get_kling_balance — List resource packages on the account and their remaining quantities

All generation tools accept an optional callback_url (a complete HTTPS URL without a username or password; tokens in the path or query are fine) that Kling POSTs to on task status changes, as an alternative to polling.

Licence

FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on 2030-04-08.

Host-authorized local inputs

files/readModes version 1 is an experimental extension used by these connectors, not part of the MCP standard. A compatible host (the app running the connector) decides which input files a tool call may read. The connector opens only the host-approved physical path, after resolving symlinks. The host supplies this permission information with each call; it is not a tool argument you need to set. Missing or invalid permission information, or a file absent from the approved list, stops the read.

Clients that do not negotiate this extension keep the connector's existing standalone file restrictions. This extension changes input-read permissions; existing output destinations, upload formats, size limits and file checks apply.

Host-authorised local saves

When a host negotiates experimental files/writeModes version 1, declared save destinations use the canonical file or parent folder authorised for that concrete argument in the call's files/writeMode metadata. The host's path permissions apply instead of the connector's standalone path policy. Missing authorised destination folders are created before saving; their canonical identity is checked before the write. File type, size, identity, exclusive-create and overwrite mechanics still apply. Clients that do not negotiate this protocol, or select standalone mode, retain the existing sandbox.

同类 MCP Server

官方

markitdown

Convert various file formats (PDF, Word, Excel, images, audio) to Markdown.

MImicrosoft/markitdown199k近 7 天新增 876 个 star

HyperFrames by HeyGen

Official HyperFrames by HeyGen: the best AI video editor in chat. Captions, motion graphics, MP4.

HEheygen-com/hyperframes93k近 7 天新增 3,834 个 star

精选

tldraw

在画布上与智能体协作,绘制图形并实时执行代码。

TLtldraw/tldraw52k近 7 天新增 101 个 star

Next AI Draw.io

draw.io diagrams your AI agent draws on a live browser canvas that you can also edit by hand

DADayuanJiang/next-ai-draw-io37k近 7 天新增 101 个 star

精选

mcp-for-blender

让智能体在 Blender 里建模,搭建和修改 3D 场景。

AHahujasid/mcp-for-blender37k近 7 天新增 818 个 star

screenpipe

Search your local screen recordings, audio transcripts, and computer activity from screenpipe.

SCscreenpipe/screenpipe23k近 7 天新增 83 个 star