tldraw-mcp
Enables reading, writing, and validating .tldr files for tldraw, a headless implementation without browser dependencies.
README
tldraw-mcp — headless tldraw MCP server
Node-only MCP server exposing read_tldr, write_tldr, and validate_tldr tools.
No browser, no DOM, no React — runs in plain Node v24.
Pinned version
@tldraw/editor 5.1.1
@tldraw/store 5.1.1
@tldraw/tlschema 5.1.1
Verified import surface (tldraw 5.1.1)
| Symbol | Package | Notes |
|---|---|---|
Store (class) |
@tldraw/store |
Use directly — createTLStore from @tldraw/editor hangs the process |
createTLSchema |
@tldraw/tlschema |
NOT in @tldraw/editor for 5.x |
createShapeId |
@tldraw/tlschema |
|
createBindingId |
@tldraw/tlschema |
|
parseTldrawJsonFile |
@tldraw/tlschema |
For reading .tldr files |
toRichText |
@tldraw/tlschema |
Convert plain text → ProseMirror richText doc |
NEVER import the
tldrawumbrella package at runtime. NEVER callnew Editor()orcreateTLStorefrom@tldraw/editorin read/write/validate paths.@tldraw/tlschemais CJS — load viacreateRequirein.mjsfiles (named ESM imports fail).
Tools exposed
read_tldr— parse a.tldrfile, return records + schema versionwrite_tldr— accept a scene spec, build a.tldrfile envelopevalidate_tldr— validate a.tldrJSON blob against the live schema
Provisioning
Requires Node v24.
npm ci
npm run build
Built output: dist/index.js (ESM, produced by tsc).
MCP registration (LOCAL dev form)
Add to your repo's .mcp.json (already committed at repo root):
{
"mcpServers": {
"tldraw": {
"type": "stdio",
"command": "node",
"args": ["tools/tldraw-mcp/dist/index.js"]
}
}
}
The universal
npx -y github:jinsoo/tldraw-mcpform (see below) can also be used here once the standalone repo is published.
Upstream tracking
To upgrade to a newer tldraw release:
./track-upstream.sh
This bumps @tldraw/* in package.json, re-extracts src/defaults.json
via npm run probe-defaults, vendors a fresh llms-docs.txt, rebuilds,
and runs the full test suite. Do NOT run during active development.
llms-docs.txt
llms-docs.txt is the tldraw LLM reference doc vendored at the pinned version.
It is fetched by track-upstream.sh from https://tldraw.dev/llms-docs.txt.
.tldr file envelope
The correct write shape (do NOT use serializeTldrawJson — needs Editor):
{
tldrawFileFormatVersion: 1,
schema: store.schema.serialize(),
records: store.allRecords() // flat ARRAY, not a map
}
schemaVersion is 2 for tldraw 5.1.1.
Universal install (any agent)
Runs straight from GitHub — no npm account, no local checkout:
npx -y github:jinsoo/tldraw-mcp
Claude Code (.mcp.json):
{ "mcpServers": { "tldraw": { "type": "stdio", "command": "npx", "args": ["-y", "github:jinsoo/tldraw-mcp"] } } }
Any MCP host that registers stdio servers (config.yaml mcp_servers example):
tldraw: { type: stdio, command: npx, args: ["-y", "github:jinsoo/tldraw-mcp"], enabled: true }
Tools: read_tldr, write_tldr, validate_tldr.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.