一键导入
excalidraw-export
Export Excalidraw diagrams to excalidraw.com and return shareable URLs. Use after creating diagrams or when user requests a shareable link.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Export Excalidraw diagrams to excalidraw.com and return shareable URLs. Use after creating diagrams or when user requests a shareable link.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Remove temporary files, unused code, and compact documentation while preserving all production functionality. Cleans up debug data, Python cache files, temporary logs, and consolidates documentation.
Initialize this project
Write unit tests for main classes added to the events-agent project. Use when adding tests for new crawlers, repositories, data modules, or any main class. Follows pytest conventions and project test patterns.
| name | excalidraw-export |
| description | Export Excalidraw diagrams to excalidraw.com and return shareable URLs. Use after creating diagrams or when user requests a shareable link. |
Export diagrams created with the Excalidraw MCP server to excalidraw.com and get shareable URLs.
Apply this skill when:
After creating diagrams of system architecture, data flow, or component relationships:
docs/diagrams/ directory with descriptive namedocs/diagrams/README.md table with new entryExample instruction to user:
Diagram exported! Next steps:
1. Open: https://excalidraw.com/#json=abc123,def456
2. Click "Export image" → Download PNG
3. Save as: docs/diagrams/architecture.png
4. Update README.md:

[Edit diagram](https://excalidraw.com/#json=abc123,def456)
The Excalidraw MCP server must be configured in .mcp.json:
{
"mcpServers": {
"excalidraw": {
"command": "node",
"args": [
"/Users/iliazlobin/Code/mcp-servers/excalidraw-mcp-app/dist/index.js",
"--stdio"
]
}
}
}
When the diagram has been created with create_view, you'll have a checkpoint ID:
# Read the checkpoint data
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"export","version":"1.0"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"read_checkpoint","arguments":{"id":"<CHECKPOINT_ID>"}}}' | node /Users/iliazlobin/Code/mcp-servers/excalidraw-mcp-app/dist/index.js --stdio | tail -1
Then export with full Excalidraw JSON format:
# Export to excalidraw.com
cat <<'EOF' | node /Users/iliazlobin/Code/mcp-servers/excalidraw-mcp-app/dist/index.js --stdio 2>/dev/null | tail -1 | jq -r '.result.content[0].text'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"export","version":"1.0"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"export_to_excalidraw","arguments":{"json":"<FULL_EXCALIDRAW_JSON>"}}}
EOF
If you have the elements array directly, wrap it in the Excalidraw format:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [<YOUR_ELEMENTS>],
"appState": {
"viewBackgroundColor": "#ffffff"
}
}
Required fields for each element:
type, id, x, y, width, heightstrokeColor, strokeWidth, roughness, opacity, seed, version, versionNonce, isDeleted, boundElements, updated, link, lockedCreate a helper function to simplify export:
#!/bin/bash
# Usage: export_diagram.sh <checkpoint_id>
CHECKPOINT_ID="$1"
SERVER_PATH="/Users/iliazlobin/Code/mcp-servers/excalidraw-mcp-app/dist/index.js"
# Read checkpoint
checkpoint_data=$(cat <<EOF | node "$SERVER_PATH" --stdio 2>/dev/null | tail -1 | jq -r '.result.content[0].text'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"export","version":"1.0"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"read_checkpoint","arguments":{"id":"$CHECKPOINT_ID"}}}
EOF
)
# Parse elements array
elements=$(echo "$checkpoint_data" | jq -c '.elements')
# Build full Excalidraw JSON
full_json=$(jq -n \
--argjson els "$elements" \
'{
type: "excalidraw",
version: 2,
source: "https://excalidraw.com",
elements: $els,
appState: {
viewBackgroundColor: "#ffffff"
}
}')
# Export to excalidraw.com
export_request=$(jq -n \
--arg json "$full_json" \
'{
jsonrpc: "2.0",
id: 2,
method: "tools/call",
params: {
name: "export_to_excalidraw",
arguments: {
json: $json
}
}
}')
# Get URL
cat <<EOF | node "$SERVER_PATH" --stdio 2>/dev/null | tail -1 | jq -r '.result.content[0].text'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"export","version":"1.0"}}}
$export_request
EOF
# 1. Get checkpoint data
checkpoint_id="1ab772c7b5da4416ae"
# 2. Read checkpoint
data=$(cat <<'EOF' | node /Users/iliazlobin/Code/mcp-servers/excalidraw-mcp-app/dist/index.js --stdio 2>/dev/null | tail -1
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"export","version":"1.0"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"read_checkpoint","arguments":{"id":"1ab772c7b5da4416ae"}}}
EOF
)
# 3. Extract elements and build full JSON
elements=$(echo "$data" | jq -r '.result.content[0].text' | jq -c '.elements')
full_json=$(jq -n --argjson els "$elements" '{type:"excalidraw",version:2,source:"https://excalidraw.com",elements:$els,appState:{viewBackgroundColor:"#ffffff"}}')
# 4. Export and get URL
echo "$full_json" | jq -Rs '{jsonrpc:"2.0",id:2,method:"tools/call",params:{name:"export_to_excalidraw",arguments:{json:.}}}' | \
cat <(echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"export","version":"1.0"}}}') - | \
node /Users/iliazlobin/Code/mcp-servers/excalidraw-mcp-app/dist/index.js --stdio 2>/dev/null | tail -1 | jq -r '.result.content[0].text'
Success:
https://excalidraw.com/#json=RrLQKHus_a2E4bAUZeVT8,OlOu5-9pUaf-q_e9o9SC-A
Error:
Export failed: <error message>
"Export data exceeds 5 MB limit":
"Upload failed: 500":
"read failed: checkpoint not found":
$TMPDIR/excalidraw-mcp-checkpoints/ (local) or Upstash Redis (production).Empty response:
When viewing a diagram in Claude Desktop or an MCP client:
This skill is for programmatic/CLI export when you need the URL in the conversation response.
export_to_excalidraw tool has visibility: ["app"] in the server code, meaning it's primarily designed for widget UI calls