architect-diagram-mcp
v1.0.1
Published
MCP Server for generating Cloud Architecture Diagrams
Downloads
12
Maintainers
Readme
Architecture Diagrams Generator
A streamlined tool to generate professional architecture diagrams using Python code.
🚀 Quick Start
Run the tool with your new project name:
.\draw.bat my_new_projectThis will automatically create a folder
projects/my_new_projectand a starter script if they don't exist.Edit the script: Open
projects/my_new_project/diagram.pyand define your architecture using Python code.Generate the image: Run the command again to generate/update the diagram:
.\draw.bat my_new_projectView the result: Your diagram will be saved to:
diagrams/my_new_project.png
📂 Directory Structure
projects/: Contains your generated project code.requirements/: Place your architecture descriptions (Markdown files) here.diagrams/: The output folder where generated PNG images are saved.utils/: Helper scripts for reading different file formats.draw.bat: The easy-to-use wrapper script to run the tool.draw.py: The main automation script.
🛠️ Prerequisites
- Python 3.6+
- GraphViz installed and added to PATH.
- Windows:
winget install -e --id Graphviz.Graphviz
- Windows:
- Python Dependencies:
python -m venv venv .\venv\Scripts\activate pip install diagrams
📝 Example Code
Here is a simple example of what diagram.py looks like:
from diagrams import Diagram, Cluster
from diagrams.azure.compute import AppServices
from diagrams.azure.database import SQLDatabases
from diagrams.onprem.client import Users
with Diagram("My Architecture", filename="diagrams/my_project", show=False):
user = Users("User")
with Cluster("Azure"):
app = AppServices("App")
db = SQLDatabases("DB")
user >> app >> db