OpenCode’s Build agent, making a desert bazaar’s art
OpenCode comes with two main agents you switch between: Plan, which looks and suggests without changing files, and Build, which edits and runs commands. Add the asset server with its own mcp add command, or let Build reach asset through its shell tool, and the same session that writes your game can draw it. Here that means a cel shaded bazaar, a hooded rogue with idle and walk clips, a stone well as a turning sprite stack, and a title screen to close.
Set it up in OpenCode
Install the CLI
Install the asset command (Node 20.11 or later).
npm install -g @tyrbo/assetAdd the MCP server to OpenCode
Run its own command, which writes the server into opencode.json in the project (the command below writes it).
opencode mcp add tyrbo-asset -- npx -y @tyrbo/asset mcpTry it free
In an empty scratch folder, a mock call checks the setup with no key: it writes stand-in files and spends nothing.
asset look grove "hand-painted fantasy forest, soft dappled light" --view top-down --mockLog in in your own terminal
Make an asset key in the Tyrbo app (Settings, Asset gen) and paste it into asset login yourself. The agent never asks for the key and never runs the login.
asset login
OpenCode’s own docs, read November 25, 2026:
The commands
asset look bazaar "cel-shaded desert bazaar, bold outlines, flat bright colours" --view isometric
asset character rogue "a nimble rogue in a fitted hooded tunic and leather boots" --view isometric --clips idle,walk
asset stack well "a round stone well with a little wooden roof and a bucket" --view top-down
asset startscreen "the bazaar at dusk, lanterns lit" --title "Sandmarket"Made by the CLI, not drawn for this page
Real files the asset CLI wrote, each under the command that made it.

See prompt
asset look bazaar "cel-shaded desert bazaar, bold outlines, flat bright colours" --view isometric
See prompt
asset character rogue "a nimble rogue in a fitted hooded tunic and leather boots, twin daggers sheathed" --view isometric --clips idle,walk --facings down --takes 3
See prompt
asset stack well "a round stone well with a little wooden roof and a bucket" --view top-downLet Plan write the shopping list
Switch to Plan and ask it what art the game needs and in what order. Because Plan cannot run anything, it is a cheap place to argue about camera, palette and names. Its answer should open with the look, since everything after is asked in it, and close with asset startscreen, which reads the finished art and interface to design the title. Then switch to Build and say “go”.
AGENTS.md and permissions
OpenCode reads AGENTS.md for project instructions, and /init can start one for you. Add the agent block from the docs to it so Build knows the tool and checks asset --help for flags rather than guessing.
OpenCode’s shell tool is permission gated, so you choose whether a command waits for you. A comfortable setup lets --mock calls through and keeps real ones asking. The MCP tool takes the words after asset plus the game’s folder and will not run asset login; that one is yours, typed into your own terminal with the key pasted there.
Reading what Build gets back
One JSON line per call lists every file written, so Build can load bazaar.png, the rogue’s sheet and rogue.anim.json, and the well’s well-sheet.png with its slices, without searching. The stack can be drawn turning in place, and it also writes well.glb should the game go 3D later. When a call is refused, stderr says why and the exit code is 1, which Build treats like any failed command.
Credits are guarded the same way on both paths: a quote before each paid call, a refusal if the balance is short, the cache for repeats at no charge, and asset spend for the figure.
Questions people ask
Why use OpenCode’s mcp add command and not edit the file?
Its config shape changed between versions. The command writes the entry in whatever shape your installed version reads.
Can the Plan agent make assets?
It is meant for looking and proposing, so leave the calls to Build. Plan is where you agree on the list and the names first.
What does the sprite stack cost?
From words, a cheap model writes its recipe for about a tenth of a cent. Editing that recipe and building it again is free.
Install it, then ask for the look.
Get an asset keyMake a key in the Tyrbo app, then run asset login. Add --mock to try any command free first.