About Kling
Kling is an MCP server for generating and managing AI images and videos with Kling. It is intended for hosts that need text- or image-based generation, video extension, lip-sync, and task tracking, with workspace-bounded local file access.
Key features
- 01Generate videos from text or still images
- 02Extend generated videos
- 03Add lip-sync from text or audio
- 04Generate images with optional references
- 05Track generation tasks and download results
- 06Check remaining account resources
Use cases
- 01Create a video from a text description
- 02Animate a still image or extend a generated clip
- 03Generate an image and save the result locally
MCP support
Exposes 10 Kling generation, task, account, and download tools to MCP clients. The server uses Kling API credentials and can report task changes through an HTTPS callback URL.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @mindstone/mcp-server-klingKLING_ACCESS_KEYSecretKling API access keyKLING_SECRET_KEYSecretKling API secret keyKLING_REQUEST_TIMEOUT_MSOutbound HTTP request timeout in milliseconds (max 1800000)MCP_WORKSPACE_PATHWorkspace directory that local media inputs and downloads are constrained to. Defaults to the system temp directory when unset.KLING_DOWNLOAD_ROOTSandbox root for download_kling_video outputs. Must resolve inside MCP_WORKSPACE_PATH. Defaults to <workspace>/kling-downloads.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
10Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| access_key | string | Yes | Kling API Access Key (identifies the account) |
| secret_key | string | Yes | Kling API Secret Key (signs API requests) |
Details
From the project README@mindstone/mcp-server-kling
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
- Version: 0.4.1 · npm
- Auth: API key (
KLING_ACCESS_KEY) - Tools: 10 (video-generation, image-generation, tasks, account, downloads)
- Surface: cloud-api
- Machine-readable:
STATUS.json
Requirements
- Node.js 20+
- npm
One-click install
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 keyKLING_SECRET_KEY— Kling API secret keyMCP_HOST_BRIDGE_STATE— optional path to a host bridge state file used for credential managementMINDSTONE_REBEL_BRIDGE_STATE— backwards-compatible alias forMCP_HOST_BRIDGE_STATEMCP_WORKSPACE_PATH— optional directory that local media inputs (image_path,audio_path) must live inside. Defaults to the system temp directory when unset. Files elsewhere are refused before any read.KLING_DOWNLOAD_ROOT— optional directory thatdownload_kling_videooutput 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 seeTIMEOUTerrors 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— Save Kling API credentials
Video generation
generate_kling_video— Create an AI-generated video from a text descriptiongenerate_kling_image_to_video— Animate a still image into a video (public HTTPS URL or local file viaimage_path)extend_kling_video— Continue a generated video, adding ~4-5 seconds per callgenerate_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
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 paginationdownload_kling_video— Save a generated video or image to a local file (result URLs expire 30 days after generation). Only Kling result URLs (klingai.comhosts) are accepted.
Account
get_kling_balance— List resource packages on the account and their remaining quantities
All generation tools accept an optional callback_url (HTTPS) 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.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.