LetDraw

io.github.letdrawv1.0.1更新于 Oct 3, 2026

Create, edit, share and export hand-drawn LetDraw diagrams, from code or a prompt.

已验证Streamable HTTP可网页运行Developer ToolsMedia & DesignProductivity & Workflow

概览

AI 生成的概览

让助手列出、创建、编辑、分享和导出手绘风格的 LetDraw 图表,并可从代码或提示词生成图表。

功能
通过托管的 MCP 服务器或本地 stdio 桥接,把 AI 客户端连接到 LetDraw 账户。它可以列出工作区、文件夹、图表和图标,创建与更新图表,从 Compose、Kubernetes、DOT、Terraform、SQL 等代码构建图表,添加真实产品图标,导出为 Mermaid 或 D2,并生成只读分享链接。仓库还提供类型化 REST SDK 与 OpenAPI 规范供脚本使用。
适用场景
适合让助手在 LetDraw 账户中创作或维护图表、把基础设施或数据库结构代码转成图表,或把已有图表导出为 Mermaid 或 D2。也适合需要同一套 REST API 的脚本。
运行要求
需要一个 LetDraw 账户,并在 Account > Developer 中创建个人 API 令牌:stdio 桥接使用 LETDRAW_TOKEN,托管端点使用 Authorization Bearer 头。stdio 桥接通过 npx 运行,因此需要 Node.js;托管端点需要网络访问。令牌的权限范围决定可执行的操作。
安装前请注意
该令牌是有效凭据,持有者可在其权限范围内操作账户,请勿放入共享配置或日志。可能执行图表的写入与删除、分享以及基于提示词的生成;生成会使用你自己的 AI 密钥。只读分享链接会让任何持有链接的人看到图表内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 LetDraw,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "letdraw": {
      "type": "http",
      "url": "https://api.letdraw.com/mcp"
    }
  }
}

README

[LetDraw]

LetDraw MCP + REST

Connect AI assistants and your own scripts to LetDraw — read and author diagrams in your account through the Model Context Protocol (MCP) or the public REST API.

[License: MIT] [Node 18+] [MCP: stdio + HTTP]

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.

What's here

PathWhat 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.mdThe MCP tools, resources, and scopes
spec/openapi.yamlOpenAPI 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

Endpoints

REST base   https://api.letdraw.com/api-v1MCP 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.

60-second start (MCP)

The hosted server speaks Streamable-HTTP, so most clients connect directly. For a stdio client, or for the simplest possible setup, use the bridge:

jsonc
// 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.

60-second start (REST)

bash
curl https://api.letdraw.com/api-v1/workspaces \  -H "Authorization: Bearer ld_live_YOUR_TOKEN"

Or with the SDK:

ts
import { LetdrawClient } from '@letdraw/sdk';const ld = new LetdrawClient({ token: process.env.LETDRAW_TOKEN! });const { workspaces } = await ld.listWorkspaces();

Scopes

Tokens carry scopes; each tool/route requires one:

  • diagrams:read — list/get workspaces, folders, diagrams, icons
  • diagrams:write — create/update/delete/share diagrams, from-code
  • export — export to Mermaid / D2
  • ai:generate — generate a diagram from a prompt (uses your own AI key)

License

MIT — see LICENSE. "LetDraw" and the LetDraw logo are trademarks of their owner; see NOTICE.md.

来源:README.md,提交 b21c95c

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v1.0.1最新Oct 3, 2026