Generate, validate, repair and style editable draw.io XML diagrams.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add smart-drawio --env SMART_DRAWIO_API_KEY='<SMART_DRAWIO_API_KEY>' -- npx -y @yunshenwuchuxun/smart-drawio-mcp~/.codex/config.toml
[mcp_servers.smart-drawio]
command = "npx"
args = ["-y", "@yunshenwuchuxun/smart-drawio-mcp"]
env = { SMART_DRAWIO_API_KEY = "<SMART_DRAWIO_API_KEY>" }
# codex mcp add smart-drawio --env SMART_DRAWIO_API_KEY='<SMART_DRAWIO_API_KEY>' -- npx -y @yunshenwuchuxun/smart-drawio-mcp~/.cursor/mcp.json
{
"mcpServers": {
"smart-drawio": {
"command": "npx",
"args": [
"-y",
"@yunshenwuchuxun/smart-drawio-mcp"
],
"env": {
"SMART_DRAWIO_API_KEY": "<SMART_DRAWIO_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"smart-drawio": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@yunshenwuchuxun/smart-drawio-mcp"
],
"env": {
"SMART_DRAWIO_API_KEY": "<SMART_DRAWIO_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"smart-drawio": {
"command": "npx",
"args": [
"-y",
"@yunshenwuchuxun/smart-drawio-mcp"
],
"env": {
"SMART_DRAWIO_API_KEY": "<SMART_DRAWIO_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"smart-drawio": {
"command": "npx",
"args": [
"-y",
"@yunshenwuchuxun/smart-drawio-mcp"
],
"env": {
"SMART_DRAWIO_API_KEY": "<SMART_DRAWIO_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"smart-drawio": {
"command": "npx",
"args": [
"-y",
"@yunshenwuchuxun/smart-drawio-mcp"
],
"env": {
"SMART_DRAWIO_API_KEY": "<SMART_DRAWIO_API_KEY>"
}
}
}
}需要的环境变量
SMART_DRAWIO_API_KEY
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。