Kie MCPのロゴ

Kie MCP

コミュニティ
mrdainami

Minimal MCP server for calling any KIE.ai endpoint. Pure HTTP shim — no model registry; agent constructs payloads from docs.kie.ai.

公開者mrdainami
リポジトリkie-mcp
言語JavaScript
フォーク
14
スター
41
利用可能なツール
0
通信方式stdio, streamable-http
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Kie MCPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには41件のスターと14件のフォークがあります。

dainami-kie-mcp

Let your AI agent generate images, videos, and music with the latest AI models — Seedance, Kling, GPT Image 2, Nano Banana, Suno V4, and anything new KIE ships — without leaving the chat.

A tiny MCP server that lets Claude (Code or Desktop), Codex, or any MCP client call any model on KIE.ai on your behalf. Make a 9:16 video with Seedance 2.0 Pro. Edit a product photo with Nano Banana 2. Render a 5-panel storyboard with GPT Image 2. Compose a soundtrack with Suno V4.

It's intentionally dumb on purpose: 5 generic tools instead of one tool per model. The agent reads the JSON shape from docs.kie.ai when it needs to, and constructs the payload itself. When KIE ships a new model tomorrow, this package doesn't have to update — the agent just points at the new docs.


Get set up

Two things first, same for everyone:

  1. Get a KIE.ai API key. Go to kie.ai, sign in, open Dashboard, then API Keys. Create one and copy it. You will paste it during setup.
  2. Download the connector. On this page, click the green Code button, then Download ZIP. Unzip it and move the kie-mcp folder somewhere permanent, like your Documents folder. Your app will point at this folder forever, so don't leave it in Downloads.

Then find your app below:

Your appWhat setup looks likeNeeds Node.js?
Claude Desktop (chat and cowork)Drag one file inNo
Codex (ChatGPT desktop app)Fill in a settings formYes
Codex CLIPaste one commandYes
Claude CodePaste one commandYes

Node.js is a free runtime the connector runs on. If your app needs it, go to nodejs.org, click Get Node.js, download the installer for your computer, and click through it once. Claude Desktop skips this because it has its own copy built in.


Claude Desktop (drag and drop)

  1. Open the folder you downloaded and find kie-mcp.mcpb. (You can also grab just this file from the releases page and skip the ZIP entirely.)
  2. Drag it onto the Claude Desktop window, or go to Settings, then Extensions, and pick it.
  3. When Claude asks for your KIE API key, paste it.
  4. Quit Claude Desktop fully and reopen it.

To check it worked: open a chat, click the + button, then Connectors. "KIE.ai" should be listed with its tools.

This covers cowork too. Connectors installed in Claude Desktop are shared with cowork sessions, so there is nothing separate to set up.


Codex (ChatGPT desktop app)

  1. Install Node.js if you don't have it yet: click Get Node.js on that page, download the installer, click through it.
  2. Get the path to the connector file. In Finder, open your kie-mcp folder, then the dist folder inside it, and find index.js. Right-click it, hold the Option key, and choose Copy "index.js" as Pathname.
  3. In the ChatGPT desktop app, open the Codex side, click your account name (bottom left), then Settings, then MCP servers, then Add server.
  4. On the STDIO tab, fill in:
    • Name: kie
    • Command: node
    • Arguments: paste the pathname you copied in step 2
    • Environment variables: KIE_API_KEY with your key as the value
  5. Save. kie appears in your server list, and the same setup carries over to the Codex CLI and IDE extension automatically.

Then just ask for something: "Make me a 9:16 video of a coffee cup using Seedance." Codex asks permission before each kie tool call. Approve them; that is its normal safety prompt, and generation costs KIE credits from your account.


Codex CLI (one command)

Paste this in your terminal, with your key and your folder's location filled in:

bash
codex mcp add kie --env KIE_API_KEY=YOUR_KEY -- node ~/Documents/kie-mcp/dist/index.js

To check: codex mcp list should show kie as enabled. The same registration also shows up in the ChatGPT desktop app's Codex settings and the IDE extension; they share one config.


Claude Code (one command)

Paste this in Claude Code, with your key and your folder's location filled in:

bash
claude mcp add --scope user kie --env KIE_API_KEY=YOUR_KEY -- node ~/Documents/kie-mcp/dist/index.js

If you put the folder somewhere other than Documents, adjust the path. --scope user makes it available in every project.

To check: claude mcp list should show kie ✓ Connected.


Updating

When a new version ships: download the ZIP again and replace your kie-mcp folder's contents. Your API key lives in your app's settings, not in the folder, so nothing else needs to change. Claude Desktop users drag in the new .mcpb instead.


What the agent does with these tools

Generation on KIE is asynchronous — submit a job, then poll for the result. Typical flow for "make me an image with GPT Image 2":

  1. Agent (optionally) calls kie_fetch_model_docs to confirm the model's current JSON shape.
  2. Agent submits with kie_post:
    ts
    kie_post({
      path: "/api/v1/jobs/createTask",
      body: {
        model: "gpt-image-2",
        input: { prompt: "A serene cabin in the mountains, golden hour", aspect_ratio: "9:16", quality: "high" }
      }
    })
    // → body.data.taskId — save this immediately
  3. Agent polls with kie_get every ~20–30s until done:
    ts
    kie_get({ path: "/api/v1/jobs/recordInfo?taskId=..." })
    // data.state: waiting | generating | success | fail
    // on success → data.resultJson.resultUrls[]
  4. Agent saves the result with kie_download({ url, destPath }).

Cost is billed on submit, not on poll. Persist the taskId right after submitting, and never resubmit a live task.


The 5 tools

ToolWhat it does
kie_post(path, body)POST to any KIE endpoint — submit a generation task (usually /api/v1/jobs/createTask).
kie_get(path)GET from any KIE endpoint — poll task status (usually /api/v1/jobs/recordInfo?taskId=...).
kie_upload_file(localPath, uploadPath?)Upload a local file to KIE storage → returns a hosted URL (~3-day TTL) for use as an @Image/@Video reference.
kie_download(url, destPath)Download a result URL to local disk (creates parent folders).
kie_fetch_model_docs(path | url, force?)Fetch a model's live docs from docs.kie.ai (cached ~3 days) so the agent knows the exact payload shape.

Different model families use slightly different envelopes (Veo, Suno, Flux-Kontext) — the agent reads the model docs and adjusts. The MCP stays generic, so new KIE models work without updating this package.


Environment variables

VariableDefaultRequired
KIE_API_KEY—Yes
KIE_BASE_URLhttps://api.kie.aiNo (override for testing / proxy)
KIE_UPLOAD_URLhttps://kieai.redpandaai.co/api/file-stream-uploadNo
KIE_DOCS_BASEhttps://docs.kie.aiNo
KIE_WORKSPACE_DIRthe server's working directoryRecommended (see Security)

Security model

The agent driving these tools reads untrusted content — model docs, generation results, filenames. Anything it reads can try to instruct it, so the server does not trust the arguments it receives. Four limits are enforced:

  • The API key only reaches configured hosts. kie_post / kie_get accept an absolute URL, but its origin must match KIE_BASE_URL or KIE_UPLOAD_URL, and credentials are dropped whenever a redirect crosses origins.
  • Docs come from one place. kie_fetch_model_docs only fetches from KIE_DOCS_BASE, on every redirect hop — fetched pages enter the agent's context and are cached ~3 days, so an arbitrary source would be a persistent injection channel.
  • File access is confined to a workspace. kie_upload_file and kie_download resolve every path (symlinks included) and refuse anything outside KIE_WORKSPACE_DIR. It defaults to the working directory, which for a host-launched server is arbitrary — set it to your project folder. A workspace of / or your bare home directory is refused.
  • Only media crosses the boundary. Uploads are limited to known media types; downloads refuse dotfiles, dot-directories, build/config files, and executable or script destinations.

Found a problem? Please report it privately through GitHub Security Advisories rather than a public issue.


Develop locally

The repo ships the built dist/index.js (a single self-contained bundle), so users never build anything. To hack on the source:

bash
git clone https://github.com/mrdainami/kie-mcp
cd kie-mcp
npm install
npm run build   # rebuilds dist/index.js via esbuild

For dev with auto-reload:

bash
KIE_API_KEY=kie-... npm run dev

The package is also on npm as dainami-kie-mcp, so terminal users can skip the folder entirely: claude mcp add --scope user kie --env KIE_API_KEY=YOUR_KEY -- npx -y dainami-kie-mcp (same shape for codex mcp add).

To point any other MCP client at the folder, the config shape is always:

json
{
  "mcpServers": {
    "kie": {
      "command": "node",
      "args": ["/absolute/path/to/kie-mcp/dist/index.js"],
      "env": { "KIE_API_KEY": "kie-..." }
    }
  }
}

Note: ChatGPT chat conversations can't use this connector — they only accept servers hosted at a URL, and this one runs locally. The Codex side of the ChatGPT app works fine.


Why it's tiny

Most MCP wrappers around AI APIs hard-code one tool per model: generate_seedance(), generate_gpt_image_2(), generate_suno(). That means:

  • You have to update the wrapper every time the provider ships a new model
  • The wrapper's mental model of each model's JSON shape drifts from reality
  • The wrapper becomes the bottleneck

This package goes the opposite direction: five generic tools that work for everything KIE has, with KIE's docs as the source of truth for shapes. The agent is smart enough to read docs and construct payloads. The MCP just makes the HTTP call.

When KIE ships a new model tomorrow, no PR here. Just point your agent at the new docs.


License

MIT — see LICENSE.

By mrdainami. PRs and issues welcome.

インストール

TypingMind
{
  "mcpServers": {
    "kie-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dainami/kie-mcp"
      ],
      "env": {
        "KIE_API_KEY": "<KIE_API_KEY>"
      }
    }
  }
}

Kie MCPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Kie MCPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 お使いのデバイス上でMCPをローカル実行することも、リモートMCPサーバーのURLに接続することもできます。

方法1:ローカルコネクタを使用

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Kie MCPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Kie MCPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "kie-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dainami/kie-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてKie MCPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Kie MCPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Kie MCPを使ってこのタスクを手伝ってもらえますか?
Kie MCP
はい、読みました。
Kie MCPで調べた結果をお伝えします。

方法2:MCPサーバーのURLを追加

Kie MCPがすでにリモートでホストされている場合や、チームの複数のユーザーで1つのコネクタを共有したい場合は、この方法を使います。

1

MCPコネクタを開く

TypingMindで「プラグイン」に移動し、「MCPコネクタ」を開いて「URLを追加」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 「プラグイン」に移動してください。
  3. 「MCPコネクタ」を開いてください。
  4. 「URLを追加」をクリックします。
TypingMindの「カスタムMCPサーバーURLを追加」フォーム
2

サーバーURLを貼り付け

「サーバーURL」欄にプロバイダーから提供されたMCPサーバーのURLを入力してください。サーバーで必要とされる場合は、接続名、説明、アイコン、カスタムHTTPヘッダー、OAuthクライアント設定を追加してください。

  1. 「サーバーURL」欄にプロバイダーから提供されたMCPサーバーのURLを貼り付けてください。
  2. Kie MCPの接続名を入力してください。
  3. 接続を識別しやすくするには、説明とアイコンを追加してください。
  4. サーバーで認証が必要な場合は、カスタムHTTPヘッダーまたはOAuthクライアントの詳細情報を追加してください。
3

接続を作成

「接続を作成」をクリックし、プラグイン一覧に戻って、新しいMCP接続が有効になっていることを確認してください。

  1. 「接続を作成」をクリックします。
  2. MCPコネクタの一覧に戻ってください。
  3. Kie MCPの接続が「有効」と表示されていることを確認してください。
  4. 接続がすぐに表示されない場合は、プラグイン一覧を更新してください。
4

再接続せずにモデルを切り替え

お好みのモデルでチャットを開始し、「プラグイン」でKie MCPのツールを有効にしてください。必要に応じて別のモデルに切り替えられます。MCP接続は、TypingMindのワークスペースで引き続き利用できます。

  1. TypingMindで新しいチャットを開始してください。
  2. 使用するAIモデルを選択してください。
  3. 「プラグイン」でKie MCPのツールを有効にしてください。
  4. 必要に応じて、ツールを使うようモデルに依頼してください。
  5. 別のAIモデルに切り替えて、同じMCP接続を再利用してください。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Kie MCPを使ってこのタスクを手伝ってもらえますか?
Kie MCP
はい、読みました。
Kie MCPで調べた結果をお伝えします。

よくある質問

Kie MCP MCPサーバーは何に使いますか?

Kie MCPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでKie MCP MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでKie MCPを利用できます。

TypingMindでKie MCP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Kie MCPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Kie MCP MCPをTypingMindに接続するにはどうすればよいですか?

Kie MCPは、ローカルMCPコネクタを使うか、リモートMCPサーバーのURLを追加することでTypingMindに接続できます。サーバーがデバイス上のファイル、アプリ、プライベートリソースにアクセスする必要がある場合はローカルコネクタを、MCPサーバーがリモートでホストされている場合はサーバーURLを使用してください。

TypingMindでKie MCP MCPのどのようなツールを利用できますか?

Kie MCPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Kie MCP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Kie MCPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇