diagram-master
MCP for Draw.io
claude mcp add --transport stdio thechandanbhagat-diagram-master node index.js
How to use
diagram-master is an MCP server that generates Draw.io compatible diagrams from natural language prompts using a single unified tool called create_diagram. It supports flowcharts, sequence diagrams, ERDs, network diagrams, and fully custom diagrams, all outputting valid Draw.io XML files that can be opened directly in Draw.io. To use it, run the server and invoke create_diagram with the appropriate type and data payload. The server is designed to output .drawio files to a configured directory and can be accessed by your AI assistants or automation pipelines to produce diagrams from prompts or structured prompts.
Once running, you can request diagrams by supplying a payload that includes the diagram type (flowchart, sequence, erd, network, or custom), a target filename, and a data object describing the diagram structure. For example, a flowchart requires steps and connections, a sequence diagram requires participants and interactions, and an ERD requires entities and relationships. The tool ensures the resulting file is Draw.io compatible and ready for import or editing in the Draw.io interface.
How to install
Prerequisites:
- Node.js (LTS version) and npm installed on your system
- Access to a terminal/command prompt
-
Clone the repository or download the project files
-
Install dependencies
npm install
- Run the MCP server
node index.js
-
(Optional) Configure per-environment output directory by setting DRAWIO_OUTPUT_DIR in your environment or within your hosting environment. This controls where the generated .drawio files are saved.
-
If you intend to integrate with Claude Desktop or other clients, prepare the appropriate mcpServers configuration snippet as shown in the README usage examples and load it into the client.
Additional notes
Tips and considerations:
- By default, the server outputs Draw.io compatible XML; ensure your downstream tooling expects .drawio files.
- If you want to customize where files are saved, set DRAWIO_OUTPUT_DIR in your environment before starting the server.
- For large diagrams, consider structuring the data to avoid overly large payloads in a single request.
- When using the CLI or integration with Claude Desktop, ensure the file path provided in the args points to the diagram generator entry point (index.js) in your deployment environment.
- If you encounter path or permission errors, verify file write permissions to the output directory and that the node process has access to that path.
Related MCP Servers
data-gov-il
Advanced MCP server for seamless access to Israeli Government Open Data
midnight
Midnight MCP server giving AI assistants access to Midnight blockchain — search contracts, analyze code, explore docs
israel-drugs
MCP server from DavidOsherdiagnostica/israel-drugs-mcp-server
CyberSecurity s
Model Context Protocol Server For Cyber Security
mcpdir
The largest open MCP server directory — 8,000+ community-driven Model Context Protocol servers. Open-source, fully searchable.
mcp-congress_gov_server
This is a Model Context Protocol (MCP) server designed to provide access to the official Congress.gov API (v3) using a hybrid approach.