@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
Requirements
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
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 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 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"
}
}
}
}
Configuration
configure_kling_api_keys โ Save Kling API credentials
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
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 (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.