Skip to main content

Choose the Right MCP Surface

Lamina has two hosted OAuth MCP endpoints: Start with v2. It gives the agent a small task-level contract and lets Lamina select and stitch creative capabilities into a frozen plan. Move to the advanced surface only when the request requires a lower-level operation that v2 does not expose. Both endpoints share one authorization server, but each advertises its own OAuth resource matching the URL you connect to (as RFC 9728 requires):
So a client connecting to /mcp/agent/v2 discovers metadata at /.well-known/oauth-protected-resource/mcp/agent/v2. Migrating v1 → v2 needs no re-authorization: tokens minted for the legacy /mcp/agent resource are cross-accepted at the v2 endpoint.

Connect

Install page:
Recommended hosted endpoint:
For a remote MCP client:
For a client that only supports local stdio servers, bridge to the hosted OAuth server:
mcp-remote opens the hosted OAuth flow in a browser. Do not add an API key to the configuration. The retired @uselamina/mcp package is not a supported local server.

The Seven v2 Tools

1

Load context

Call lamina_credits before expensive work. If the request is brand-sensitive, call lamina_brand_context and pass its brandProfileId into planning.
2

Plan

Call lamina_plan with the brief, known platform/modality, asset URLs, and any maximum estimated cost. Planning may use a paid router, but it does not dispatch creative generation.
3

Clarify

If the plan status is needs_clarification, ask questions[] and plan again. If it is awaiting_approval, collect answers for requiredInputs[] and keep them for execution without re-planning.
4

Approve

Show the frozen steps, outputs, warnings, and estimated credits. Obtain explicit user approval for the plan and budget.
5

Execute

Call lamina_execute with the unchanged planId, planFingerprint, collected inputs, a finite positive maxCredits, and an idempotencyKey.
6

Track

Call lamina_status with the returned runId. Use wait=true and an optional timeoutSeconds of at most 25. If the response is still non-terminal or reports timedOut: true, call status again with the same run ID.
7

Deliver

Return completed entries from outputs[], using each output’s url, media type, and label. Never claim success from a queued or running snapshot.

Plan and Execute Contract

Example plan request:
A successful plan returns a stored planId, planFingerprint, steps, output descriptions, required inputs, warnings, expiry, and estimatedCredits. A null estimate means unknown, not free. Execution must preserve the approved plan:
Set allowUnknownCost: true only after displaying the unknown-cost warning and receiving approval. Reuse an idempotency key only for an exact retry; change it when the plan, inputs, or budget changes.

Uploading Local Assets

lamina_upload_asset issues an upload URL; it does not transfer the file bytes:
PUT the bytes to the returned uploadUrl with the required content type, then use assetUrl as a plan input. If the agent host cannot upload bytes, ask the user for a public asset URL.

Status and Cancellation

Always pass runId back exactly as returned. The v2 status tool normalizes pipeline, app-workflow, atomic image/video, and compose runs into the same lifecycle and returns completed assets in outputs[]. For voiceover runs, a completed status also carries details.legibility — a word-timed transcript plus measured delivery (words-per-minute, pace arc, pauses, emphasised words, and per-word loudness: dynamic range, loudest/softest words, and strong-emphasis words that are both drawn-out and loud) and the voice direction that was requested. Use it to evaluate whether the audio is on-brand and to give feedback, since the audio itself cannot be heard. Cancellation is provider-dependent. cancel_requested means Lamina accepted the request but may need the active provider operation to finish before stopping the next step. not_cancellable and cancel_requested must not be reported as confirmed cancelled.

When to Use the Advanced Endpoint

Connect separately to https://app.uselamina.ai/mcp/agent when the user needs:
  • direct app discovery, description, or app execution
  • direct atomic image/video model selection and generation
  • narrated-video composition controls
  • brand score, feedback, refinement, or brand-kit mutation
  • generated-app versioning, feedback, or visibility changes
  • a Stripe-hosted credit top-up link
The advanced endpoint exposes 30 tools. Its lamina_create tool is plan-only:
It never dispatches generation itself. Use lamina_run for a selected app, and use the universal lamina_status and lamina_cancel tools for the returned run ID.

REST Integrations

MCP uses lamina_status for delivery. Server-side integrations against /v1 can instead attach a signed webhook:
For direct REST app runs, fetch current app metadata first and use the exact parameter keys and option labels it returns. REST workflow outputs use their documented value field; v2 MCP status normalizes completed artifact links as outputs[].url.

Reliable Agent Behaviors

  • plan before spending and obtain explicit approval
  • preserve the plan fingerprint and run ID exactly
  • keep a finite credit ceiling
  • retry timed-out status waits instead of redispatching work
  • upload bytes before using a signed asset URL
  • treat unknown cost as unknown
  • surface typed failures and cancellation states truthfully
Avoid guessing app IDs, model IDs, parameter names, option labels, brand facts, output URLs, or required assets.