gcv-kie-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gcv-kie-mcp Estimate the cost for generating a 30-second music track"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gcv-kie-mcp
MCP-сервер для kie.ai: 12 инструментов для генерации изображений, видео и музыки с оценкой стоимости до запуска и лимитами расхода.
claude mcp add gcv-kie -s user -e KIE_API_KEY=sk-your-key -- npx -y gcv-kie-mcpТребуется Node ≥ 20. Работает с любым MCP-клиентом: Claude Code, Claude Desktop, Codex, Cursor, Antigravity, Windsurf.
Зачем
Прямой доступ агента к платному API опасен: списание происходит в момент создания задачи, до того как станет ясно, что результат получится. Сервер закрывает это:
Цены живые. Прайс запрашивается у kie.ai при обращении и не хранится на диске — устаревшая цена не может пережить перезапуск и тихо испортить смету
Оценка до запуска.
kie_estimateсчитает стоимость по этому прайсу. Цены нет — инструмент возвращаетknown: false, а не догадкуЛимит на вызов.
maxCostCreditsотклоняет генерацию при превышенииЗащита от повтора. Одинаковый вызов в пределах суток не создаёт вторую задачу
Журнал трат.
kie_ledgerпоказывает, что и сколько стоило
Описание kie_generate явно требует предварительных kie_catalog_show,
kie_estimate и согласия пользователя на сумму — это видит модель, а не только
человек в документации.
Related MCP server: kie-ai-mcp-server
Инструменты
Инструмент | Что делает | Тратит деньги |
| Ключ, связь, состояние каталога, курс | нет |
| Остаток на счету | нет |
| Модели с ценами и лимитами | нет |
| Карточка модели: схема | нет |
| Принудительно перечитать и цены, и схемы моделей | нет |
| Записать модель вручную, если автоматика её не нашла | нет |
| Оценка стоимости | нет |
| Создать генерацию и забрать результат | да |
| Состояние задачи по | нет |
| Дождаться завершения задачи | нет |
| Залить файл, получить URL для референса | нет |
| Журнал трат | нет |
Подключение
Claude Code
Все оболочки Claude Code читают общий конфиг — достаточно одной регистрации из любого терминала:
claude mcp add gcv-kie -s user -e KIE_API_KEY=sk-your-key -- npx -y gcv-kie-mcp-e передаёт ключ переменной окружения дочернего процесса: она не видна в
списке процессов ОС. -s user — сервер доступен из любого проекта, -s local —
только из текущего.
claude mcp get gcv-kieОжидается Status: ✔ Connected.
Claude Desktop
Расширение .mcpb — ключ вводится в форме при установке и хранится в
системном хранилище учётных данных, а не в открытом файле. Готовый файл
приложен к каждому релизу:
скачать и открыть двойным кликом либо перетащить в окно приложения.
Собрать самому:
git clone https://github.com/extreez/MCP-KIE.git && cd MCP-KIE && npm run mcpbРучной JSON — в claude_desktop_config.json:
{
"mcpServers": {
"gcv-kie": {
"command": "npx",
"args": ["-y", "gcv-kie-mcp"],
"env": { "KIE_API_KEY": "sk-your-key" }
}
}
}Ключ здесь лежит открытым текстом — расширение безопаснее.
Codex
codex mcp add gcv-kie --env KIE_API_KEY=sk-your-key -- npx -y gcv-kie-mcpЛибо в ~/.codex/config.toml:
[mcp_servers.gcv-kie]
command = "npx"
args = ["-y", "gcv-kie-mcp"]
env = { KIE_API_KEY = "sk-your-key" }Проверка: codex mcp list, подробнее — codex mcp get gcv-kie.
Antigravity
Конфиг общий для IDE, CLI и SDK: ~/.gemini/config/mcp_config.json, в проекте —
.agents/mcp_config.json. Через интерфейс: «…» над панелью агента → MCP Servers
→ Manage MCP Servers → View raw config.
{
"mcpServers": {
"gcv-kie": {
"command": "npx",
"args": ["-y", "gcv-kie-mcp"],
"env": { "KIE_API_KEY": "sk-your-key" }
}
}
}Cursor
~/.cursor/mcp.json глобально или .cursor/mcp.json в проекте — формат тот же.
Windsurf
~/.codeium/windsurf/mcp_config.json — формат тот же.
Другой клиент
JSON-RPC 2.0 через stdio, поддерживаемые версии протокола: 2025-06-18,
2025-03-26, 2024-11-05.
npx -y gcv-kie-mcpПроверить без клиента:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npx -y gcv-kie-mcpКлюч доступа
Берётся на https://kie.ai/api-key
Порядок поиска:
.env проекта → KIE_API_KEY → ~/.gcv/config.json → аргумент --api-keyСервер не печатает значение ключа — только источник и маску (sk-1…9f2c).
Аргумент
--api-keyвиден в списке процессов ОС. В конфигах клиентов используйтеenv.
Откуда берутся цены
Прайс запрашивается у kie.ai при обращении к каталогу и живёт только в памяти процесса. На диск он не попадает — поэтому смета не может быть построена по цене месячной давности.
Схемы моделей (поля input, лимиты, допустимые значения) кэшируются на 30 дней
в ~/.gcv/cache/kie/specs.json. Они описывают устройство модели, а не деньги, и
меняются примерно раз в релиз. Цен в этом файле нет.
Что это значит на практике:
Когда | Сколько ждать |
Первое обращение после установки | около минуты — читаются схемы всех моделей |
Первое обращение в новой сессии | около 5 секунд — только прайс |
Последующие в той же сессии | мгновенно, прайс держится минуту |
kie_catalog_refresh нужен редко: цены и так живые. Он полезен, когда появилась
новая модель или её параметры выглядят неверно — тогда перечитываются и схемы.
Первый запуск
подбери модель для обложки и посчитай, сколько выйдет 3 вариантаАгент вызовет kie_catalog_list → kie_catalog_show → kie_estimate и покажет
смету. kie_generate — только после подтверждения суммы.
Первый вызов займёт около минуты: читаются схемы моделей. Дальше быстро.
Что модель принимает на вход
kie_catalog_show возвращает limits.inputFiles — полный список файловых
входов модели, включая картинки:
"limits": {
"refField": "reference_image_urls",
"maxRefs": 4,
"inputFiles": [
{ "name": "first_frame_url", "kind": "image", "maxItems": 1, "role": "start-frame" },
{ "name": "last_frame_url", "kind": "image", "maxItems": 1, "role": "end-frame" },
{ "name": "reference_image_urls", "kind": "image", "maxItems": 4, "role": "primary" }
]
}refField — не отдельный ответ, а указатель на запись с role: "primary".
modes на вопрос «что можно приложить» не отвечает: wan/2-7-image-to-video
числится image-to-video, то есть моделью создания, и при этом принимает ролик
для продолжения в first_clip_url.
Как класть файлы в kie_generate и kie_estimate:
Аргумент | Куда уходит |
| в |
| в запись с |
| в запись с |
| в названное поле: |
Первые три покрывают главный вход каждого вида. Всё остальное — конечный кадр,
маска, второй референс — адресуется через files по имени поля из
inputFiles. Поля, которого у модели нет, отклоняется до создания задачи:
kie.ai лишнее поле принимает, деньги списывает и файл игнорирует.
Цена-диапазон
У части моделей стоимость зависит от разрешения или наличия видео на входе.
kie_estimate пытается свести диапазон к точному числу по тем же параметрам,
что пойдут в генерацию:
Поле ответа | Смысл |
| Цена сведена к одному числу |
| По каким параметрам удалось сузить |
| Какого параметра не хватает, чтобы сузить |
| Диапазон окончательный, сузить нечем |
Лимит maxCostCredits и проверка баланса считают по верхней границе.
Файлы на диске
Путь | Что |
| Конфиг, права 600 |
| Схемы моделей, 30 дней. Цен здесь нет |
| Модели, записанные через |
| Журнал трат, только дозапись |
| Защита от двойной оплаты: ключ → taskId |
| Результаты по умолчанию |
Цены на диске не хранятся нигде.
Расположение переопределяется переменной GCV_HOME.
Доработка под себя
Пакет публикуется с исходниками, без сборки и минификации.
git clone https://github.com/extreez/MCP-KIE.git
cd MCP-KIEЗапустить свою копию, не устанавливая:
node mcp/server.mjsПодключить свою копию в клиент — вместо npx -y gcv-kie-mcp укажите
node /path/to/MCP-KIE/mcp/server.mjs.
Файл | За что отвечает |
| Протокол и описания инструментов |
| Живые цены, кэш схем. Только здесь, у CLI он другой |
| HTTP-вызовы kie.ai |
| Разбор прайса, сведение цены к точной |
| Preflight, оценка, запуск, опрос, скачивание |
| Журнал трат и защита от повтора |
| Сборка расширения для Claude Desktop |
Остальное содержимое src/ общее с
CLI: логика одна, обёрток две.
Источник правды — репозиторий CLI, здесь лежит копия, чтобы пакет ставился одной
командой. Если правите ядро — правьте там, сюда переносите скриптом:
node sync-src.mjs --checknode sync-src.mjs --from ~/src/gcv-kie-cliСкрипт намеренно не трогает catalog.mjs: у CLI он кэширует каталог на диске,
здесь — тянет цены живьём. Правки в mcp/server.mjs и src/catalog.mjs —
только здесь.
Добавили инструмент — добавьте его и в список tools в mcpb/build.mjs: этот
список показывается в диалоге установки расширения до первого запуска сервера.
CI сверяет оба списка.
Проверка после правок:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node mcp/server.mjsIssues и PR приветствуются.
Требование к изменениям: kie_generate остаётся единственным инструментом,
который тратит деньги, а лимиты не отключаются ради удобства.
Смежные инструменты
Инструмент | Назначение |
Те же операции из терминала, плюс | |
Скиллы для агента: пайплайн от брифа до галереи |
CLI и MCP-сервер делят один каталог, конфиг и журнал трат — можно ставить оба.
MIT © Leonid Kamenik
Available Tools
12 toolskie_balanceA
Remaining credits on the kie.ai account. Cheap, no side effects.
Inputs: no named parameters.
kie_catalog_listB
Models with prices and limits. Prices are fetched live from kie.ai and never stored on disk, so they are always current; model schemas come from a 30-day cache. The first call in a session takes a few seconds while the price list is fetched.
Inputs: mode, type, query.
kie_catalog_refreshA
Forces a full re-read: prices from kie.ai plus model schemas from the docs, ignoring the 30-day schema cache. Rarely needed — prices are fetched live on every call anyway. Use it when a model is missing or its parameters look wrong.
Inputs: no named parameters.
kie_catalog_setA
Record a model by hand: id, type, price in credits, limits. Stored separately from live data and applied on top of it — use this only for models the automatic price matching misses. Do NOT invent a price; take it from the documentation.
Inputs: model (required), type, notes, source, +6 more.
kie_catalog_showA
Full model card: input schema, limits (max references, aspect ratios, duration), price. Call this BEFORE kie_generate.
Inputs: model (required).
kie_doctorA
kie.ai readiness check: is an API key found and where from, does the API respond, can the live price list be fetched, is the credit-to-USD rate set. Call this first whenever something is wrong.
Inputs: no named parameters.
kie_estimateA
Cost estimate before generation. Spends no money. If known=false the price is unknown and generation must not start without user confirmation. If priceBasis="range", pass the same input and refs that will go into kie_generate: some models resolve an exact price from the parameters (resolution, presence of a reference) — see missingFields in the response.
Inputs: model (required), refs, count, input.
kie_generateA
SPENDS MONEY. Creates a generation task and, with wait=true, waits for the result and downloads the files. Before calling: kie_catalog_show (limits) and kie_estimate (price), plus the user's explicit consent to the amount. Use maxCostCredits as a safety limit. Downloading is ON by default (kie.ai keeps results for a limited time, up to 14 days per their docs): without out, the path from the config or ~/.gcv/output is used. noDownload=true skips the download entirely and leaves only the link.
Inputs: model (required), out, refs, wait, +7 more.
kie_ledgerB
Spend ledger: what was generated and what it cost. The source for a report to the user.
Inputs: limit, runId, since.
kie_statusB
Task state by taskId: state, progress, creditsConsumed, result links.
Inputs: taskId (required).
kie_uploadA
Upload a local file to kie storage and get a public URL (lives 3 days). Needed for references.
Inputs: path (required).
kie_waitA
Wait for a task to finish, polling. Returns the final state.
Inputs: taskId (required), pollSec, timeoutSec.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose: diagnostic check, balance lookup, catalog listing/detail/refresh/manual entry, cost estimation, generation, task status, waiting, file upload, and spend ledger. There is no overlap between tools; even the catalog sub-tools are differentiated by action (list, show, refresh, set).
All tools share the kie_ prefix and use snake_case, which ensures readability. However, the pattern is not perfectly uniform: catalog tools use a noun_verb format (kie_catalog_list, kie_catalog_show), while others use verb_noun (kie_estimate, kie_generate) or plain nouns (kie_balance, kie_ledger). Minor deviations exist but the overall structure remains predictable.
With 12 tools, the server is well-scoped for its purpose—covering the complete kie.ai generation lifecycle from readiness checks and catalog exploration to cost estimation, generation, and spend tracking. Each tool earns its place without unnecessary duplication or bloat.
The core workflow is fully covered: catalog lookup, cost estimation, generation, task waiting, and ledger review. The only notable gaps are the lack of a cancel/abort task operation and a list-all-tasks endpoint, but these may be outside the designed scope and can be worked around via the ledger and status tools.
Maintenance
Related MCP Connectors
MCP server for Pixapi: check live credit pricing and balance, then generate images and video.
MCP server for Wan AI video generation
MCP server for Google Veo AI video generation
MCP server for Luma Dream Machine AI video generation
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for AI-powered image, audio, and video generation, enabling media creation directly from Claude, Cursor, and other MCP clients.1144 npmMIT
- AlicenseNot gradedqualityDmaintenanceUniversal MCP server for all Kie AI image generation and editing models, enabling text-to-image, image-to-image, and image editing via natural language.69 npm2MIT
- AlicenseAqualityDmaintenanceMCP server for AI-powered media generation: images, videos, audio, and upscaling using 99 AI models.6MIT
- AlicenseAqualityDmaintenanceAn MCP server providing access to 554+ generative AI models with spend safety guardrails, enabling text-to-image, image-to-video, and more through a simple 4-call workflow.91MIT