Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Tldraw

FreeStale (202d)

Enables AI agents to read, write, and search local tldraw (.tldr) files, providing a persistent visual scratchpad for diagramming and note organization. It supp

GitHubEmbed

About

Enables AI agents to read, write, and search local tldraw (.tldr) files, providing a persistent visual scratchpad for diagramming and note organization. It supports full CRUD operations on canvas shapes and metadata management for local canvas files.

README

npm version License: MIT

MCP (Model Context Protocol) server for managing local tldraw canvas files (.tldr).

What Makes This Different?

Existing tldraw MCP servers let AI draw on an in-memory canvas. This project is different — it reads, writes, and searches local .tldr files on disk, making tldraw a persistent visual scratchpad that AI agents can programmatically update.

Features

  • 📖 Read — Load and parse .tldr files
  • ✍️ Write — Create and update canvas files with validation
  • 📋 List — Enumerate all .tldr files with metadata
  • 🔍 Search — Full-text search across all canvases
  • 🔷 Shape CRUD — Add, update, delete shapes programmatically

Installation

npm (recommended)

npx @talhaorak/tldraw-mcp

From source

git clone https://github.com/talhaorak/tldraw-mcp.git
cd tldraw-mcp
bun install
bun run start

Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "tldraw": {
      "command": "npx",
      "args": ["@talhaorak/tldraw-mcp"],
      "env": {
        "TLDRAW_DIR": "/path/to/your/tldraw/files"
      }
    }
  }
}

OpenClaw

Add to your OpenClaw config:

mcp:
  servers:
    tldraw:
      command: npx
      args: ["@talhaorak/tldraw-mcp"]
      env:
        TLDRAW_DIR: /path/to/your/tldraw/files

Or install as a skill:

curl -fsS https://raw.githubusercontent.com/talhaorak/tldraw-mcp/main/SKILLS.md | bash

Environment Variables

Variable Default Description
TLDRAW_DIR ~/.tldraw Base directory for .tldr files

Tools

tldraw_read

Read a .tldr file and return its parsed content.

tldraw_read({ path: "notes.tldr" })

tldraw_write

Write or update a .tldr file (validates format).

tldraw_write({ 
  path: "notes.tldr",
  content: { /* tldraw file object */ }
})

tldraw_create

Create a new empty tldraw canvas.

tldraw_create({ path: "new-canvas.tldr", name: "My Canvas" })

tldraw_list

List all .tldr files with page/shape counts.

tldraw_list({ recursive: true })

tldraw_search

Search text content across all canvases.

tldraw_search({ query: "TODO", searchIn: "text" })

tldraw_get_shapes

Get all shapes from a file, optionally filtered by page.

tldraw_get_shapes({ path: "notes.tldr", pageId: "page:abc123" })

tldraw_add_shape

Add a new shape to a canvas.

tldraw_add_shape({
  path: "notes.tldr",
  shape: {
    type: "geo",
    x: 100,
    y: 100,
    props: {
      w: 200,
      h: 100,
      geo: "rectangle",
      color: "blue",
      fill: "semi"
    }
  }
})

tldraw_update_shape

Update properties of an existing shape.

tldraw_update_shape({
  path: "notes.tldr",
  shapeId: "shape:abc123",
  updates: { x: 200, props: { color: "red" } }
})

tldraw_delete_shape

Delete a shape from a canvas.

tldraw_delete_shape({
  path: "notes.tldr",
  shapeId: "shape:abc123"
})

Use Cases

  • Visual scratchpad for AI agents — AI updates a canvas you can view in tldraw
  • Diagram generation — Create flowcharts, architecture diagrams programmatically
  • Note organization — Search and organize visual notes across multiple canvases
  • Integration with tldraw desktop/VS Code — Files sync automatically

tldraw File Format

This server works with tldraw v2 format:

{
  "tldrawFileFormatVersion": 1,
  "schema": {
    "schemaVersion": 2,
    "sequences": { ... }
  },
  "records": [
    { "id": "document:document", "typeName": "document", ... },
    { "id": "page:xxx", "typeName": "page", ... },
    { "id": "shape:xxx", "typeName": "shape", "type": "geo", ... }
  ]
}

Development

# Install dependencies
bun install

# Run in development mode
bun run dev

# Type check
bun run typecheck

# Build for distribution
bun run build

# Run tests
bun test

Publishing

./scripts/publish.sh          # Auto-increment patch (0.1.0 → 0.1.1)
./scripts/publish.sh 0.2.0    # Use specific version
./scripts/publish.sh minor    # Bump minor (0.1.1 → 0.2.0)
./scripts/publish.sh major    # Bump major (0.2.0 → 1.0.0)

The script updates package.json, commits, tags, and pushes. GitHub Actions handles npm publish automatically via Trusted Publishers.

Security

  • Path traversal prevention — Relative paths can't escape TLDRAW_DIR
  • Format validation — All writes are validated against tldraw schema
  • No network access — Purely local file operations

License

MIT © Talha Orak

Related

  • tldraw — The infinite canvas
  • MCP — Model Context Protocol
  • OpenClaw — AI agent framework

from github.com/talhaorak/tldraw-mcp

Install Tldraw in Claude Desktop, Claude Code & Cursor

Recommended · one command, every IDE
unyly install tldraw-mcp

Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.

First time? Get the CLI: curl -fsSL https://unyly.org/install | sh

Or configure manually

Run in your terminal:

claude mcp add tldraw-mcp --env TLDRAW_DIR="" -- npx -y @talhaorak/tldraw-mcp

Step-by-step: how to install Tldraw

FAQ

Is Tldraw MCP free?

Yes, Tldraw MCP is free — one-click install via Unyly at no cost.

Does Tldraw need an API key?

Yes, it requires environment variables: TLDRAW_DIR. Unyly injects them into the config during install.

Is Tldraw hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Tldraw in Claude Desktop, Claude Code or Cursor?

Open Tldraw on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Changes

Versions and requested access over time.

  • New version published
  • New version published

Related MCPs

LibreOffice Tools

Enables AI agents to read, write, and edit Office documents via LibreOffice with token-efficient design. Supports multiple formats including DOCX, XLSX, PPTX, a

passerbyflutterby passerbyflutter

dannote/figma-use

Full Figma control: create shapes, text, components, set styles, auto-layout, variables, export. 80+ tools.

dannoteby dannote

Logo.dev

Search and retrieve company logos by brand or domain. Customize size, format, and theme to match your design needs. Accelerate design, prototyping, and content

NOVA-3951by NOVA-3951

Design Inspiration Server

Searches top design platforms like Dribbble and Behance to provide UI inspiration, color palettes, and layout patterns via the Serper API. It allows users to re

YonasValentinby YonasValentin

PIX4Dmatic

Enables GUI automation for controlling PIX4Dmatic on Windows through MCP. Supports launching, focusing, capturing screenshots, sending hotkeys, clicking UI elem

jangjo123by jangjo123

Figma

Extract design specs and assets

Figmaby Figma

mcp-dockmaster

An Open-Sourced UI to install and manage MCP servers for Windows, Linux and macOS.

by Community

ariekogan/ateam-mcp

Build, validate, and deploy multi-agent AI solutions on the ADAS platform. Design skills with tools, manage solution lifecycle, and connect from any AI environm

ariekoganby ariekogan

thinkchainai/mcpbundles

MCP Bundles: Create custom bundles of tools and connect providers with OAuth or API keys. Use one MCP server across thousands of integrations, with programmatic

thinkchainaiby thinkchainai

arikusi/nakkas

MCP server that turns AI into an SVG artist. One rendering engine with JSON config, AI controls all design parameters. CSS @keyframes + SMIL animations, 16+ ele

arikusiby arikusi

Compare Tldraw with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All design MCPs