Connect agents with MCP
MCP (Model Context Protocol) is the open standard AI agents use to call external tools. Corte ships an MCP server, so an agent like Claude Code can generate media, run your Applications, and execute your Workflows directly — no glue code, no SDK. You describe the outcome; the agent picks the tools.
Connect from Claude Code
The server speaks Streamable HTTP at https://api.corte.so/mcp:
claude mcp add --transport http corte https://api.corte.so/mcp
A browser window opens, you sign in to Corte, and a screen lists exactly what the agent will be able to reach. Approve it and the connection is live — no key to copy, nothing to paste. Claude Code, claude.ai and Cursor all take this route; any client that follows the MCP authorization spec does.
Every app you approve appears in Settings → API alongside your keys, with what it can reach and when it last acted. Disconnect one there and it stops working immediately.
Without a browser
Scripts, CI jobs and servers authenticate with an API key instead:
claude mcp add --transport http corte https://api.corte.so/mcp \
--header "Authorization: Bearer corte_sk_…"
:::warning Agents spend real credits MCP tools run as your account — every generation or workflow run an agent starts costs the same credits as clicking Generate yourself. Keep an eye on Settings → Usage, and give agents their own key so you can revoke access independently. :::
An agent sees only the tools its grant covers, using the same
scopes a key does. A key limited to content:rw lists
the content tools and nothing else — it cannot reach generate or
run_workflow, so it cannot spend credits at all. That is the tightest way to
hand an agent a CMS without handing it your balance.
Available tools
Every tool is annotated: reads are marked read-only, deletes destructive, so a host that honours the annotations (Claude does) lets an agent read without asking each time and puts writes behind approval.
| Tool | What it does |
|---|---|
get_credits | Your remaining credit balance — lets an agent check before spending. |
list_projects | The projects you can work in and what each can spend — so "use the Playground project" resolves to the right projectId. |
create_topup_checkout | A payment link for a top-up, for the agent to hand you when the balance runs dry. |
create_subscription_checkout | A payment link for a plan. |
list_models | The model catalog with capabilities and per-unit pricing. |
generate | Start a generation with any model (image, video, audio, upscale). |
get_generation | Poll a generation for status and result URLs. |
upload_asset | Import media from a URL; returns a storageId other tools accept. |
list_applications | The 43 curated Applications and their input requirements. |
run_application | Run an Application with images/video/text and an optional preset. |
list_workflows | Your saved workflow pipelines. |
get_workflow | One workflow's graph — including its input node ids. |
run_workflow | Execute a workflow with custom inputs. |
get_workflow_run | Poll a run for status and per-node results. |
Full parameter and return shapes for each tool are in the MCP tools reference.
The typical agent flow
Ask an agent for something like "run my Product Reshoot workflow on this photo" and a well-behaved run looks like:
upload_asset { url }→ a committedstorageId.get_workflow { workflowId }→ discover the graph's input node ids.run_workflow { workflowId, inputs: { productPhoto: { storageId }, concept: { text: "…" } } }- Poll
get_workflow_run— outputs land inrun.nodeResults[*].output.valueas media URLs and text.
The same id-keyed input convention as the REST endpoint applies — see Workflows via the API for the details.
When something fails
Tool errors carry the same codes as the REST API (overview). Where the account is what stopped the call — the balance ran dry, the address is unconfirmed, the model needs a purchase, storage is full — the agent gets the code, the balance and a sentence saying what to do, so it can tell you rather than stall. For a dry balance that means a top-up link it hands you; you pay in your browser, and the credits land within a minute. Details in the MCP tools reference. If generations themselves fail, see Generation issues.