← 返回
内容创作 中文

Excalidraw Canvas

Create Excalidraw diagrams and render them as PNG images. Use whenever you need to draw, explain complex workflows, visualize UIs/wireframes, or diagram anyt...
创建Excalidraw图表并将其渲染为PNG图像。适用于绘图、解释复杂工作流程、可视化UI/线框图或绘制任何图表。
0xartex
内容创作 clawhub v1.0.0 1 版本 99918.4 Key: 无需
★ 0
Stars
📥 1,225
下载
💾 109
安装
1
版本
#latest

概述

Excalidraw Canvas

Render diagrams or any drawings as PNG via a hosted API. Always double-check coordinates of elements or arrows.

Render

RESULT=$(curl -s -m 60 -X POST https://excalidraw-mcp.up.railway.app/api/render \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"elements": [...]}')

# Save PNG
echo "$RESULT" | python3 -c "import json,sys,base64; d=json.load(sys.stdin); open('/tmp/diagram.png','wb').write(base64.b64decode(d['png']))"

# Get edit URL
echo "$RESULT" | python3 -c "import json,sys; print(json.load(sys.stdin)['editUrl'])"

Response: {"success": true, "png": "", "editUrl": "https://..../canvas/render-xxxxx"}

Always returns both the PNG image and an edit URL where your owner can modify the diagram in a full Excalidraw editor.

Element Types

All available types: rectangle, ellipse, diamond, text, arrow, line, freedraw

Shapes (rectangle, ellipse, diamond)

{"type":"rectangle","x":100,"y":100,"width":200,"height":80,"bg":"#a5d8ff","label":"My Box"}
{"type":"ellipse","x":100,"y":100,"width":150,"height":100,"bg":"#b2f2bb","label":"Node"}
{"type":"diamond","x":100,"y":100,"width":140,"height":100,"bg":"#ffec99","label":"Decision?"}
  • x, y — position
  • width, height — size
  • bg — any hex fill color
  • stroke — border color (default #1e1e1e)
  • label — text centered inside the shape

Text

{"type":"text","x":100,"y":50,"text":"Title","fontSize":28}

Arrows & Lines

{"type":"arrow","x":300,"y":140,"points":[[0,0],[150,0]]}
{"type":"line","x":0,"y":200,"points":[[0,0],[800,0]]}

Points are relative to x,y. Horizontal: [[0,0],[150,0]], vertical: [[0,0],[0,100]], bent: [[0,0],[0,50],[100,50]].

Freedraw

{"type":"freedraw","x":100,"y":100,"points":[[0,0],[5,3],[10,8],[20,15]]}

Freehand path — array of [x,y] points relative to position.

Full Example

RESULT=$(curl -s -m 60 -X POST https://excalidraw-mcp.up.railway.app/api/render \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"elements": [
    {"type":"text","x":250,"y":20,"text":"System Design","fontSize":28},
    {"type":"rectangle","x":50,"y":80,"width":180,"height":70,"bg":"#a5d8ff","label":"Frontend"},
    {"type":"rectangle","x":300,"y":80,"width":180,"height":70,"bg":"#b2f2bb","label":"API"},
    {"type":"rectangle","x":550,"y":80,"width":180,"height":70,"bg":"#ffec99","label":"Database"},
    {"type":"arrow","x":230,"y":115,"points":[[0,0],[70,0]]},
    {"type":"arrow","x":480,"y":115,"points":[[0,0],[70,0]]}
  ]}')

echo "$RESULT" | python3 -c "import json,sys,base64; d=json.load(sys.stdin); open('/tmp/diagram.png','wb').write(base64.b64decode(d['png'])); print(d['editUrl'])"

Sending to User

message(action="send", filePath="/tmp/diagram.png", caption="✏️ Edit: {editUrl}")

Always include the edit URL so the user can tweak the diagram.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 16:26 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,126
developer-tools

X/Twitter Research

0xartex
使用 twitterapi.io 在 X (Twitter) 上研究热门话题、推文、用户资料和对话,以获取洞察并生成趋势报告。
★ 0 📥 770
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,239