MCP
What an agent can do
Create and adjust Composa templates, render documents and publish them from an AI agent, with one worked prompt.
Once connected, an agent works on your Team's templates the way a designer would.
- Create a template. Describe the document: what it is, who reads it, what changes per person. The agent builds it page by page, with real text, tables and pictures, and hands you the editor's link to watch.
- Adjust a template. Ask for a change in words: a new sentence, a bigger total, the brand's colour. The agent finds the layers and edits them in place.
- Use variables. Ask for the parts that change per document to be variables. They become the keys of the API's
dataobject. - Render. The agent prints a preview, or the final file, so you both see the result.
- Publish. The agent can publish the template, so the API prints the new version. If your Team requires approval, it asks for one instead.
Everything an agent makes is an ordinary template: you can open it in the editor, change it by hand, and print it from the API.
A worked prompt
Paste this into your agent:
With Composa, make a one-page A4 invoice for "Kova Studio".Make the client's name, the invoice number, the due date, theline items (description, quantity, unit price) and the totalvariables. Show me a preview, then publish it.The agent will:
- Create the template in your Team and send you a link to watch it build.
- Lay out the page: header, client block, a table of line items, the total.
- Turn the client's name, number, date, lines and total into variables.
- Render a preview and show it to you. Ask for changes until it is right.
- Publish it, and tell you the template's id.
Then print it from your own code:
bash
curl -X POST https://api.composa.ai/v1/run \ -H "Authorization: Bearer $COMPOSA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template_id": "<the id the agent gave you>", "data": { "client_name": "Ada Lovelace", "invoice_number": "0482", "due_date": "2026-12-31", "items": [ { "description": "Design", "quantity": 1, "unit_price": 1200 }, { "description": "Print run", "quantity": 500, "unit_price": 0.4 } ], "total": 1400 } }' \ --output invoice.pdfThe variable names are the ones the agent chose. Read them with GET /v1/contract before you write your code.
Limits
The MCP server has its own limits: up to 100 documents in one render, and a number of calls a week that depends on your plan. See Pricing.