image-gen plugin

Adds image generation to a Molecule workspace agent. Generate or edit images from a text prompt; the result comes back as a download URL the agent can fetch and send to the user.

Thin adaptor (RFC #3105): this plugin only declares the MCP server @molecule-ai/mcp-image-gen, which calls the platform capability socket (/internal/llm/proxy). The socket holds the vendor keys, meters usage, and debits org credits server-side — the plugin holds no keys, no billing, no storage.

Tools

  • generate_image(prompt, model?, size?, n?)
  • edit_image(prompt, image, model?)image = base64 / data-URL; google/ models only in v1
  • list_image_models()

Models (platform-metered, billed to org credits — uncapped)

  • google/gemini-2.5-flash-image (default) — Gemini 2.5 Flash Image ("Nano Banana")
  • openai/gpt-image-2 — OpenAI GPT Image 2

How it's wired

settings-fragment.json registers the MCP server (launched via npx from the org Gitea npm registry). adapters/claude_code.py deep-merges that into the runtime's settings.json. setup.sh is a no-op.

Cost is bounded by the org's credit balance; out of credits → the tool reports "out of image credits" (HTTP 402 from the socket).

S
Description
image-gen plugin — adds image generation MCP tools (calls the CP capability socket; RFC #3105)
Readme 29 KiB
Languages
Shell 54.5%
Python 45.5%