A modular client-server setup for generating Draw.io diagrams using natural language prompts. It uses LangGraph, LangChain, Gemini 2.5, and a FastMCP-based server to convert text into XML diagram code and serve it via a tool-based API.
- Streamlit client for chatting with the tool.
- Server powered by FastMCP that:
- Parses user prompt → instructions
- Generates draw.io XML from instructions
- Verifies XML
- Uses
gemini-2.5-flash-preview-05-20for generation. - Output is saved as
.drawioinyour~/Downloadsfolder.
├── client.py # Streamlit UI
├── server.py # FastMCP-based server
├── Dockerfile # Containerization setup
├── requirements.txt # Python dependencies
├── prompts/ # Prompt templates
├── LICENSE
├── README.md
pip install -r requirements.txtMake sure .env includes:
-
GROQ_API_KEY=your_key_here
-
GOOGLE_API_KEY=your_key_here
python server.pypython client.pydocker build -t drawio_mcp .
docker run -p 8000:8000 --env-file .env drawio_mcpCreate a workflow showing user login, verification, and dashboard redirection.