Create, edit, share and export hand-drawn LetDraw diagrams, from code or a prompt.
LetDraw is a hand-drawn–style online whiteboard and diagramming app. With this integration an MCP client (desktop AI apps, Cursor, VS Code, Codex, …) or any HTTP client can list workspaces, create and update diagrams, build a diagram from code (compose / Kubernetes / DOT / Terraform / SQL / …), stamp real product icons, export to Mermaid or D2, and share read-only links.
This repository ships the client-side integration: a zero-config MCP bridge, a typed REST SDK, the API spec, and setup docs. The LetDraw app and server are not part of this repo.
| Path | What it is |
|---|---|
packages/mcp | @letdraw/mcp — zero-config stdio bridge to the hosted MCP server (npx @letdraw/mcp) |
packages/sdk | @letdraw/sdk — typed REST client for scripting |
spec/mcp-tools.md | The MCP tools, resources, and scopes |
spec/openapi.yaml | OpenAPI 3.1 spec for the REST API |
spec/capabilities.md | "How to draw well in LetDraw" guide for AI clients |
docs/ | Getting started + per-client setup (desktop apps, HTTP clients, Cursor, VS Code, Codex) |
examples/ | Copy-paste recipes |
REST base https://api.letdraw.com/api-v1
MCP URL https://api.letdraw.com/mcp
Both authenticate with a personal API token (Authorization: Bearer ld_live_…), not a login session. Create one in the LetDraw app under
Account → Developer. The exact URLs and a ready-to-paste client config are
shown there too.
The hosted server speaks Streamable-HTTP, so most clients connect directly. For a stdio client, or for the simplest possible setup, use the bridge:
// MCP client config (mcpServers block)
{
"mcpServers": {
"letdraw": {
"command": "npx",
"args": ["-y", "@letdraw/mcp"],
"env": { "LETDRAW_TOKEN": "ld_live_YOUR_TOKEN" }
}
}
}
See docs/clients for desktop apps, HTTP clients, Cursor, VS Code and Codex.
curl https://api.letdraw.com/api-v1/workspaces \
-H "Authorization: Bearer ld_live_YOUR_TOKEN"
Or with the SDK:
import { LetdrawClient } from '@letdraw/sdk';
const ld = new LetdrawClient({ token: process.env.LETDRAW_TOKEN! });
const { workspaces } = await ld.listWorkspaces();
Tokens carry scopes; each tool/route requires one:
diagrams:read — list/get workspaces, folders, diagrams, iconsdiagrams:write — create/update/delete/share diagrams, from-codeexport — export to Mermaid / D2ai:generate — generate a diagram from a prompt (uses your own AI key)MIT — see LICENSE. "LetDraw" and the LetDraw logo are trademarks of their owner; see NOTICE.md.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @letdraw/mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-letdraw-letdraw": {
"command": "npx",
"args": [
"-y",
"@letdraw/mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup reference@letdraw/mcpnpmLetDraw works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.