Kling AI MCP connector
OAuth2.1/DCRAIMediaDesignKling AI is a video and image generation platform. This MCP connector exposes Kling AI capabilities — including video generation and image generation —...
Kling AI MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set 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> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_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)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'klingmcp_kling_list_actions',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_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)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- List kling — List all available Kling models for video generation
- Get kling — Query multiple video generation tasks at once
- Image kling generate video from — Generate AI video using reference images as start and/or end frames
- Video kling generate, kling extend — Generate AI video from a text prompt using Kling
- Motion kling generate — Transfer motion from a reference video to a character image
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
klingmcp_kling_extend_video#Extend an existing video with additional content.6 params
Extend an existing video with additional content.
promptstringrequiredDescription of what should happen in the extended portion of the video.video_idstringrequiredID of the video to extend.cfg_scalenumberoptionalClassifier-free guidance scale controlling prompt adherence.modestringoptionalGeneration mode controlling quality and resolution.modelstringoptionalKling model to use for the extension.negative_promptstringoptionalThings to avoid in the extended video.klingmcp_kling_generate_motion#Transfer motion from a reference video to a character image.7 params
Transfer motion from a reference video to a character image.
image_urlstringrequiredURL of the character image to animate.video_urlstringrequiredURL of the reference video providing the motion to transfer.callback_urlstringoptionalWebhook URL to receive task completion notifications.character_orientationstringoptionalOrientation source for the character.keep_original_soundstringoptionalWhether to keep the original sound from the reference video ('yes' or 'no').modestringoptionalGeneration mode controlling quality and resolution.promptstringoptionalOptional text description to guide the motion transfer.klingmcp_kling_generate_video#Generate AI video from a text prompt using Kling.10 params
Generate AI video from a text prompt using Kling.
promptstringrequiredDescription of the video to generate.aspect_ratiostringoptionalVideo aspect ratio.callback_urlstringoptionalWebhook URL to receive task completion notifications.camera_controlstringoptionalCamera control parameters as a JSON string.cfg_scalenumberoptionalClassifier-free guidance scale controlling prompt adherence.durationintegeroptionalVideo duration in seconds.generate_audiobooleanoptionalWhether to generate audio synchronously alongside the video.modestringoptionalGeneration mode controlling quality and resolution.modelstringoptionalKling model to use for video generation.negative_promptstringoptionalThings to avoid in the generated video.klingmcp_kling_generate_video_from_image#Generate AI video using reference images as start and/or end frames.11 params
Generate AI video using reference images as start and/or end frames.
promptstringrequiredDescription of the video motion and content.aspect_ratiostringoptionalVideo aspect ratio.callback_urlstringoptionalWebhook URL to receive task completion notifications.cfg_scalenumberoptionalClassifier-free guidance scale controlling prompt adherence.durationintegeroptionalVideo duration in seconds.end_image_urlstringoptionalURL of the image to use as the last frame of the video.generate_audiobooleanoptionalWhether to generate audio synchronously alongside the video.modestringoptionalGeneration mode controlling quality and resolution.modelstringoptionalKling model to use for video generation.negative_promptstringoptionalThings to avoid in the generated video.start_image_urlstringoptionalURL of the image to use as the first frame of the video.klingmcp_kling_get_task#Query the status and result of a video generation task.1 param
Query the status and result of a video generation task.
task_idstringrequiredThe task ID returned from a generation request.klingmcp_kling_get_tasks_batch#Query multiple video generation tasks at once.1 param
Query multiple video generation tasks at once.
task_idsarrayrequiredList of task IDs to query. Maximum recommended batch size is 50 tasks.klingmcp_kling_list_actions#List all available Kling API actions and corresponding tools.0 params
List all available Kling API actions and corresponding tools.
klingmcp_kling_list_models#List all available Kling models for video generation.0 params
List all available Kling models for video generation.