tldraw MCP
Allows for the management of local tldraw canvas files, providing tools to read, create, and search .tldr files, as well as perform CRUD operations on shapes within them.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tldraw MCPcreate a flowchart for the login process in auth.tldr"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@talhaorak/tldraw-mcp
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.
Related MCP server: Excalidraw MCP Server
Features
📖 Read — Load and parse
.tldrfiles✍️ Write — Create and update canvas files with validation
📋 List — Enumerate all
.tldrfiles with metadata🔍 Search — Full-text search across all canvases
🔷 Shape CRUD — Add, update, delete shapes programmatically
Installation
npm (recommended)
npx @talhaorak/tldraw-mcpFrom source
git clone https://github.com/talhaorak/tldraw-mcp.git
cd tldraw-mcp
bun install
bun run startConfiguration
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/filesOr install as a skill:
curl -fsS https://raw.githubusercontent.com/talhaorak/tldraw-mcp/main/SKILLS.md | bashEnvironment Variables
Variable | Default | Description |
|
| Base directory for |
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 testPublishing
./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_DIRFormat validation — All writes are validated against tldraw schema
No network access — Purely local file operations
License
MIT © Talha Orak
Related
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables creation, management, and export of Excalidraw drawings through natural language. Supports CRUD operations on drawings and export to SVG, PNG, and JSON formats with file-based storage.Last updated83,691The Unlicense
- Alicense-qualityDmaintenanceEnables AI agents to programmatically control a live Excalidraw canvas with element-level CRUD operations and real-time synchronization. It supports iterative diagramming through scene descriptions, screenshots, and advanced layout tools for collaborative AI-human workflows.Last updated1,931MIT
- Alicense-qualityCmaintenanceEnables Claude to draw on a live tldraw canvas from prompts, with real-time visualization in a browser. Provides tools for creating, updating, deleting shapes and retrieving canvas state.Last updated13MIT
- Alicense-qualityAmaintenanceEnables AI agents to read, write, search, and manage .klypix canvas files for persistent spatial memory across sessions.Last updated3,3644Apache 2.0
Related MCP Connectors
Create, validate, edit, export (markdown/svg/png/mermaid), and search JSON Canvas files.
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/talhaorak/tldraw-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server