Skip to main content
Glama

Kling 5.0 MCP Server (Kling 5 API, works today with Kling 4.0) for Claude, Cursor and any MCP client

Status notice: Kling 5.0 is an unconfirmed watchlist item. Kuaishou has not announced a Kling 5.0 model, and Muapi has no Kling 5.0 endpoint. This repository does not claim any Kling 5 specs, pricing or availability. What it does today is expose the live Kling 4.0 video endpoints on Muapi as MCP tools, with the model slug prefix configurable so it can be pointed at a newer model if and when Muapi publishes one. Watch muapi.ai/kling-5 for status.

An MCP server that lets Claude Desktop, Cursor, and any MCP-compatible client generate Kling video through one Muapi API key. Get a key at muapi.ai/access-keys. Live model page: muapi.ai/kling-4.

Related MCP server: PixVerse MCP

Tools

Tool

What it does

Default Muapi endpoint

kling_text_to_video

Text prompt to video

kling-4.0-text-to-video

kling_keyframe_to_video

Animate a first frame; optional keyframe_urls and last_image

kling-4.0-keyframe-to-video

kling_reference_to_video

Guide a video with reference images/videos

kling-4.0-reference-to-video

kling_get_result

Check or wait for a request (request_id)

GET /predictions/{request_id}/result

Parameters (current Kling 4.0 contract): aspect_ratio (16:9, 9:16, 1:1, 21:9; reference-to-video also accepts auto; not used by keyframe-to-video), resolution (720p, 1080p, 4k), dynamic_range (sdr, hdr), duration (3 to 30 seconds). Reference-to-video needs at least one images_list (max 10) or videos_list (max 5) entry and accepts keep_original_sound.

Generation tools return immediately with a request_id; call kling_get_result until status is completed.

Install

git clone https://github.com/Anil-matcha/kling-5-mcp.git
cd kling-5-mcp
pip install -r requirements.txt
export MUAPI_API_KEY=your_key

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "kling": {
      "command": "python",
      "args": ["/absolute/path/to/kling-5-mcp/mcp_stdio.py"],
      "env": { "MUAPI_API_KEY": "your_key" }
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json (or the project's .cursor/mcp.json):

{
  "mcpServers": {
    "kling": {
      "command": "python",
      "args": ["/absolute/path/to/kling-5-mcp/mcp_stdio.py"],
      "env": { "MUAPI_API_KEY": "your_key" }
    }
  }
}

HTTP bridge / Docker

python mcp_server.py starts a small FastAPI bridge on port 8000 (/mcp/tools, /mcp/tools/{name}/call, /mcp/predictions/{id}). A Dockerfile and smithery.yaml are included.

Configuration

Variable

Default

Purpose

MUAPI_API_KEY

none (required)

Your Muapi key

KLING_MODEL

kling-4.0

Slug prefix; endpoints become <prefix>-text-to-video, <prefix>-keyframe-to-video, <prefix>-reference-to-video

MUAPI_BASE_URL

https://api.muapi.ai/api/v1

API base

MUAPI_POLL_INTERVAL / MUAPI_POLL_TIMEOUT

5 / 900

Polling seconds when waiting

About Kling 5.0: if Muapi later publishes a Kling 5.0 model, setting KLING_MODEL=kling-5.0 is the expected way to use it. That slug naming is an unverified assumption, not a confirmed endpoint, and a Kling 5 model may take different parameters than the Kling 4.0 schema enforced here. Until Muapi lists it, leave the default.

Raw API equivalent

curl -X POST https://api.muapi.ai/api/v1/kling-4.0-text-to-video \
  -H "x-api-key: $MUAPI_API_KEY" -H "Content-Type: application/json" \
  -d '{"prompt":"A cinematic tracking shot at dusk","aspect_ratio":"16:9","resolution":"720p","duration":5}'

curl https://api.muapi.ai/api/v1/predictions/<request_id>/result -H "x-api-key: $MUAPI_API_KEY"

Tests

pip install -r requirements.txt
python -m unittest discover -s tests -t . -v

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables any MCP client such as Claude, Cursor, Cline or Gemini CLI to generate Seedance 2.5, Seedance 2.0, MiniMax H3 and Veo 3.1 videos and still images from text or a reference image using your own account. It also exposes run-status polling and remaining-credit checks, with configurable duration, resolution, aspect ratio and audio.
      4
      98 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables generating AI videos, images, audio, and staged story episodes directly from Claude, ChatGPT, Cursor, Grok, or any MCP client, with 61 tools covering model catalogs, generation jobs, and media transforms such as upscaling, lipsync, motion control, and video editing. Hosted over Streamable HTTP with OAuth sign-in, so no API key or local installation is required.
      MIT