Integration
MCP Server
Use the Model Context Protocol server to let AI assistants generate diagrams from chat.
The MCP server exposes diagram generation tools to AI assistants. This makes the project useful not only as a CLI or website, but also as part of agent workflows.
Typical usage is: an assistant writes DAC YAML from a human request, invokes the MCP tool, and saves the result as PNG or draw.io.
Install MCP server
bash
go install github.com/awslabs/diagram-as-code/cmd/awsdac-mcp-server@latest
Claude Desktop configuration
json
{
"mcpServers": {
"diagram-as-code": {
"command": "awsdac-mcp-server",
"args": []
}
}
}Available tools
| Tool | Description |
|---|---|
| create_diagram | Generate PNG from DAC YAML |
| create_drawio | Generate draw.io XML from DAC YAML |
Example prompt
text
Create an AWS architecture diagram with: - one VPC - two public subnets - an internet-facing ALB - two EC2 instances - an Internet Gateway Return PNG output and save it to ~/Desktop/architecture.png