What Agents Should Prefer
For interactive agents, prefer hosted MCP:LAMINA_API_KEY. Hosted MCP and REST share the
same runtime model: create work, preserve runId, wait or subscribe to completion, inspect typed
outputs, and reuse final artifacts explicitly.
Recipe 1: Hosted MCP Creative Run
After installing Lamina MCP in Claude Code, Codex, Cursor, or another MCP client, use this flow:Clarify if needed
If the response status is
needs_input, ask the user for the listed missing fields and call
lamina_create again with those values in inputs.Recipe 2: Local Stdio MCP Variant
Use local stdio MCP when the agent can spawn local tools but cannot complete remote OAuth.lamina_create, handle needs_input, then call
lamina_status with the returned runId.
Recipe 3: TypeScript Agent With SDK
Use this for Node.js agents, backend workers, and agent runtimes that own their own API key.Recipe 4: Python Agent With REST
Use this when the agent is written in Python or runs in an environment without the TypeScript SDK.Recipe 5: Brand-Aware Planning
Agents should call brand context before generating when the user asks for brand-safe, campaign-safe, or performance-aware content.lamina_brand before lamina_create when the agent needs explicit voice,
visual, guardrail, or winning-pattern context.
Recipe 6: Artifact Reuse
Agents should not scrape provider-specific payloads. Treat completed outputs with stringvalue
fields as reusable artifact URLs.
Smoke Test Checklist
Run this checklist for every supported MCP client before broad distribution:- Install
https://app.uselamina.com/mcp/agent. - Complete OAuth and choose a workspace.
- Confirm the client lists exactly five Lamina tools.
- Call
lamina_discoverfor an image or video launch brief. - Call
lamina_createwith a simple brief. - If
needs_inputis returned, provide the missing input and retry. - Call
lamina_statuswithwait=true. - Confirm completed outputs include typed values the agent can reuse.
- Remove or revoke the client after testing if it used a temporary workspace.
Troubleshooting
authorization_required: start OAuth from the MCP client or reinstall the hosted server.insufficient_scope: reconnect and approve the requested scope.needs_input: ask the user for the listed missing field; do not start a run with guessed data.failed: surfaceerrorMessageand output-level errors; do not blindly retry invalid inputs.- Timeout while waiting: call
lamina_statusagain with the samerunId.