Skip to content

Menu

tldraw MCP Server logo

tldraw MCP Server

Published

At a glance

GitHub repository
tldraw/tldraw
Watch out for
The canvas only renders in clients that support the MCP Apps specification.

tldraw publishes its MCP server from the main tldraw monorepo, in the apps/mcp-app folder. It is an MCP App: alongside the tools, it serves a full tldraw canvas as a React widget that renders inside the host's iframe, so you and the agent work on the same board in the chat.

The production server runs on Cloudflare Workers. Its registry entry, io.github.tldraw/tldraw, lists a streamable HTTP remote at https://tldraw-mcp-app.tldraw.workers.dev/mcp and an SSE remote at /sse on the same host. Each MCP session is a Durable Object backed by SQLite that stores canvas checkpoints.

The design is unusual. Rather than one tool per shape, the agent gets a search tool over the extracted Editor API spec and an exec tool that runs JavaScript against the live editor in the widget. A focused editor proxy translates between a simpler shape format with plain string IDs and tldraw's internal shape types.

How it connects

Your AI app

An assistant or agent that supports MCP

tldraw MCP Server

Runs as

  • npx (Node.js)
  • Remote (HTTP)

Gives the agent

  • Search the Editor API
  • Drive the canvas with code
  • Simplified shapes
  • Checkpoints
  • Hosted remotes

tldraw

The data or system the tools act on

Your AI app talks to tldraw MCP Server over the Model Context Protocol, and the server carries out the work. Built from the setup and capability sections on this page.

What it can do

Search the Editor API
search queries the extracted tldraw Editor API spec inside a sandboxed dynamic worker, so the agent can look up methods before using them.
Drive the canvas with code
exec runs JavaScript against the live editor in the widget. The server creates a pending request, the widget runs it and returns the result through the app-only _exec_callback tool.
Simplified shapes
The focused editor proxy lets the agent work with flat _type shapes and simple string IDs instead of TLShape and TLShapeId internals.
Checkpoints
save_checkpoint and read_checkpoint are app-only tools the widget uses to persist canvas state to the Durable Object's SQLite store and to browser local storage.
Hosted remotes
Both streamable HTTP and SSE endpoints are published in the server.json registry entry.

Setting it up

In Cursor, add a server to ~/.cursor/mcp.json under mcpServers named tldraw with "transport": "http" and "url": "https://tldraw-mcp-app.tldraw.workers.dev/mcp". In Claude Desktop the README says to use the in-app connector flow rather than the config file: open Customize, then Connectors, choose Add custom connector, give it a name such as tldraw and paste the same URL. The README notes that Add custom connector is not available on the free plan. To run it locally, build the core packages with pnpm build from the repo root, then run pnpm dev in apps/mcp-app, which starts an HTTP MCP server on localhost:8787. Connect to that from Cursor or Claude Desktop with "command": "npx" and "args": ["-y", "mcp-remote", "http://127.0.0.1:8787/mcp"].

Run in a terminal
claude mcp add --transport http tldraw https://tldraw-mcp-app.tldraw.workers.dev/mcp

If the server needs a sign-in or an API key, the setup notes above say which. Combine several servers in the MCP config generator

Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)

Where it helps

  • Lay out a flowchart or system diagram on a tldraw canvas from a prompt, then rearrange it yourself in the same view.
  • Ask the agent to look up an Editor API method with search and then apply it across many shapes with exec.
  • Collaborate on a whiteboard sketch inside Claude Desktop or Cursor without leaving the chat.
  • Run the worker locally while building tldraw integrations and test it through mcp-remote.

Limitations and things to watch

  • The canvas only renders in clients that support the MCP Apps specification.
  • exec runs agent-written JavaScript against the live editor, so a bad script can change or delete shapes on the board.
  • Each session keeps at most 50 checkpoints and is destroyed after 7 days without a checkpoint save.
  • Adding the remote server as a custom connector in Claude Desktop needs a paid plan, according to the README.
  • Local development requires building the whole tldraw monorepo first, since the widget depends on generated API files.

Sources

Written from the project's own documentation, checked November 2026.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…