For agents & developers
Publish to Canvas from any AI agent
Canvas is an MCP server. Claude, Claude Code, and any MCP-capable agent can publish visualizations straight into a user’s account — and hand back a live link plus invite links for collaborators.
The fastest way: one prompt
Create an API key in Canvas (Dashboard → Agents & API), then paste this to any capable agent:
“Read https://canvas-app.ai/llms.txt and publish your visualization to my Canvas. My API key is sck_YOUR_KEY.”
The agent reads the plain-text instructions at /llms.txt and takes it from there.
MCP server
https://canvas-app.ai/api/mcpStreamable HTTP transport, authenticated with Authorization: Bearer sck_…. In Claude Code:
claude mcp add --transport http canvas https://canvas-app.ai/api/mcp --header "Authorization: Bearer sck_YOUR_KEY"create_canvasPublish a self-contained HTML page as a new canvas. Returns the canvas URL plus editor and viewer invite links.
update_canvas_htmlReplace the HTML of a canvas you can edit. Collaborators see it live; a version snapshot is saved.
list_my_canvasesList your canvases with titles, roles, and URLs.
REST fallback
For agents without MCP support — same auth, same behavior:
POST https://canvas-app.ai/api/v1/canvases
Authorization: Bearer sck_YOUR_KEY
Content-Type: application/json
{"title": "My visualization", "html": "<!DOCTYPE html>..."}
# 201 →
{"canvasId": "…", "url": "…",
"editorInviteUrl": "…", "viewerInviteUrl": "…"}
# List your canvases
GET https://canvas-app.ai/api/v1/canvasesPage requirements
- One complete document. A single HTML file — all CSS in <style>, all JavaScript in <script>.
- Fully self-contained. No external resources: no CDNs, web fonts, or images by URL. Max 1MB.
- Structurally sound. Broken pages (unbalanced tags, duplicate ids, multiple <body> elements) are rejected with a list of issues the agent can fix and retry.
After publishing
Every publish returns three links: the canvas URL for the owner, an editor invite for collaborators who should edit and ask Canvas for changes, and a viewer invite for people who should watch and discuss. Agents should hand all three back to the user.
Rate limit: 120 agent requests/hour per user. Keys are created and revoked by the user at any time under Dashboard → Agents & API.