{"_id":"@babylonjs-toolkit/kie","_rev":"2-dd735a55626f98e7c0cadc23243d640f","name":"@babylonjs-toolkit/kie","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@babylonjs-toolkit/kie","version":"1.0.0","keywords":["mcp","model-context-protocol","kie","nano-banana","kling","seedance","veo","image-generation","video-generation","claude","copilot","ai"],"author":{"name":"MackeyK24","email":"mackeyk24@gmail.com"},"license":"MIT","_id":"@babylonjs-toolkit/kie@1.0.0","maintainers":[{"name":"mackeyk24","email":"MackeyK24@gmail.com"}],"bin":{"kie-image-mcp":"dist/index.js"},"dist":{"shasum":"3c95af26542464a6f7d17e09ad6b8528c91bf26a","tarball":"https://registry.npmjs.org/@babylonjs-toolkit/kie/-/kie-1.0.0.tgz","fileCount":8,"integrity":"sha512-tzAPSnyMXECBCdNuPEOD5eHf3QDcRD3R2xGG9xGWTk53Lif0KihFQbEoa+tAdt+wMSL0zX2NNOJQwaWOy+CuAA==","signatures":[{"sig":"MEQCIClVMIvjj775ak5cJYyH/Mv+y2JfQaJ5En1Da+dM0KVoAiBDfC7R2iPyREAZmfGHUfqaJgbsxb9YYsR3hoLVOZN0xA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29158},"type":"module","engines":{"node":">=18"},"gitHead":"a6971cee71a8682fc0845f2f0962574bd04164e6","scripts":{"build":"tsc","start":"node dist/index.js","prepare":"npm run build","deploy-all":"npm publish --access public","prepublishOnly":"npm run build"},"_npmUser":{"name":"mackeyk24","email":"MackeyK24@gmail.com"},"_npmVersion":"11.13.0","description":"Babylon Toolkit MCP servers for kie.ai image + video generation (Nano Banana, Kling, Seedance, Grok, Veo 3.1).","directories":{},"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/kie_1.0.0_1784537502170_0.04160689057820455","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"_id":"@babylonjs-toolkit/kie@1.0.1","bin":{"kie-image-mcp":"dist/index.js"},"dist":{"shasum":"eb05232e121a740946356c1f906338ab2c09cc7c","tarball":"https://registry.npmjs.org/@babylonjs-toolkit/kie/-/kie-1.0.1.tgz","fileCount":11,"integrity":"sha512-V/cFXjcByp9Pro7PRVHIr2/L0Z4IWD+BOOpSneR+49GWzTWqRsFu12XPBvb9ndJ+Az80IQm47SGJoGq5nvtCmg==","signatures":[{"sig":"MEUCIAdFJeQNb0fUka8VrwSBojeCzpxT9yyiaACNh0mH6rrqAiEAvoS9tFH6IoEH1toQ7rLPcE+HVsQSYa8HQCayA3F+0hc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBGtAEmyUmYOzHqIKAuboOumvefjTEeqvyDq6mXkp1K0AiBEYnROOyyral9UvRlCyyoXLjhhGSZjvG0dxd+5mbkqjQ=="}],"unpackedSize":62274},"name":"@babylonjs-toolkit/kie","type":"module","author":{"name":"MackeyK24","email":"mackeyk24@gmail.com"},"engines":{"node":">=18"},"gitHead":"78c4741bfa284870cf6b1a3fa6237d955a0f98d0","license":"MIT","scripts":{"test":"npm run build && node --test tests/*.test.mjs","build":"tsc","start":"node dist/index.js","prepare":"npm run build","deploy-all":"npm publish --access public","prepublishOnly":"npm run build"},"version":"1.0.1","_npmUser":{"name":"mackeyk24","email":"MackeyK24@gmail.com"},"keywords":["mcp","model-context-protocol","kie","nano-banana","kling","seedance","veo","image-generation","video-generation","sound-generation","text-to-speech","music-generation","suno","elevenlabs","claude","copilot","ai"],"_npmVersion":"11.13.0","description":"Babylon Toolkit MCP servers for kie.ai image + video + sound generation (Nano Banana, Kling, Seedance, Grok, Veo 3.1).","directories":{},"maintainers":[{"name":"mackeyk24","email":"MackeyK24@gmail.com"}],"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kie_1.0.1_1789790909518_0.769813100422134"}}},"time":{"created":"2026-07-20T08:51:42.025Z","modified":"2026-09-19T04:08:29.767Z","1.0.0":"2026-07-20T08:51:42.310Z","1.0.1":"2026-09-19T04:08:29.602Z"},"author":{"name":"MackeyK24","email":"mackeyk24@gmail.com"},"license":"MIT","keywords":["mcp","model-context-protocol","kie","nano-banana","kling","seedance","veo","image-generation","video-generation","sound-generation","text-to-speech","music-generation","suno","elevenlabs","claude","copilot","ai"],"description":"Babylon Toolkit MCP servers for kie.ai image + video + sound generation (Nano Banana, Kling, Seedance, Grok, Veo 3.1).","maintainers":[{"name":"mackeyk24","email":"MackeyK24@gmail.com"}],"readme":"# Babylon Toolkit MCP Servers\n\n| Subcommand | Server | Tool | Models |\n|---|---|---|---|\n| `image` (default) | kie-image | `generate_image` | Nano Banana 2, Imagen 4, Seedream, Flux-2, Qwen, … |\n| `video` | kie-video | `generate_video` | Kling, Bytedance Seedance, Grok Imagine |\n| `google` | kie-google | `generate_google_video` | Google Veo 3.1 (`veo3` / `veo3_fast` / `veo3_lite`) |\n| `sound` | kie-sound | `generate_sound` | Suno effects/ambience/music, ElevenLabs speech |\n\nBecause MCP is an open protocol, the same package works from **Claude Code, GitHub\nCopilot Chat (VS Code), Cursor, Windsurf, Zed**, and any other MCP client — one package,\nevery AI. Built with only Node built-ins (`fetch`, `fs`, `readline`), so it pulls no\ntransitive packages. Requires **Node 18+**.\n\nThe command takes one subcommand to pick the server (defaults to `image`):\n```\nkie-image-mcp image     # or: video | google | sound   (no arg = image)\n```\n\n## Get an API key\nSet your kie.ai key as `KIE_KEY` (or `KIE_AI_API_KEY`), or put `KIE_KEY=...` in a `.env`\nfile in your working directory (or its parent). See `.env.example`. All four servers share the one key.\n\n## Install (local, default)\n\n```bash\nnpm install --save-dev @babylonjs-toolkit/kie\n```\n\nRegister the servers you need in your project `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"kie-image\": { \"command\": \"node_modules/.bin/kie-image-mcp\", \"args\": [\"image\"] },\n    \"kie-video\": { \"command\": \"node_modules/.bin/kie-image-mcp\", \"args\": [\"video\"] },\n    \"kie-google\": { \"command\": \"node_modules/.bin/kie-image-mcp\", \"args\": [\"google\"] },\n    \"kie-sound\": { \"command\": \"node_modules/.bin/kie-image-mcp\", \"args\": [\"sound\"] }\n  }\n}\n```\n\nFor a source checkout, `npm install` builds `dist/`; an MCP entry can instead use\n`\"command\": \"node\", \"args\": [\"/absolute/path/to/kie-image-mcp/dist/index.js\", \"sound\"]`.\nRestart your MCP client after adding the sound server. Use one configuration location\nfor your client; there is no need to duplicate the same servers in multiple files.\n\n## Install (global, when explicitly wanted)\nThe npm package is published as **`@babylonjs-toolkit/kie`**; it installs a command named\n**`kie-image-mcp`** (that command name is what you reference everywhere else). Install once\nso the command is on your PATH:\n```\nnpm install -g @babylonjs-toolkit/kie   # from npm once published\n# or, from a local clone (the prepare script builds it for you):\ncd kie-image-mcp && npm install -g .\n```\nVerify and update:\n```\nwhich kie-image-mcp                        # confirm the command is on PATH\nnpm install -g @babylonjs-toolkit/kie@latest   # update to a newer version\n```\n\n> **nvm users:** the global bin is tied to the active Node version (e.g.\n> `~/.nvm/versions/node/vXX/bin/kie-image-mcp`). If you switch Node versions, reinstall\n> for that version. If your MCP client is a GUI app that doesn't inherit your shell PATH,\n> use the absolute bin path (from `which kie-image-mcp`) in the config.\n\n## Configure (any MCP client)\n\nRegister one entry per server you want; the subcommand goes in `args`. `KIE_KEY` is read\nfrom your environment or a `.env` file (add `\"env\": { \"KIE_KEY\": \"...\" }` to an entry to\nset it inline).\n\n### Claude Code\nThe following examples use a global install. For a local install, use\n`node_modules/.bin/kie-image-mcp` as shown above.\n\nAdd to your project `.mcp.json` (or user `~/.claude.json`):\n```json\n{\n  \"mcpServers\": {\n    \"kie-image\":  { \"command\": \"kie-image-mcp\", \"args\": [\"image\"] },\n    \"kie-video\":  { \"command\": \"kie-image-mcp\", \"args\": [\"video\"] },\n    \"kie-google\": { \"command\": \"kie-image-mcp\", \"args\": [\"google\"] },\n    \"kie-sound\":  { \"command\": \"kie-image-mcp\", \"args\": [\"sound\"] }\n  }\n}\n```\nGUI-PATH fallback — use the absolute bin path from `which kie-image-mcp`:\n```json\n{ \"mcpServers\": { \"kie-image\": { \"command\": \"/Users/you/.nvm/versions/node/v24.11.0/bin/kie-image-mcp\", \"args\": [\"image\"] } } }\n```\n\n### GitHub Copilot Chat (VS Code)\n`.vscode/mcp.json`:\n```json\n{\n  \"servers\": {\n    \"kie-image\":  { \"command\": \"kie-image-mcp\", \"args\": [\"image\"] },\n    \"kie-video\":  { \"command\": \"kie-image-mcp\", \"args\": [\"video\"] },\n    \"kie-google\": { \"command\": \"kie-image-mcp\", \"args\": [\"google\"] },\n    \"kie-sound\":  { \"command\": \"kie-image-mcp\", \"args\": [\"sound\"] }\n  }\n}\n```\n\n### Cursor / Windsurf / Zed / generic\nSame shape under the client's `mcpServers` key, using the `kie-image-mcp` command.\n\n## Generate sound\n\nAsk your agent, for example:\n\n> Use generate_sound to make loopable nighttime forest ambience, and save it to assets/audio/forest.mp3.\n\nThe tool uses the existing KIE authentication and MCP text-result conventions: submit\na task, poll until it completes, download one audio file into `out_path`, and report\nthe saved path, model, task ID and source URL. Parent directories are created. The\nremote URLs are temporary, so use the saved local file in your game or application.\n\n| `kind` | Default model | API | Controls |\n|---|---|---|---|\n| `sound_effect` (default) | `V5` | Suno `/api/v1/generate/sounds` | Effects, ambience, loops, optional BPM and musical key |\n| `speech` | `elevenlabs/text-to-speech-multilingual-v2` | Market `/api/v1/jobs/createTask` | Text, voice and speech settings |\n| `music` | `V5` | Suno `/api/v1/generate` | Instrumentals, songs, custom lyrics and style |\n\n### Common arguments\n\n| Parameter | Default | Meaning |\n|---|---|---|\n| `prompt` | Required | Effect description, spoken text, or music description/lyrics |\n| `out_path` | Required | Local `.mp3` filename, including relative paths and `~/…`; replaced on successful download |\n| `kind` | `sound_effect` | `sound_effect`, `speech`, or `music` |\n| `model` | Per kind | Exact KIE model name from the lists below |\n| `track_index` | `0` | Zero-based variation to save; other returned track URLs are included in the result |\n| `callback_url` | Unset | HTTP(S) webhook you control; required for music, optional for effects/speech |\n\nEach call submits a new generation; `track_index` selects an output of that new task.\nTo download another variation from an existing result, use its returned URL rather than\nsubmitting the same prompt again. A polling/download error includes the task ID so you\ncan check that paid job before retrying. The tool never automatically resubmits a task.\n\n### Sound effects and ambience\n\nModels: `V5`, `V5_5`. The prompt is limited to 500 characters. Optional `loop` is a\nboolean (default false); `tempo` is an integer from 1 to 300 BPM; `key` accepts major\nor minor keys such as `C`, `F#`, `Am` and `D#m`. Omit `key` to leave it unspecified.\n\n```json\n{\n  \"prompt\": \"Nighttime forest ambience with gentle wind, distant owls and soft crickets. No music or speech.\",\n  \"out_path\": \"assets/audio/forest.mp3\",\n  \"kind\": \"sound_effect\",\n  \"loop\": true\n}\n```\n\nKIE's Sounds API also supports musical loops and background audio. It has no documented\nexact duration parameter; this tool rejects `duration` for effects. Looping is a\ngeneration request, not a local edit or a guarantee of a sample-perfect seam.\n[KIE Sounds API](https://docs.kie.ai/suno-api/generate-sounds)\n\n### Speech\n\nModels: `elevenlabs/text-to-speech-multilingual-v2` and\n`elevenlabs/text-to-speech-turbo-2-5`. `prompt` is the exact spoken text (up to 5000\ncharacters). Optional `voice` takes a supported KIE voice name or ID; the default is\nJames (`EkK5I93UQWFDigLMpZcX`). `stability`, `similarity_boost` and `speech_style` range\nfrom 0 to 1; `speed` ranges from 0.7 to 1.2. Omitted controls use the model's defaults.\n`speech_style` maps to ElevenLabs' numeric `style`, keeping it separate from music's\ntextual `style`. Only Turbo 2.5 accepts `language_code` (a two-letter ISO 639-1 code).\n\n```json\n{\n  \"prompt\": \"Welcome back, pilot. Your ship is ready for launch.\",\n  \"out_path\": \"assets/audio/welcome.mp3\",\n  \"kind\": \"speech\",\n  \"voice\": \"Rachel\",\n  \"stability\": 0.5,\n  \"speed\": 1\n}\n```\n\nSupported voices and controls: [Multilingual v2](https://docs.kie.ai/market/elevenlabs/text-to-speech-multilingual-v2),\n[Turbo 2.5](https://docs.kie.ai/market/elevenlabs/text-to-speech-turbo-2-5).\n\n### Music\n\nModels: `V4`, `V4_5`, `V4_5PLUS`, `V4_5ALL`, `V5`, `V5_5`.\n\nKIE's music schema requires `callBackUrl`, even when results are polled. Supply\n`callback_url` per call, or set `KIE_CALLBACK_URL` in your environment or `.env`.\nUse a webhook endpoint you control that accepts KIE's POST callbacks; the stdio MCP\nserver does not run a webhook listener. The environment default is applied only to\nmusic. Sound effects/ambience and speech need no callback URL.\n\n```json\n{\n  \"prompt\": \"An orchestral exploration theme with warm strings, subtle percussion and a hopeful melody.\",\n  \"out_path\": \"assets/audio/exploration.mp3\",\n  \"kind\": \"music\",\n  \"instrumental\": true\n}\n```\n\nThis example assumes `KIE_CALLBACK_URL` is configured. `instrumental` defaults to\ntrue. Set it to false for singing. In the default `custom_mode: false`, the prompt\ndescribes the track. With `custom_mode: true`, `style` and `title` become required,\nand a vocal track sings the supplied `prompt` as lyrics. Custom mode also accepts\n`negative_tags` and, for vocal tracks, `vocal_gender: \"m\" | \"f\"`. Only `V5_5` custom\nmode accepts `duration` (10–360 seconds).\n\nPrompt limits are 3000 characters in simple mode; custom mode allows 3000 for V4 and\n5000 for the other models. Custom style limits are 200 for V4 and 1000 otherwise;\ntitles are limited to 80. The tool rejects fields that would be ignored in the chosen\nmode. [KIE Music API](https://docs.kie.ai/suno-api/generate-music)\n\n### Output and limits\n\n- Saves the provider's MP3 bytes; no local transcoding, audio mixing or normalization.\n- Waits for full completion (not streaming/first-track success). Speech polls every\n  6 seconds for up to 5 minutes; Suno polls every 30 seconds for up to 15 minutes.\n  Individual HTTP requests/downloads have a 60-second timeout.\n- HTTP errors, task failures, missing results and invalid audio downloads become MCP\n  `isError` responses. A failed HTTP download does not overwrite the destination.\n- Local reference audio, voice cloning, audio isolation, music extension and WAV\n  conversion use other APIs and are not parameters of this generation tool.\n\n## Development and verification\n\n```bash\nnpm test       # TypeScript build + offline request/poll/download/MCP tests\nnpm run build # emits all four servers into dist/\n```\n\nTests use mocked KIE responses and temporary output directories; they spend no KIE\ncredits. They also verify discovery of the existing image, video, Google and `veo`\nsubcommands. Live provider output quality/account availability requires a real API\ngeneration. See [research and implementation notes](docs/sound-research.md) for the\nsource review, API differences and remaining live-verification limits.\n","readmeFilename":"README.md"}