Skip to main content
Start with the Brand MCP quickstart to connect and authenticate. This reference covers the details when you need them. Agents obtain current app requirements directly from commerce_describe, tool schemas and commerce://guide; reading this page is optional.

Additional custom still images

Prefer the six Brand apps below. When their fixed deliverables cannot provide a requested extra or custom still, use commerce_image_models({model?}) to discover the existing AI Image Generator models and their exact schemas, including Nano Banana. Then call commerce_prepare_image({model, reason, shots}). Each of one to four shots has a label, prompt and model-specific params; reference images use the declared imageUrls or imageUrl field. Only one image per shot is permitted. Preparation performs no paid dispatch. It returns a review, reference previews, estimated credits, expiry and fingerprint. Execute the exact approved plan with commerce_execute, then read commerce_status; outputs can be previewed and downloaded. No standalone video/audio tools or arbitrary workflow creation are exposed. There is no automatic model replacement or retry of an uncertain paid request. Direct MCP authorization must include the custom_image grant; Brand Assistant uses the authenticated workspace’s existing credits and saved approval. Custom stills can also supply missing reference images for a Brand app. Inspect that app’s input requirements, generate the prerequisite, and pass its verified output URL into the app’s normal assessment/preparation flow. Use source_bindings: [{path: "product.images", value: [outputUrl], source: "generated", run_id: runId}] with the app’s actual reference field; the server checks run ownership and the exact completed image. Do not duplicate built-in prerequisites. Each paid plan needs its own review approval. The assistant selects suitable model/settings defaults, honors explicit model and portrait/landscape requests, and asks only about unresolved material choices. Input image dimensions and final app output constraints are separate.

Choose an app

Call commerce_describe without arguments to discover your authorized apps. Then call it with an app_key to read the current fields, required inputs, allowed choices, person photos and output pack. Availability does not guarantee a generation will succeed. Start with commerce_assess_request: record the original request, exact known inputs and explicit output_intent. Missing intent returns a correction hint when explicit scope is already recorded, otherwise a clarification; it never selects the full pack. Resolve all blockers before asking current questions using the saved intake_id/revision; unavailable or declined required fields block preparation. Then call this app’s preparation tool with only intake_id and revision. Image-only skips downstream video; video prerequisites are automatic and estimated once. Counts select existing deliverables, not guaranteed file counts. Internal AI models remain fixed. The full packs above are available choices, not a requirement to generate every output. Read commerce_describe for current output IDs, availability, allowed choices and person photos. Input requirements depend on the selected outputs; intake returns the actual missing questions. A selected producer retains its authored number of files. Product inputs contain productName and an images array; omit unknown optional product facts. For person_reference, send either {source: "preset", preset_id: "ID from commerce_describe"} or {source: "upload", asset_url: "HTTPS image URL"}. Upload local files first. Do not copy example or saved sample photos into missing inputs.

Fashion Catalogue

Create a styled fashion shoot from front, back and side photos of the same garment. Choose a preset person or custom person photo, garment framing, location and day/night lighting. Full output pack: Cropped Image (image); Front (image); Back (image); Side (image); Full Body (image); Catalog video (video). Returns a prepared plan before generation; no Shopify connection to Lamina is required.

Catalogue Photos and Video

Upgrade apparel listing media from a product name and photos. Choose a preset person or custom person photo; body description and location are optional. Full output pack: Front view (image); Side View (image); Close-up (image); Video (video). Returns a prepared plan before generation; no Shopify connection to Lamina is required.

Product Ad Banners

Create campaign banners and animated variants using product photos, your logo, brand styling, headline, CTA and audience. Subheading and offer are optional. Choose this for banner creatives; choose a film app for a story ad. Full output pack: Ad 1 (image, 9:16); Ad 2 (image, 9:16); Ad 3 (image, 9:16); Video Ad 1 (video, 5 seconds); Video Ad 2 (video, 5 seconds); Video Ad 3 (video, 5 seconds). Returns a prepared plan before generation; no Shopify connection to Lamina is required.

Virtual Try-On

Show an actual customer wearing apparel using their photo and product name/images. Use the customer photo; there is no preset-person choice. Full output pack: Selfie Output (image, 9:16); Full body Output (image, 9:16); Video (video). Returns a prepared plan before generation; no Shopify connection to Lamina is required.

Apparel Ad Video

Create a clothing campaign film with music, logo and timed text overlays. Supply clothing product name/images, brand logo, target geography and audience. Full output pack: Ad video (video, 20 seconds). Returns a prepared plan before generation; no Shopify connection to Lamina is required.

Listing Images & URL to Product Ad

Create a product ad from a listing URL and ordered listing photos. The authored app requests four scenes, feature text and music, without voiceover. No logo is required. The URL is passed as text; webpage retrieval and product-fact accuracy are not verified. Full output pack: Ad Video (video, 10 seconds, 9:16). Returns a prepared plan before generation; no Shopify connection to Lamina is required. Note: The authored app receives the listing URL as text; it does not have verified webpage retrieval. Review generated feature claims against the real product. Note: The authored video prompt mentions nine references. With fewer than eight listing photos, visual fidelity needs review; no sample photos are substituted.

Record the request before preparation

Contract 1.4 adds commerce_assess_request. Existing connections keep the same URL and OAuth permissions; reload tool discovery. Only Brand MCP changes. General Lamina MCP tools and app execution APIs retain their behavior.
  1. Call commerce_describe if needed to choose the app and inspect its fields.
  2. Call commerce_assess_request with operation: "create", the original request_text, app_key, exact provided_inputs and explicit output_intent.
  3. Resolve all blocking_reasons and recovery_actions first. Ask only actionable questions, not deferred_questions. Update the saved intake with operation: "update", intake_id, revision, a unique update_id, the new original request_text, and nested answers for missing app inputs only. app_key and output_intent stay at the top level, not inside answers.
  4. On ready_to_prepare, call the app’s preparation tool with only intake_id and revision. Review its plan and estimate before execution.
This preserves the product name while asking for the actual images and a person reference. An incomplete intake never generates media or returns an execution plan. Missing app/format produces needs_clarification; missing supported inputs produces needs_input. blocked explains unavailable required inputs or unsupported requirements. conflict explains invalid values or attempted overwrites. Only ready_to_prepare can advance to preparation. support reports supported/partial/unsupported/unknown separately from missing-input status.

Recover before asking more questions

On conflict or blocked, questions is empty. deferred_questions lists inputs that may be needed later; collecting those inputs alone will not resolve the blocking reasons. Explain every remaining blocker, including unsupported user requirements and unavailable assets. Never say that only a logo is missing while another constraint still blocks the request. For next_action.action: wait_for_user_change, state blocked_summary and stop. Do not ask for the unavailable asset again or collect deferred inputs. Reassess only when the user supplies new information or changes the request. A duration applies only to video: do not invent one for static images. A genuine unsupported duration remains blocked rather than being silently ignored. If applied: false and retry_arguments are returned, the rejected operation made no changes. Check the proposed encoding correction against the original request, then resubmit it. Control keys such as app_key and output_intent belong at the top level. Contradictory control values require correction, not a guessed choice. An output_intent_hint records a narrowly recognized scope already in the user’s message. Apply it with a top-level update instead of asking images versus video again; the hint itself neither selects outputs nor prepares a plan. If you added an exact-file requirement the user never requested, reassess without that mistaken constraint while preserving actual inputs, scope and unavailable/declined fields. Never remove a genuine user requirement merely to make preparation succeed.

Preserve inputs and explicit changes

URLs and array order are retained exactly. User-supplied URLs must appear in the recorded source message. Connector/upload URLs need matching source_bindings: [{path, value, source: "connector"}] (or "upload"). These labels require matching declared host capabilities: store_connector for connector results, or both file_read and upload for completed uploads. Do not add bindings for URLs already supplied by the user. A binding cannot override a detectable structured user value. These labels remain declarations, not proof. MCP cannot detect an agent falsifying both the original message and its extracted values; hosts should capture original messages directly rather than ask a model to rewrite them. Answers fill missing paths. They never overwrite a known sibling. For an intentional change, send changes: [{path, old_value_hash, value, source_instruction}] using the hash returned by intake and the exact new user instruction. For output changes, use the path output_intent and output_intent_hash. Mark required fields the user cannot provide in unavailable_fields or declined_fields; explain the blocker instead of asking again. A later real answer clears the corresponding blocker. Intakes are scoped to the authenticated user and workspace and expire after 30 minutes. Revision checks prevent concurrent overwrites. Retry the same update with its original update_id and identical payload. A newer revision invalidates older unexecuted plans; running work is not cancelled. Repeated preparation of the unchanged current revision reuses the same valid plan. Changed app contracts require a fresh intake. Legacy direct-input preparation calls return needs_intake with the next action, not a full-pack fallback. Already-issued valid legacy plans keep their original expiry. The operator’s existing Redis must be available; intake_unavailable stops preparation rather than bypassing these protections.

Select images, video or particular outputs

Preserve every ID in an explicit structured output_ids request. A missing or extra ID produces a conflict; contradictory explicit lists need clarification. These checks do not infer arbitrary prose lists. Only send requirements the user actually asked for: selecting three deliverables does not request an exact three-file guarantee. output_intent.mode is one of:
  • full_pack: explicitly request the complete app pack.
  • all_images or all_videos: select only that media type’s deliverables.
  • specific: supply output_ids from this app’s live description.
  • count: supply media_type and a positive count; select that many existing deliverables in catalogue order, with labels disclosed.
Omission asks a clarification. Counts are selectable producers, not guaranteed file counts. Unknown/foreign IDs and unsupported counts do not become full-pack runs. A video-only app can generate prerequisite images without exposing image deliverables. Selected video dependencies run automatically and are included once in the estimate; no repeated prerequisite approvals. Images-only selection skips downstream video work. required_for_output_ids identifies relevant inputs. preview_output_ids only controls thumbnails for existing results. Pass constraints in requirements: aspect_ratio (numeric width/height), duration_seconds, exact_file_count, custom_shots, history_lookup, page_retrieval, or needs_upload. Unsupported/unknown constraints are reported separately; do not promise arbitrary shot creation, page extraction or precise file counts. Start a new intake if the user changes those constraints. Declare host_capabilities conservatively: file_read, upload, browser, store_connector, media_display. Lamina does not read local attachments. A host without file reading and HTTP upload must request usable image URLs. Only apps with a person-reference input offer presets. Delegated choices use the app’s real choices and appear in review; they do not authorize invented product facts or extra outputs.

Product data and person photos

Product inputs require productName and one to ten image URLs. Other product facts are optional; a Shopify token, product ID and store domain are not required.
These example URLs are placeholders: use real accessible images on approved hosts. The first image is the default hero image unless heroImage is supplied. Catalogue apps accept either a preset person or a custom person photo:
commerce_describe returns all named person photos. MCP Apps hosts can show the full gallery; native image previews are limited to four per call. Pass app_key and preview_preset_ids to preview others. Use returned IDs, not guessed names. If the user delegates selection, choose a supported option and show the exact reference in the review. “Model selection” here means the photographed person. Internal AI models, prompts, providers, graph structure and generation settings are fixed, except for the inputs explicitly exposed by the app. Try-On uses selfie_image_url for the actual customer.

Upload multiple files

For each local file, call commerce_upload_asset with its name, MIME type, actual byte size and public_upload_accepted: true. For example:
Obtain the user’s acceptance of public visibility first. HTTP PUT the file bytes to the returned uploadUrl, using contentTypeHint as the Content-Type header. Only after the upload succeeds, pass assetUrl in the appropriate input field. Repeat for back/side images, logo and person reference; product images go in product.images. Uploads support PNG, JPEG and WebP, up to 20 MiB each, with additional decoded-image validation. They are public assets in shared configured storage. Private uploads are not supported, and operators may disable uploading. Existing accessible URLs on approved asset hosts can be used instead. The agent host needs file-reading and HTTP-upload capability: MCP cannot read chat attachments by itself.

Prepare, review, generate and retrieve

  1. Read commerce_credits and describe the chosen app.
  2. Assess the original request with exact inputs and explicit output intent. Answer only the saved intake’s questions, then prepare with its intake_id and revision.
  3. When preparation returns awaiting_approval, show its review, included outputs, estimated credits, plan ID and settings. Obtain user authorization to generate.
  4. Call commerce_execute with the exact returned planId, planFingerprint, a positive integer maxCredits covering the estimate, and a unique idempotencyKey.
  5. Poll commerce_status with the returned runId at bounded intervals until terminal.
  6. Present the returned media using the gallery/player or your host’s native preview. Keep the named original-file links and inspect the media before judging quality.
For example, inspect Try-On with commerce_describe({"app_key":"virtual_try_on"}), then assess with the product object above plus selfie_image_url and the requested outputs; prepare from the returned intake. Preparation does not start generation. Do not pass new inputs to execution; changed inputs require a new prepared plan and review. After an uncertain execution response, retry with the same key and unchanged arguments, or check the known run. Brand MCP returns an existing matching run even if its intake subsequently changed or expired. Current workspace access, caller ownership and the original request must still match. A retry does not start another generation. If a queued run failed to enter the queue, repair is allowed only while its original execution checks still pass; otherwise the result includes recovery_blocked. Check that run or contact support rather than using a new key to start another paid run. New executions always require a current intake. commerce_cancel requests cancellation; submitted work may still incur credits. maxCredits checks the estimate, not a guaranteed provider-spend ceiling. Exact per-run settled credits can be unavailable (spent: null); do not treat a workspace balance change as the cost of one run. Output verification checks provenance and media structure, not creative quality. Do not substitute old canvas outputs for missing MCP results. Brand MCP does not publish to Shopify. An agent can publish returned media through its own Shopify connector when the user authorizes it.

Show photos and generated results

Brand MCP supplies three views: all person references, the exact selected/custom reference in the review, and the run’s actual output images/videos. The read-only viewer never generates media. Selecting a preset sends your agent a request to prepare the inputs for review. Video has playback controls and does not autoplay. The host decides what it can render. Advertising the UI resource does not prove a particular chat displayed it. Reload the MCP connection’s tool/resource discovery after an update; the endpoint, tool names and existing OAuth grants are unchanged.

Claude, Codex and other agent clients

Brand MCP is a remote HTTP MCP service, not a Codex-only integration. Each client must complete Lamina OAuth for the intended workspace and retain the same access checks. Connect Claude Code with:
Then use /mcp in Claude Code to authorize. For Claude app/Desktop, add the same URL as a custom remote connector and complete authorization.
  • Claude app/Desktop: supports interactive MCP Apps. The Brand gallery uses the standard bridge rather than requiring OpenAI-specific APIs. Connector enablement, organization policy and the host’s sandbox still determine rendering. See Claude’s interactive connector guide.
  • Claude Code/CLI: can call the same tools and consume native image results. An image reaching the model is not proof the terminal displays it to a human. Use the returned image files/links and a supported browser preview for video; do not promise an embedded terminal gallery. See Claude Code MCP setup and image results.
  • Codex and other agents: use the capabilities actually available in that host: MCP Apps, native media previews, or named original links. Do not branch solely on the agent’s name or infer UI support from a successful tool call.
The protocol and browser fixtures are tested; this is not a claim that every version of every client has been manually verified. Before a team rollout, authorize its actual client, display reference photos beyond the first four, and retrieve an owned completed run with images and video. This check requires no new paid generation. For agent authors:
  • Preserve content blocks of type image and resource_link. Printing only structuredContent or JSON drops the human-visible previews. Forward media with your host’s actual supported display API, not an invented helper.
  • Use presentation.items for labels, stable IDs and original URLs. A fifth image is still present when only four thumbnails are embedded. Call commerce_status with runId and up to four preview_output_ids from that run to preview remaining images.
  • inlinePreview distinguishes included, unavailable, not_requested and not_applicable. It describes the response, not whether the host displayed it.
  • Say “shown” only after producing a visible preview. Do not rely solely on remote image tables or download media to get around a host’s display restrictions.
  • Refresh the same run to retrieve outputs; never regenerate just to fix display. A failed or cancelled run can contain usable partial media and must retain its status.
The viewer refreshes active runs every 10 seconds, backs off on transient errors, stops on authorization errors or terminal status, and pauses after ten minutes. Manual refresh remains available. Broken/expired media shows a message and retains its original link; an unavailable thumbnail does not change the generation status.

How agents receive instructions

  • MCP initialization supplies server instructions.
  • tools/list supplies tool descriptions and JSON input schemas. Full access currently exposes 15 tools when all six apps are ready and custom images are granted; grants and app readiness can reduce the list.
  • Read the commerce://guide MCP resource for the same runtime guide.
  • commerce_describe supplies current app-specific fields, choices and previews.
The server does not edit the agent’s system prompt or project files; the host controls how instructions are presented. The optional @uselamina/skill package adds written guidance, but installing it does not configure MCP or authorize a workspace. Use the live resource and schemas even when an installed skill is older. Install the optional guidance into a project with:
To refresh an existing installation, run npx @uselamina/skill@latest --update. Presentation guidance is included from version 0.1.14. Update older installations explicitly. Native skill clients receive the bundled Brand MCP reference; rule-only clients can read commerce://guide through MCP. This is separate from the connection setup in the Brand MCP quickstart.

Troubleshooting

OAuth resource discovery is available at https://app.uselamina.ai/.well-known/oauth-protected-resource/mcp/commerce. Read and write scopes are lamina:creative:read and lamina:creative:write. See MCP OAuth Install for the shared authorization flow.

Current tested limits

The 15 October 2026 live sample returned full MCP output packs for apps 1–5. Visual caveats included animated logo distortion, oversized film logos and cropped full-body framing. The previous app 6 failed at its final caption overlay after caption text was truncated. It has now been replaced by the listing-video app above. The replacement has passed contract and preparation checks; a fresh paid generation is not yet verified. These sampled results are not a guarantee across all inputs. Check final status and review outputs before publishing.

Additional connection options

Client configuration

For clients using mcpServers configuration:
Configuration formats vary by host. For a stdio-only client, use this alternative:
The bridge completes OAuth in your browser. Do not add an API key or service-role key.

App recipe media plans

When BRAND_COMMERCE_RECIPES_ENABLED=true, call commerce_read_recipe with app_key and output_ids from commerce_describe to read only those outputs and their upstream instructions. Concatenate bundle_json_chunks in order across every next_offset page; parse the combined JSON only after next_offset is null. Each page holds up to four 6,000-character chunks. The bundle contains sections, a deduplicated models dictionary and output-to-section mappings. The envelope includes source_hash, version, omitted_sections and complete. Reauthorize and check the current source on every page. Legacy outline paging and section_ids detail reads remain supported; output_ids and section_ids are mutually exclusive. Authored creative controls, templates and prompt-builder instructions are reference data. Connected cached outputs are excluded. Access remains restricted to the six allowlisted open-source apps and verified source hashes. commerce_prepare_recipe takes app_key, source_hash, request_key, summary, brief, sources and ordered steps. Sources have a stable ID, declared role and verified image URL; generated sources carry an owned run_id or chat asset_id. Steps specify an app recipe_section, image/video kind, supported model, exact prompt/settings, label and output role. Extra stills without an app section use nano-banana-2. Each reference binds a model URL field to a source_id or earlier image step_id. Unknown pricing, unsupported settings, forward dependencies and undeclared media are rejected before preparation. An optional assembly names an app editor section and an ordered list of at least two clip_steps. It concatenates only those reviewed generated clips through the existing deterministic video editor. No LLM, narration or additional media is generated by assembly. Every paid step is included in the review estimate. Preparation atomically saves one immutable plan per principal/request key. Reusing the key with changed arguments conflicts. The existing commerce_execute and commerce_status tools handle exact approval, workspace billing, idempotent replay, progress and verified partial/final outputs. App graphs are never edited or executed by this route. The six legacy app preparation tools remain exposed for existing MCP integrations; the recipe-enabled assistant uses the direct-media route. Independent steps in an approved Brand recipe may run concurrently when the operator enables BRAND_RECIPE_PARALLEL_ENABLED. BRAND_RECIPE_MAX_CONCURRENCY defaults to three and is capped at four. Every required reference must finish and verify before a dependent starts. Shared references are generated once and bound by step ID. In-flight commitments count against the approved ceiling. Cancellation checks all active jobs and preserves late completed outputs and actual charges. Unknown dispatch outcomes are not automatically repeated. Disabling parallelism drains all already-active jobs while limiting new starts to one.