molecule-ai

@molecule-ai/mcp-image-gen (0.1.1)

Published 2026-06-21 05:48:04 +00:00 by hongming

Installation

@molecule-ai:registry=https://git.moleculesai.app/api/packages/molecule-ai/npm/
npm install @molecule-ai/mcp-image-gen@0.1.1
"@molecule-ai/mcp-image-gen": "0.1.1"

About this package

@molecule-ai/mcp-image-gen

Thin MCP server giving an agent image generation through the Molecule platform. It holds no vendor keys and does no billing: it builds the vendor-native request and calls the platform capability socket (/internal/llm/proxy, RFC #3105), which authenticates the workspace, injects the vendor credential server-side, meters usage, and debits org credits. The agent gets back a download URL and decides what to do with it.

Delivered to workspaces by the plugin manifest repo molecule-ai-plugin-image-gen (which references this package via npx).

Tools

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

Models (Tier-A, platform-metered)

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

Configuration (from workspace env — mirrors @molecule-ai/mcp-server)

Env Purpose
MOLECULE_CP_URL (or MOLECULE_API_URL / MOLECULE_URL) platform base URL
MOLECULE_LLM_PROXY_TOKENMOLECULE_ADMIN_TOKENANTHROPIC_AUTH_TOKENMOLECULE_API_KEY tenant bearer for /internal/llm/*
MOLECULE_ORG_ID X-Molecule-Org-Id
MOLECULE_WORKSPACE_ID X-Molecule-Workspace-Id (usage attribution)
MOLECULE_IMAGE_PROXY_PATH override socket path (default /api/v1/internal/llm/proxy)

Develop

npm install
npm test    # node --test

Published to the org Gitea npm registry on a v* tag (see .gitea/workflows/publish.yml).

Dependencies

Dependencies

ID Version
@modelcontextprotocol/sdk ^1.12.0
zod ^3.23.0
Details
npm
2026-06-21 05:48:04 +00:00
6
UNLICENSED
latest
5.1 KiB
Assets (1)
Versions (2) View all
0.1.1 2026-06-21
0.1.0 2026-06-21