canvas
Provides tools for reading and editing a tldraw canvas, including inspecting shapes and selection, creating/updating/deleting shapes, positioning and transforming shapes, laying out groups, drawing freeform strokes, taking screenshots, and controlling the viewport.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP canvas
A tldraw canvas that any MCP-capable agent can read and edit, the way the Fusion 360 MCP server lets an agent drive Fusion. The app makes no model calls and needs no API keys: the agent you already use (Cursor, Claude Desktop, or any other MCP client) does the thinking, and this project gives it tools for the canvas.
Agent (Cursor, Claude...) --MCP stdio--> mcp-server (Node) --ws://127.0.0.1:3711--> canvas page (browser)The browser tab is the document. The MCP server is a thin adapter: each tool call is forwarded to the open page, which applies it to the tldraw editor and sends the result back.
Setup (once)
Install dependencies:
npm installEnable the MCP server in your agent.
Cursor: this repo ships
.cursor/mcp.json, which registers a server namedcanvas. Open the project in Cursor, then go to Settings > MCP and turn oncanvas.Other MCP clients (for example Claude Desktop): add a stdio server that runs Node with absolute paths:
{ "mcpServers": { "canvas": { "command": "node", "args": [ "--import", "/absolute/path/to/this/repo/node_modules/tsx/dist/loader.mjs", "/absolute/path/to/this/repo/mcp-server/index.ts" ] } } }
Related MCP server: Excalidraw MCP Server
Daily use
Serve the canvas page:
npm run devOpen
http://localhost:5173/. The badge at the top of the canvas shows MCP server connected once your agent has started the MCP server. It reconnects by itself, so it doesn't matter which one starts first.Ask your agent to draw or edit. It calls the canvas tools, and the canvas updates in the browser. You can keep drawing yourself between agent turns, and each tool call is one undo step.
Keep the tab open while the agent works. If it's closed, tool calls fail with a message asking you to open the page again.
Tools
Reading the canvas:
Tool | What it does |
| List shapes on the current page, optionally only inside |
| List the shapes the user has selected. |
| Get the page area visible in the browser. |
| PNG of an area (defaults to the current viewport). |
| Move the user's camera to a page area. |
Editing the canvas:
Tool | What it does |
| Work with one shape. |
| Position a shape absolutely or relative to another shape. |
| Transform shapes around an origin point. |
| Lay out groups of shapes. |
| Reorder shapes. |
| Draw a freeform stroke through points. |
| Delete every shape on the page. |
Every edit tool returns the shapes it created, updated, and deleted. Shapes use a simplified "focused" format (_type, shapeId, x, y, w, h, color, fill, text, and so on), and that same format is what create and update accept. Coordinates are tldraw page coordinates, and shape IDs are plain strings like box1.
Project layout
mcp-server/: The MCP server (index.ts) and the websocket bridge to the page (bridge.ts). Cursor launches this;npm run mcpruns it by hand.client/: The canvas page.bridge/CanvasBridge.tsconnects to the MCP server, andbridge/runCanvasTool.tsruns each tool call. Edit tools go through the action utils inclient/actions/.shared/: Code used by both sides.tools.tsis the tool catalog (names, descriptions, input schemas),bridge.tsdefines the websocket messages,schema/AgentActionSchemas.tsdefines the edit tools' inputs, andformat/converts between tldraw shapes and the focused format.
Adding an edit tool
Add a Zod schema with a
_typeliteral toshared/schema/AgentActionSchemas.ts.Add an action util in
client/actions/that extendsAgentActionUtiland implementsapplyAction(andsanitizeActionif it needs validation). Wrap it inregisterActionUtil, then import it inclient/agent/managers/AgentActionManager.ts.Register the tool in
CANVAS_TOOLSinshared/tools.tswithactionTool(name, schema, description).Restart the MCP server in your agent so it picks up the new tool, and reload the page.
Read-only or camera tools that don't change shapes are kind: 'editor' entries in CANVAS_TOOLS, handled in the switch in client/bridge/runCanvasTool.ts.
Troubleshooting
Badge says "Waiting for MCP server": The agent hasn't started the server. In Cursor, check that
canvasis enabled under Settings > MCP.Tool error about port 3711: Another copy of the MCP server is already running, for example from a second Cursor window. Only one can own the bridge port; disable the extra one.
"No canvas page is connected": Run
npm run devand openhttp://localhost:5173/.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Real-time collaborative whiteboard — AI agents and humans edit the same board live over MCP.
Live, editable canvas for AI agents — author graphs via MCP, then watch and reroute runs live.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP-first toolbox for agents: KV storage, auth, queue, and utility tools. Free in early access.
Related MCP Servers
- AlicenseAqualityDmaintenanceA minimal MCP server for AI-driven canvas manipulation and visualization using tldraw. It enables AI clients to programmatically create, update, and manage shapes, flowcharts, and frames on a live interactive canvas.92MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to programmatically control a live Excalidraw canvas through element-level CRUD operations and real-time synchronization. It allows agents to iteratively build, inspect, and refine diagrams while providing visual feedback via screenshots and scene descriptions.4,642 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to create and manipulate live visual diagrams on an Excalidraw canvas in real-time via MCP tools.3,455 npm40 PyPI15BSD 3-Clause
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to collaboratively draw and annotate Excalidraw diagrams in real-time via MCP tools, synced to a browser canvas.10Apache 2.0