
kling-ai-global-plugin
io.github.Wlain/kling-ai-global-plugin
Official Kling AI Global plugin: image and video generation via OAuth; uses Global-account credits.
Documentation
Kling AI for Claude · Global
Create and edit images, generate videos, reuse Elements, and check your Kling
tasks and credits in Claude. This plugin uses your Global Kling account at
kling.ai. If your account is on klingai.com, use the
China plugin. Accounts,
credits, and tasks are separate between regions.
Official Kling MCP and CLI guide
For client-specific MCP setup steps across Claude, ChatGPT, Codex, Cursor, VS Code, Gemini CLI and other clients, see the mcp.tc community listing.
For Agent Plugins-compatible clients, see the Global plugin listing for install options and manifest details.
Quick start
Choose the instructions for the Claude interface you use.
Claude web and desktop
- Open the Kling AI listing in Claude and select Add to Claude.
- Select Connect under the plugin's Connectors, then sign in with your Global Kling account to authorize it in your browser.
- Start a new chat and check your connection. If the Kling connector is off in that chat, turn it on from the + menu.
For marketplace installation, open Plugins in the sidebar (or
Customize → Plugins), choose Add → Add marketplace, add
https://github.com/klingai-tech/claude-plugin, and install Kling AI.
Claude Code
With Claude Code installed, run these commands in your terminal.
claude plugin marketplace add klingai-tech/claude-plugin
claude plugin install kling-ai@klingai
claude
In Claude Code, enter /mcp, select the plugin's kling-ai server, and
choose Authenticate. Sign in with your Global Kling account in the browser,
then return to Claude Code and check that the server is connected.
On Claude Code 2.1.292 or later, claude plugin install kling-ai --marketplace klingai-tech/claude-plugin
adds the marketplace and installs the plugin in one command.
Qwen Code
Qwen Code can install this Claude Code Marketplace plugin as an extension:
qwen extensions install klingai-tech/claude-plugin:kling-ai
Restart Qwen Code, open /mcp, and authenticate the kling-ai server with your Global Kling account. Qwen Code converts the plugin's HTTP MCP configuration and supports OAuth discovery for remote MCP servers. Generation uses Global Kling credits. See the Qwen Code extension guide and MCP OAuth guide.
GitHub Copilot CLI and VS Code
- GitHub Copilot CLI — Add this official marketplace with
copilot plugin marketplace add klingai-tech/claude-plugin, then install withcopilot plugin install kling-ai@klingai. - VS Code with Copilot — Install the Global plugin in VS Code. VS Code asks you to confirm before installing. The first connection uses OAuth with your Global Kling account.
- If the link does not open, run Chat: Install Plugin from Source in VS Code and enter
https://github.com/klingai-tech/claude-plugin.
Antigravity CLI
Kling AI is already available in the Antigravity Partner Marketplace. In the Antigravity CLI, install the published plugin with agy plugin install kling-ai@antigravity-plugins-partners. Marketplace installation requires an active agy sign-in session; authenticate with your Global Kling account when prompted.
You can also import plugins from an existing Claude Code installation. Install Kling AI for Claude Code, then import it into Antigravity:
claude plugin marketplace add klingai-tech/claude-plugin
claude plugin install kling-ai@klingai
agy plugin import claude
agy plugin list
If Kling AI is already installed in Claude Code, run agy plugin import claude and agy plugin list. Antigravity imports the plugins in your Claude Code profile. Complete OAuth in Antigravity with your Global Kling account. Image and video generation uses Global Kling credits. For China accounts, install the China plugin in Claude Code before importing.
Try it
- Check the connection — “Show my Kling account, available models, and credit balance.”
- Generate an image — “Use Kling to create a portrait of a Shiba Inu sitting by a café window in afternoon light.”
- Animate an image — Attach an image and ask “Use Kling to turn this image into a 5-second video with a slow camera push-in.”
- Generate an HDR video — “Use Kling 4.0 to generate a 5-second, 1080p HDR video. Neon signs reflect off a rain-soaked street as the camera slowly moves forward.”
The connection check uses no credits. When you generate with the plugin, review the model, settings, and references in chat and confirm to submit the task. Save the task ID and ask “Is my Kling task ready? Give me the result link.” in the same chat. Result links expire after 24 hours.
Connection help
kling-aiis missing in Claude Code. Run/reload-pluginsor restart Claude Code, then open/mcpagain.- Authorization expired or you selected the wrong account. Disconnect the current authorization in the MCP or connector panel and sign in again. Before switching regions, check any pending tasks in the original region, disconnect that connection, and enable the plugin for the new region.
- Your usable balance is too low. Kling MCP uses paid credits in your Personal workspace. Top up the same Kling account and ask Claude to continue in the same chat.
Gemini CLI
This repository also provides a Gemini CLI extension for Global. Install it from the official repository:
gemini extensions install https://github.com/klingai-tech/claude-plugin
Start Gemini CLI, then run /mcp auth kling-ai-global-plugin to authorize your Global account. Run /mcp to check the connection. Generation uses credits from the Global account. For China accounts, install the China extension.
Connect MCP manually or use the CLI
Use one Kling integration per assistant. The plugin already registers
https://kling.ai/mcp/plugin for you.
- Manual MCP in Claude — For the manual setup shown in the Global guide, open Plugins (or Customize → Connectors) in Claude web or desktop. Add
https://kling.ai/mcpas a custom connector, select Connect, and authorize your Global Kling account. - ChatGPT — For the desktop plugin in Work mode or a custom MCP connection on the web, follow the Kling AI for ChatGPT installation instructions.
- Standalone CLI — To use Kling from the terminal, run
npm i -g @klingai/cli-global --registry=https://registry.npmjs.org, thenkling loginandkling --help.
Official instructions for other MCP clients and CLI commands
Connect in VS Code and GitHub Copilot
Add the official Global MCP to VS Code
The link opens a configuration preview. Review the endpoint, install it, and complete OAuth with your Global Kling account. Image and video generation uses Global Kling credits.
Install a standalone Skill
If you use the skills CLI, you can install the kling-ai Skill separately:
npx skills add https://github.com/klingai-tech/claude-plugin --skill kling-ai
This installs the selected Skill and its references only; it does not register the OAuth MCP connection or install the complete plugin. For the full integration, including the MCP connection and bundled Skills, use the Claude Code steps above.
You can also browse the Kling AI plugin listing on Skills Playground.
What the plugin includes
This plugin contains:
- a remote OAuth MCP connection to the Global endpoint
https://kling.ai/mcp/plugin; - three Claude Code Skills with shared connection and billing rules:
| Skill | Purpose |
|---|---|
kling-ai | Official workflow discovery and routing, Elements, motion-library browsing, uploads, credits, task status, and account switching |
kling-ai-generate-image | Text-to-image, image-to-image, reference handling, prompt construction, and image scene guidance |
kling-ai-generate-video | Text-to-video, image-to-video, omni reference, keyframes, supported audio inputs, motion control, and single-shot or multi-shot planning |
It does not bundle a local MCP server, MCP App, command, hook, agent, or API key. Generation runs on the remote Kling service.
Install for local review
Load a checkout for one Claude Code session.
git clone https://github.com/klingai-tech/claude-plugin.git
cd claude-plugin
claude --plugin-dir "$PWD"
If you have a plugin ZIP and your Claude Code version supports ZIP plugin
directories, pass the archive path to claude --plugin-dir.
Use
Ask Claude in natural language. You can name the model you want to use.
Official creative workflow Skills
Ask “What official Kling Skills are available?” or “Use an official Kling Skill
to make a product brand film.” When the connected MCP exposes skill_catalog,
Claude lists the current workflows, selects a matching Skill, reads its entry
and required package files, and follows that workflow. The catalog supplies the
current names, descriptions, and versions; availability can vary by connection.
The local Skill first routes each new creative objective, including prompt-only
writing and standalone images/videos with complete prompts. If you explicitly ask
to preserve a completed prompt/plan and skip creative workflows, it instead uses
direct execution: it keeps your prompt and confirmed settings, checks only what
execution requires, and submits the approved intent at most once. A complete prompt
or “directly generate” alone does not skip routing. Otherwise it checks the remote
catalog before applying bundled creative rules: a match hands off to the remote
package; an absent catalog tool or no match uses the bundled workflow. An exact
user-supplied ID is read directly when supported; other new objectives use a fresh
catalog. Text-only requests still end with text, without preparing or submitting
generation just because a workflow was selected.
If you explicitly ask to execute a completed plan and skip creative workflows,
the assistant preserves the original prompt and settings, skips both creative
routes, and performs only necessary execution and authorization checks.
Skill names, IDs, counts, and categories
are not fixed in the plugin, so newly added Skills can be used without a plugin
update.
Selecting an official Skill hands the task over to that package. The three bundled Skills stop supplying workflow instructions for that task, including their image/video prompt rules and generation defaults. References inside the official package are read from that same package, even when their filenames match a bundled Skill. Follow-ups continue with the selected official workflow. User inputs, generated artifacts, and review evidence remain readable after handoff.
For the same objective, follow-ups retain the selected direct, bundled, or
remote route. A remote route retains its exact package ID/version and required
file load progress. A newly available catalog does not switch an existing local
route. Conversation and handoff summaries preserve the current step, decisions,
confirmed settings, completed stages, task IDs and submission state. A failed
required read or unexpected package version blocks execution with progress kept.
If the catalog tool is absent or has no matching workflow, Claude uses the bundled route unless you explicitly requested an official Skill. A failed catalog request or missing file during an official workflow is reported without silently switching routes. Catalog discovery does not submit a generation; user authorization and live MCP requirements still apply.
Suggested prompts
English
- Use Kling Image 4.0 to generate a series of three 8K images in one request. Show the same red panda in a vintage spacesuit exiting a space station through an airlock, drifting past a porthole, and turning to look at the blue Earth. Keep the panda's appearance and spacesuit consistent across all three images.
- Use Kling 4.0 to generate a 20-second cinematic video. A mech warrior drops from high above and slams into the ground. The shockwave instantly sends rubble and dust flying as the camera pushes in fast to emphasize the impact.
- Use Kling 4.0 Flash to create a 20-second, 720p video with my sneaker product photo as the first frame. Have the camera slowly orbit the shoe and hold on a close-up of the upper.
- Open my Kling AI motion library and show me previews of my saved motions. After I pick one, use a compatible motion control model to apply it to the subject image I provided and generate a video.
- Use Kling AI to create my first reusable Element named “Xiaobai” from the front and side views of my character, so I can keep the character consistent in future projects.
简体中文
- 使用可灵图片 4.0 一次生成 3 张 8K 连续组图。让同一只身穿复古宇航服的小熊猫依次从空间站出舱、掠过舷窗、转身望向蓝色地球
- 使用可灵 4.0 生成一段 20 秒电影感视频:机甲战士从高空重砸地面,冲击波瞬间震开碎石与尘雾,镜头快速推近,充满力量感
- 使用可灵 4.0 Flash,把我提供的运动鞋商品图作为首帧,生成一段 20 秒、720p 的视频,镜头缓慢绕过鞋身,最后停在鞋面细节上
- 使用可灵AI查看动作库,预览已保存的动作;选定后,用可用的动作控制模型将该动作应用到我提供的主体图片生成视频
- 使用可灵AI将我提供的角色正面图和侧面图保存为第一个可复用主体,命名为“小白”,方便后续创作时保持角色一致
Image and video models
When you leave the model choice open, the plugin prefers Kling Image 4.0 for image generation and reference-guided editing when it is available and meets your requirements. Otherwise, it prefers the selected tool's compatible default model. A continuous image series requires support for the requested image count and resolution in one task. The Kling Image 4.0 User Guide describes native 8K and Series Mode. The plugin can submit the 8K example only if the connected account's live MCP capabilities support 8K with Series Mode and the requested count. If 8K is unavailable, the Skill explains the limit before any generation.
| Video model | Generation modes | Output |
|---|---|---|
| Kling 4.0 | Text-to-video, image-to-video with first, last, and intermediate keyframes, and Omni Reference with images, videos, audio, and Elements | 3–30 seconds at 720p, with 1080p and 4K for eligible accounts and optional HDR where supported |
| Kling 4.0 Flash | Text-to-video, image-to-video from a single first-frame image, and Omni Reference with images, videos, and Elements | 3–20 seconds at 720p |
For HDR output, the plugin checks whether the connected account's live MCP supports HDR at 1080p or 4K on the selected generation mode.
Both Omni Reference models support smart shot splitting. Where the selected model exposes the audio controls, choose either synchronized sound generation or retention of the reference video's original sound. A separate audio reference requires a declared audio input, such as on Kling 4.0 Omni Reference.
Element workflows cover creation, listing, details, updates, deletion, and reuse with compatible models. Motion-library management is read-only; the Skill does not invent motion creation or deletion tools. Motion control needs a subject image and exactly one motion source. Available models, arguments, and resource limits always come from the live MCP tools.
Video discovery includes omni_ref_video when available, even for text-only
requests. The plugin prefers a compatible Kling 4.0 Omni Reference model when
the user leaves model selection open. Kling 4.0 Flash is preferred when it fits
the request and the user prioritizes speed or credit savings. Model access,
identifiers, output settings, and reference limits come from the current
account's who_am_i response. If no model in the Kling 4.0 family fits, the
plugin can use a compatible live default when the user allows it. An explicitly
requested unavailable model is reported without silently substituting another model.
The Skills require explicit approval of the final settings before a credit-consuming generation and submit each approved intent at most once. They check the connected account's balance immediately before submission.
Library queries and uploads do not authorize generation. They discover the live tool schemas at runtime and let the host render any MCP App resource returned by the remote server.
The skills.sh Snyk audit flags credit-consuming generation as W009. Balance lookup and approved generation run through Kling's OAuth MCP. Manage credit purchases directly on the Global Kling website.
If credits are insufficient, recharge the same account through the official Kling site, then ask Claude to continue in the same conversation. Claude checks any known task number first and rechecks the balance before a new submission. If a status refresh fails, Claude reports the task number and the last confirmed status when available.
Generation sends the prompt, selected settings, and reference media URLs or Element IDs to Kling. Local reference files are uploaded only when needed through the upload flow returned by Kling. Generation and asset storage run on the remote service; account and task queries also contact Kling.
Quality defaults follow the reference plugin: live-supported 2k images and
1080p video for normal delivery, with higher quality for commercial work and
lower-cost modes when requested. Final settings are shown before submission.
Validate
claude plugin validate . --strict
claude plugin validate .claude-plugin/plugin.json --strict
npm run check
npm test
The repository-local check validates metadata, the remote connection, Skill identities and bundled links, including support for V4 names in public documentation. It does not submit paid generation tasks or prove account access to a model; live routing and generation still require an authorized Claude Code connection.
npm run test:routing runs the agent against an isolated stdio MCP fixture.
It checks actual tool-call order, successful workflow and reference reads,
complete handoff, continuation, and failure handling. The fixture has no
provider client and creates no media or paid Kling jobs. The host needs working
model access. Use npm run test:routing -- --host codex for additional Codex
evidence; this does not replace Claude Code host acceptance. Pass
--case complete-prompt for one case or --help for source and output options.
For Claude's component validation, inspect the per-file contents in
claude plugin validate skills --strict --json. An empty contents array
does not establish that the Skills were checked. Local validation also does
not replace the developer portal's directory checks or security review; see
the official pre-submission checklist.
The public ZIP must contain only the plugin manifest, remote MCP declaration,
Skill files, README, and LICENSE. It must not contain mcp-app, a local server,
credentials, or generated media.
Claude Desktop and Cowork
Claude supports plugins in chat, Claude Desktop, and Cowork, with component support varying by surface; see Use plugins in Claude. Use the native plugin and connector controls on those surfaces. This repository's validation covers the Claude Code package.
Install in Kiro
This one-click link adds the Global remote MCP server. Kiro handles OAuth for this endpoint. Image and video generation consumes credits in the signed-in Global Kling account.
To install the full Agent Plugin with its bundled Skills, open Powers →
Add Custom Power → Import power from GitHub and enter
https://github.com/klingai-tech/claude-plugin. Kiro reads the root
plugin.json and mcp.json; see the Kiro install guide.
Privacy and support
No installation packages available.