Chutes Media MCP

io.github.TheStreamCode由 GitHub 帳號 TheStreamCode 發布v2.1.0更新於 Nov 7, 2026

Generate image, video, music and speech through Chutes and save assets into your project.

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

透過 Chutes 媒體模型生成圖片、影片、音樂與語音,並把素材存進你的專案工作區。

可以做什麼
  • 依類型或關鍵字尋找可用的 Chutes 媒體生成模型
  • 檢視模型的即時 cords 與輸入 schema,包含必填欄位、型別、預設值與範例酬載
  • 執行生成並把素材存到輸出目錄,回傳檔案路徑
  • 以工作區中的 image、mask 等檔案路徑編輯既有媒體,由伺服器讀取並編碼
適用情境
適合在編碼代理需要為專案建立或編輯圖片、影片、音樂、語音素材時使用,並希望檔案直接寫入工作區、附帶來源紀錄,而不必手動搬移。
執行需求
以 stdio 在本機執行,透過 npm(npx 或全域安裝)啟動,需要 Node.js 20.3 或更新版本。必須在 CHUTES_API_KEY 環境變數中提供 Chutes API 金鑰。選用變數可調整驗證方式、API 基礎位址、輸出目錄、預熱、冷啟動重試、素材大小上限、進度間隔、未知參數處理與來源紀錄。需要連線至 Chutes 的網路。
安裝前請注意
生成會消耗 Chutes 的 GPU 呼叫,可能在你的 Chutes 帳戶產生費用。伺服器會把提示詞與引用的工作區檔案傳送給 Chutes,請勿放入敏感內容。它會寫入工作區檔案,只有在明確設定 overwrite 時才會覆蓋既有素材。API 金鑰從 CHUTES_API_KEY 讀取並僅保留在記憶體中,自訂 API 基礎位址不會收到該金鑰。本專案為獨立社群專案,與 Chutes 無隸屬關係。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Chutes Media MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Chutes Media MCP

Generate image, video, music, and speech through Chutes from any coding agent, with the asset saved straight into the project you are working on.

[CI] [License] [npm]

[Chutes Media MCP at work: an MCP client, the model's live schema, and media saved into the workspace]

Chutes Media MCP is a Model Context Protocol (MCP) server and command-line interface (CLI) that give coding agents access to Chutes media models. It ships as an MCP server on standard input/output (stdio), a thin CLI for agents without MCP support, and a bundled Agent Skill for the describe-then-generate workflow.

Instead of hardcoding a payload per model, the server fetches the model's live schema and validates each request before spending a GPU call, then writes the asset and a provenance record into your workspace. It works with Claude Code, Cursor, Cline, Windsurf, Codex, OpenCode, and Claude Desktop.

This is an independent community project. It is not affiliated with, sponsored by, or endorsed by Chutes.

Install

Run the server from npm without installing it globally:

bash
npx -y chutes-media-mcp

Install it globally to put both binaries on your path:

bash
npm install -g chutes-media-mcp

Register the server with Claude Code:

bash
claude mcp add chutes-media --env CHUTES_API_KEY=cpk_your_key -- npx -y chutes-media-mcp

For Cursor, Cline, Windsurf, OpenCode, and Claude Desktop, add the mcpServers entry documented in docs/mcp-and-cli.md. Running from GitHub instead of npm is supported with npx -y github:TheStreamCode/chutes-media-mcp. Upgrading from 1.x? See docs/migration-2.0.md.

Quick start

  1. Create a Chutes API key at chutes.ai and register the server as shown under Install.
  2. Ask your agent for an asset: "Generate a cinematic hero image of a misty mountain range and save it in this project."
  3. The agent discovers a suitable model, reads its live schema, validates the payload, and saves the result under assets/chutes/image/. The returned path is ready to reference from your code.

The same describe-then-generate flow is available from a shell through the chutes-media CLI. See docs/mcp-and-cli.md for the tool reference, CLI examples, and image editing.

Features

  • Four media kinds (image, video, music, speech), plus image editing when a model exposes an edit cord such as img2img or inpaint.
  • Live model contract: cords and input schema are fetched at runtime, never hardcoded.
  • Payload validation against the live schema before any GPU call is made.
  • Workspace-contained file access; existing assets survive unless overwrite is explicitly set.
  • A provenance sidecar per asset with model, cord, params, and schema hash.
  • Automatic cold-start retry with backoff for models that scale to zero.
  • Progress updates for long video and music jobs.
  • One shared core, so the MCP server and the CLI behave identically.

Requirements

  • Node.js 20.3 or newer for the published server and CLI. Node.js 20 is end-of-life; use Node.js 22 or 24 LTS in production.
  • A Chutes API key.
  • Contributors using the locked toolchain need Node.js ^20.19.0, >= 22.13.0, or >= 24.

Configuration

VariableRequiredDefaultPurpose
CHUTES_API_KEYYesnoneChutes API key. Read from the environment; never written to disk.
CHUTES_AUTH_SCHEMENorawHow the key is sent in Authorization: raw (the key as-is) or bearer (value prefixed with Bearer and a space). On a 401, try the other value.
CHUTES_API_BASE_URLNohttps://api.chutes.aiManagement API base URL. HTTPS is required except for loopback development; custom endpoints never receive the Chutes API key.
CHUTES_OUTPUT_DIRNoassets/chutesOutput directory inside the agent's working directory. A <kind>/ subfolder is appended.
CHUTES_WARMUPNotrueWarm models up before invoking them. Set to false to skip warmup.
CHUTES_COLD_START_RETRIESNo4Retries when a cold model returns 503 no-instances. 0 disables retries.
CHUTES_COLD_START_BACKOFF_MSNo8000Base backoff between cold-start retries; it grows per attempt.
CHUTES_MAX_ASSET_MBNo512Maximum response or local input asset size kept in memory. The maximum is 4096.
CHUTES_PROGRESS_INTERVAL_MSNo5000How often progress heartbeats are emitted while a call blocks.
CHUTES_ALLOW_UNKNOWN_PARAMSNofalseWhen true, accept parameters that are not in the model schema. The default rejects them so a renamed field fails loudly.
CHUTES_PROVENANCENotrueWrite a <asset>.json sidecar with model, cord, params, and schema hash. Set to false to disable.

Generated assets are saved under ./assets/chutes/<kind>/, relative to wherever the agent runs, so they land inside the project. Output traversal and symlink escapes are rejected, and existing files are preserved unless overwrite is enabled.

Privacy and security

The API key is read from CHUTES_API_KEY and kept in memory. Credential-bearing requests go only to HTTPS Chutes hosts, remote asset URLs are screened against private-network destinations, and file access is contained to the workspace. Query strings and fragments are removed from network-error messages so signed asset URLs do not end up in logs. The project collects no telemetry. See SECURITY.md for reporting.

Troubleshooting

A Chutes request returns 401

The key is missing, invalid, or sent with the wrong authentication scheme. Confirm CHUTES_API_KEY is set for the process that launches the server, then set CHUTES_AUTH_SCHEME to bearer or raw, whichever differs from the current value.

A model returns 503 no-instances

The model is scaled to zero and Chutes has no instance ready. The server retries automatically; raise CHUTES_COLD_START_RETRIES and CHUTES_COLD_START_BACKOFF_MS if the delay is too short, or pick another model of the same kind.

Generation fails with an unknown or rejected parameter

The live model schema changed or the parameter name is wrong. Call describe_media_model again and rebuild the payload from the current schema. CHUTES_ALLOW_UNKNOWN_PARAMS=true is a temporary workaround, not a fix.

An asset write is rejected

Every input and output path must resolve inside the current workspace, and an existing file is not replaced implicitly. Pass the explicit overwrite option (or --overwrite in the CLI) after checking the target path.

Development

Requirements: Node.js ^20.19.0, >= 22.13.0, or >= 24 with npm.

bash
git clone https://github.com/TheStreamCode/chutes-media-mcpcd chutes-media-mcpnpm cinpm run checknpm run verify:mcpnpm run release:check

npm run check runs the format check, lint, type check, coverage tests, and the build. npm run verify:mcp starts the built stdio server with a placeholder key and validates the MCP handshake, the instructions and the three tool definitions without calling Chutes. npm run release:check keeps package.json, CHANGELOG.md, CITATION.cff and server.json on the same version. CONTRIBUTING.md covers the Windows path caveat and the opt-in live tests.

Support

Ask usage questions in GitHub Discussions, report reproducible defects in GitHub Issues, and report vulnerabilities privately as described in SECURITY.md.

Contributing

See CONTRIBUTING.md. Pull requests must pass the required CI checks.

License

MIT — see LICENSE. Third-party notices are in NOTICE.


Maintained by Michael Gasperini (Mikesoft). If this project is useful to you, consider sponsoring its maintenance.

來源:README.md,提交 5142afe

工具

3

list_media_models

List Chutes media models

List available Chutes media-generation models (image / video / music / speech), optionally filtered by kind or a free-text query. Use this to discover a model, then call describe_media_model before generate_media.

輸入參數kindlimitquery

describe_media_model

Describe a Chutes media model

Fetch a model's live cords and input schemas so you can compose a valid request. ALWAYS call this before generate_media for an unfamiliar model. Returns every cord (e.g. generate, and img2img/inpaint when present) with its required fields, types, defaults and a minimal example payload.

輸入參數model必填

generate_media

Generate media with Chutes

Run a generation and save the asset into the workspace. `params` is the payload you composed from describe_media_model. For editing, `params` may reference workspace file paths (e.g. image, mask) which the server reads and encodes. The asset is saved under output_dir (default ./assets/chutes/<kind>/) and the saved path is returned. Long video/music jobs block with progress updates.

輸入參數cordkind必填model必填params必填filenameoverwriteoutput_dirtimeout_ms

版本歷史

2
  1. v2.1.0最新Oct 31, 2026
  2. v2.0.5Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分