MeltFlex CLI
Generate interiors from your terminal — or run as an MCP server
The MeltFlex CLI turns a room photo into a photorealistic redesign straight from your terminal. The same binary also runs as an MCP server so AI agents (Claude Code, Cursor) can generate through it.
It is a thin client over the MeltFlex API: you sign in to your own account and every generation is billed to your account credits. It enforces nothing itself — credits and access are governed server-side.




Install
Requires Node.js 18 or newer.
# Run on demand (no install)
npx -y meltflex-mcp <command>
# …or install globally for a shorter `meltflex` command
npm install -g meltflex-mcpRunning meltflex with no command starts the MCP server on stdio. See the MCP guide to wire it into an agent.
Authenticate
You need an active subscription (any paid plan). Once subscribed, open your account settings and click API Key under Profile:

Then click Generate API Key. The key is shown only once — copy it immediately.

Save the key once with the CLI:
# Save your API key (stored in ~/.meltflex/config.json, chmod 600)
meltflex auth mf_sk_xxxxxxxxxxxx
# Verify
meltflex whoami
# → Authenticated (key mf_sk_xxxxxx…) → https://www.meltflexai.comAlternatively, set the MELTFLEX_API_KEY environment variable — it takes precedence over the saved file and is convenient for CI.
Commands
| Command | Description |
|---|---|
meltflex | Start the MCP server over stdio (used by AI agents). |
meltflex auth <mf_sk_…> | Save your API key to ~/.meltflex/config.json. |
meltflex whoami | Show authentication status and target host. |
meltflex credits | Show your credit balance and per-operation costs. |
meltflex generate | Generate a redesigned interior and save it to disk. |
generate
Transform a room photo. Costs 10 credits (auto-refunded on failure).
| Flag | Required | Description |
|---|---|---|
-i, --image | Yes | Source room photo: local file path, http(s) URL, or data URL. |
-p, --prompt | Yes | Redesign instruction. Room structure is preserved unless you say otherwise. |
-r, --ref | No | Reference furniture image to place in the room. Repeatable (up to 10). |
-o, --out | No | Output file. Defaults to ./meltflex-output/interior-<timestamp>.png. |
meltflex generate \
--image ./living-room.jpg \
--prompt "Redesign in warm Scandinavian style: light oak floor, beige linen sofa, soft daylight" \
--out ./redesign.png
# → ✅ Saved to ./redesign.png
# → Credits used: 10credits
Check your balance before a batch of generations.
meltflex credits
# → MeltFlex account (you@studio.com)
# → Balance: 930 credits (earned 1000, spent 70)
# → Cost per operation:
# → • photo: 10
# → • video: 100 …Examples
Place specific furniture
Pass one or more --ref images to drop exact products into the room. The AI matches their colors, materials and proportions.
meltflex generate \
--image https://your-cdn.com/empty-room.jpg \
--prompt "Place these furniture items naturally in the room" \
--ref ./sofa.jpg \
--ref ./dining-table.jpg \
--out ./furnished.pngNotes & limits
- Subscription: API keys require an active subscription (any paid plan).
- Credits: 10 per generation, deducted upfront and refunded automatically if a generation fails.
- Inputs: MeltFlex restyles an existing photo — it does not generate rooms from scratch.
- Security: your key lives only on your machine; revoke it anytime in settings.