The Kling AI MCP connector routes your AI agent's tool calls to Kling AI's own MCP server through Scalekit. Each user signs in to Kling AI once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 15 tools.
- Tools
- 15
- What they doRead · write · destructive
- 4 · 11 · 04 read11 write0 destructive
- Users sign in with
- OAuth
- OAuth app
- Scalekit's or your own
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Kling AI MCP connection
In AgentKit > Connections, create a Kling AI MCP connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Scalekit credentials are available for Kling AI MCP server, so you don't need to register an OAuth app.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'klingmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Kling AI MCP:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'klingmcp_kling_list_actions',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "klingmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Kling AI MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="klingmcp_kling_list_actions",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolklingmcp_kling_get_taskQuery the status and result of a video generation task.Read-onlyKlingGetTask
Query the status and result of a video generation task.
Inputs
task_idstringrequired- The task ID returned from a generation request.
klingmcp_kling_get_tasks_batchQuery multiple video generation tasks at once.Read-onlyKlingGetTasksBatch
Query multiple video generation tasks at once.
Inputs
task_idsarrayrequired- List of task IDs to query. Maximum recommended batch size is 50 tasks.
klingmcp_kling_list_actionsList all available Kling API actions and corresponding tools.Read-onlyKlingListActions
List all available Kling API actions and corresponding tools.
Inputs
This tool takes no inputs.
klingmcp_kling_list_modelsList all available Kling models for video generation.Read-onlyKlingListModels
List all available Kling models for video generation.
Inputs
This tool takes no inputs.
klingmcp_kling_extend_videoExtend an existing video with additional content.WriteKlingExtendVideo
Extend an existing video with additional content.
Inputs
promptstringrequired- Description of what should happen in the extended portion of the video. Describe the continuation of motion and new content.
video_idstringrequired- ID of the video to extend. This is the 'video_id' field from a previous generation result.
callback_urlstring- Optional webhook URL for asynchronous result notification.
cfg_scalestring- Classifier-free guidance scale.
durationinteger- Duration of the extended segment in seconds. Supports 5 or 10.default
5 modestring- Generation mode. 'std' (standard, default), 'pro' (higher quality), or '4k' (native 4K, only for kling-v3 and kling-v3-omni).one of
stdpro4kdefaultstd modelstring- Kling model to use. Default: 'kling-v2-master'.one of
kling-v1kling-v1-6kling-v2-masterkling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3kling-v3-turbokling-v3-omnikling-o1defaultkling-v1 negative_promptstring- Things to avoid in the extended video.
klingmcp_kling_generate_motionTransfer motion from a reference video to a character image.WriteKlingGenerateMotion
Transfer motion from a reference video to a character image.
Inputs
image_urlstringrequired- URL of the character image to animate. The character in this image will be animated with the motion from the reference video.
video_urlstringrequired- URL of the reference video providing the motion. The character movements from this video will be transferred to the image.
callback_urlstring- Webhook callback URL for asynchronous notifications.
character_orientationstring- Orientation of the character. 'image' (default) uses the orientation from the character image, 'video' uses the orientation from the reference video.one of
imagevideodefaultimage keep_original_soundstring- Whether to keep the original sound from the reference video. Options: 'yes' or 'no'. Default depends on API.
modestring- Generation mode. 'std' (standard, default) for faster generation, 'pro' for higher quality.one of
stdprodefaultstd model_namestring- Optional Kling motion model name, such as 'kling-v2-6' or 'kling-v3'.
promptstring- Optional text description to guide the motion transfer. Use to add details about the desired output.
watermark_infostring- Optional watermark configuration forwarded to the API.
klingmcp_kling_generate_storyboardGenerate V3/V3 Omni automatic or custom multishot video.WriteKling Generate Storyboard
Generate V3/V3 Omni automatic or custom multishot video. Poll kling_get_task.
Inputs
requeststringrequired- No description.
klingmcp_kling_generate_turbo_videoGenerate V3 Turbo 720p/1080p, 3–15 seconds.WriteKling Generate Turbo Video
Generate V3 Turbo 720p/1080p, 3–15 seconds. Native audio is included with no off switch. Poll kling_get_task.
Inputs
requeststringrequired- No description.
klingmcp_kling_generate_videoGenerate AI video from a text prompt using Kling.WriteKlingGenerateVideo
Generate AI video from a text prompt using Kling.
Inputs
promptstringrequired- Description of the video to generate. Be descriptive about the scene, motion, style, and mood. Examples: 'A cat walking through a garden with butterflies', 'Astronauts shuttle from space to volcano', 'Ocean waves crashing on a beach at sunset'
aspect_ratiostring- Video aspect ratio. Options: '16:9' (landscape, default), '9:16' (portrait), '1:1' (square).one of
16:99:161:1default16:9 callback_urlstring- Webhook callback URL for asynchronous notifications. When provided, the API will call this URL when the video is generated.
camera_controlstring- Structured camera control. Not supported by Omni generation.
cfg_scalestring- Classifier-free guidance scale from 0 to 1. Not supported by Omni generation.
durationinteger- Video duration in seconds. kling-v3/kling-v3-omni: 3-15; kling-o1: 5 only; other models: 5 or 10.default
5 generate_audiostring- Whether to generate audio synchronously. Supported by kling-v3, kling-v3-omni, and kling-v2-6 (pro mode only). Omit for the model default. Turbo always includes native audio.
image_liststring- Omni reference images for kling-o1 or kling-v3-omni. Cite them as <<<image_1>>>, <<<image_2>>>, and so on.
modestring- Generation mode. 'std' (standard, default) for faster generation, 'pro' for higher quality, '4k' for native 4K (only supported by kling-v3 and kling-v3-omni, not compatible with motion control).one of
stdpro4kdefaultstd modelstring- Kling model to use. Options: 'kling-v1', 'kling-v1-6', 'kling-v2-master' (default), 'kling-v2-1-master', 'kling-v2-5-turbo', 'kling-v2-6', 'kling-v3', 'kling-v3-omni', 'kling-o1'.one of
kling-v1kling-v1-6kling-v2-masterkling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3kling-v3-turbokling-v3-omnikling-o1defaultkling-v1 negative_promptstring- Things to avoid in the video. Example: 'blurry, low quality, distorted faces'
video_liststring- One Omni reference video for kling-o1 or kling-v3-omni. Cite it as <<<video_1>>>. Use refer_type='feature' to reference it or 'base' to edit it.
klingmcp_kling_generate_video_from_imageGenerate AI video using reference images as start and/or end frames.WriteKlingGenerateVideoFromImage
Generate AI video using reference images as start and/or end frames.
Inputs
promptstringrequired- Description of the video motion and content. Describe what should happen in the video, how objects should move, what transitions to include.
aspect_ratiostring- Video aspect ratio. Usually should match your input image ratio.one of
16:99:161:1default16:9 callback_urlstring- Webhook callback URL for asynchronous notifications.
camera_controlstring- Structured camera control. Not supported by Omni generation.
cfg_scalestring- Classifier-free guidance scale from 0 to 1. Not supported by Omni generation.
durationinteger- Video duration in seconds. kling-v3/kling-v3-omni: 3-15; kling-o1: 5 only; other models: 5 or 10.default
5 end_image_urlstring- URL of the image to use as the last frame of the video. The video will animate towards this image.default
generate_audiostring- Whether to generate audio synchronously. Supported by kling-v3, kling-v3-omni, and kling-v2-6 (pro mode only).
image_liststring- Additional Omni reference images for kling-o1 or kling-v3-omni. Do not set type='first_frame' or 'end_frame' when the same frame is already supplied through start_image_url or end_image_url.
modestring- Generation mode. 'std' (standard, default), 'pro' (higher quality), or '4k' (native 4K, only for kling-v3 and kling-v3-omni).one of
stdpro4kdefaultstd modelstring- Kling model to use. Default: 'kling-v2-master'.one of
kling-v1kling-v1-6kling-v2-masterkling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3kling-v3-turbokling-v3-omnikling-o1defaultkling-v1 negative_promptstring- Things to avoid in the video.
start_image_urlstring- Required URL of the image to use as the first frame of the video.default
video_liststring- One Omni reference video for kling-o1 or kling-v3-omni.
klingmcp_kling_generate_with_assetsGenerate with platform element or voice IDs.WriteKling Generate With Assets
Generate with platform element or voice IDs. Specified V2.6 voices cost 1.68 Credits/second. Ownership is verified by the service.
Inputs
requeststringrequired- No description.
klingmcp_kling_goods_studioGenerate product studio video from ref_image and goods_title contents.WriteKling Goods Studio
Generate product studio video from ref_image and goods_title contents. Poll kling_get_task.
Inputs
requeststringrequired- No description.
klingmcp_kling_lip_syncSynchronize lip movements in a video to match a given audio track or text.WriteKlingLipSync
Synchronize lip movements in a video to match a given audio track or text.
Inputs
modestringrequired- Lip-sync mode. 'audio2video' to drive lips from an audio file or URL; 'text2video' to generate speech from text and drive the video.one of
audio2videotext2video audio_filestring- Base64-encoded audio file content. Required when mode='audio2video' and audio_type='file'.
audio_typestring- Audio source type. 'url' (default) to supply audio_url; 'file' to supply audio_file as a base64-encoded string.one of
urlfiledefaulturl audio_urlstring- URL of the driving audio. Required when mode='audio2video' and audio_type='url'.
callback_urlstring- Webhook URL that receives a POST when the lip-sync task completes.
textstring- Text to convert to speech. Required when mode='text2video'.
video_idstring- Task ID of a previously generated video to use as the source. Provide either video_url or video_id.
video_urlstring- URL of the source video whose lip movements will be replaced. Provide either video_url or video_id.
voice_idstring- Voice ID to use for text-to-speech synthesis (mode='text2video').
voice_languagestring- Language of the TTS voice. 'zh' for Chinese (default), 'en' for English. Used when mode='text2video'.one of
zhendefaultzh voice_speednumber- Speech speed multiplier from 0.8 to 2.0 (default 1.0). Used when mode='text2video'.default
1
klingmcp_kling_talking_photoAnimate a portrait photo to match a provided audio track (talking-photo).WriteKlingTalkingPhoto
Animate a portrait photo to match a provided audio track (talking-photo).
Inputs
audio_urlstringrequired- URL of the audio file that drives the talking animation.
image_urlstringrequired- URL of the portrait image to animate. Should be a clear frontal face photo.
callback_urlstring- Webhook URL that receives a POST when the talking-photo task completes.
durationinteger- Video duration in seconds. Options: 5 (default) or 10.one of
510default5 modestring- Generation quality mode. 'pro' (default) for higher quality; 'std' for faster generation.one of
stdprodefaultpro modelstring- Kling model version. Default is 'kling-v2-1-master'. Options: kling-v1, kling-v1-6, kling-v2-master, kling-v2-1-master, kling-v2-5-turbo, kling-v2-6.one of
kling-v1kling-v1-6kling-v2-masterkling-v2-1-masterkling-v2-5-turbokling-v2-6defaultkling-v2-1-master promptstring- Optional text description to guide the animation style or content.
klingmcp_kling_video_commerceGenerate creator/product voiceover from an avatar and speech_script.WriteKling Video Commerce
Generate creator/product voiceover from an avatar and speech_script. Poll kling_get_task.
Inputs
requeststringrequired- No description.
No tools match.