Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Kling AI MCP server

Vendor MCP
Open markdown

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 app
Scalekit's or your own

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. 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>
  3. Create the Kling AI MCP connection

    In AgentKit > Connections, create a Kling AI MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Kling AI MCP server, so you don't need to register an OAuth app.

  4. 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.actions
    const connector = 'klingmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { 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 call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'klingmcp_kling_list_actions',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • klingmcp_kling_get_taskQuery the status and result of a video generation task.Read-only

    KlingGetTask

    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-only

    KlingGetTasksBatch

    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-only

    KlingListActions

    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-only

    KlingListModels

    List all available Kling models for video generation.

    Inputs

    This tool takes no inputs.

  • klingmcp_kling_extend_videoExtend an existing video with additional content.Write

    KlingExtendVideo

    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 stdpro4kdefault std
    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-o1default kling-v1
    negative_promptstring
    Things to avoid in the extended video.
  • klingmcp_kling_generate_motionTransfer motion from a reference video to a character image.Write

    KlingGenerateMotion

    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 imagevideodefault image
    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 stdprodefault std
    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.Write

    Kling 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.Write

    Kling 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.