draft1-mcp
Allows generating architecture diagrams from Kubernetes configuration files.
Allows generating architecture diagrams from Mermaid diagram definitions.
Allows generating architecture diagrams from Terraform code.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@draft1-mcpGenerate a diagram of my docker-compose"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
draft1-mcp
MCP server for draft1.ai — generate and iterate on draw.io-style architecture diagrams from natural language or code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML) directly from Claude Code, Claude Desktop, Cursor, or any MCP client.
Tools
Tool | Arguments | What it does |
|
| Creates a diagram from a description or pasted source code. Returns the share URL, a |
|
| Applies a plain-English change to an existing diagram (e.g. "add a redis cache between the api and the db"). |
Related MCP server: AI Charts
Requirements
Node.js >= 18.17
A draft1 API key — create one at app.draft1.ai (account settings)
Configuration
Environment variable | Required | Description |
| yes | Your draft1 API key |
| no | API base URL override (default |
Install
Claude Code
# once the package is published to npm:
claude mcp add draft1 --env DRAFT1_API_KEY=YOUR_KEY -- npx -y github:abdelhadi-azouni/draft1-mcp
# from a local checkout (this repo):
npm install && npm run build
claude mcp add draft1 --env DRAFT1_API_KEY=YOUR_KEY -- node /absolute/path/to/draft1-mcp/dist/index.jsThen in Claude Code: "generate a diagram of my terraform in ./infra".
Claude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"draft1": {
"command": "npx",
"args": ["-y", "draft1-mcp"],
"env": { "DRAFT1_API_KEY": "YOUR_KEY" }
}
}
}(For a local checkout, use "command": "node", "args": ["/absolute/path/to/draft1-mcp/dist/index.js"] instead.)
Alternatively, bundle it as a one-click Claude Desktop extension: npx @anthropic-ai/mcpb pack in this directory (uses manifest.json; prompts the user for the API key on install).
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project:
{
"mcpServers": {
"draft1": {
"command": "npx",
"args": ["-y", "draft1-mcp"],
"env": { "DRAFT1_API_KEY": "YOUR_KEY" }
}
}
}Errors
401 — invalid
DRAFT1_API_KEY; create/rotate a key at app.draft1.ai (account settings).402 — out of credits; top up at app.draft1.ai. Both are returned as tool errors with the server's message, so the calling agent can relay them.
Development
npm install # also builds via the prepare script
npm test # builds, then runs node --test against dist/ with a mocked fetch
npm start # run the stdio server locally (requires DRAFT1_API_KEY)The server speaks MCP over stdio; stdout is reserved for the protocol and all logging goes to stderr.
Available Tools
2 toolsedit_diagramEdit an existing diagramA
Apply a plain-English change to a diagram previously created with generate_diagram (e.g. 'add a redis cache between the api and the db'). Returns the updated share URL.
| Name | Required | Description | Default |
|---|---|---|---|
| diagram_id | Yes | The diagram_id returned by generate_diagram (or a previous edit). | |
| instruction | Yes | The change to apply, in plain English. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It discloses that the change is applied and that an updated share URL is returned, but it does not mention whether the original diagram is overwritten, whether changes are reversible, or any error conditions. This is adequate but leaves gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no redundant phrases. It front-loads the action and purpose, then provides a concrete example and return value, making every word earn its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, two-parameter tool with no output schema, the description covers the essential context: what it does, an example of the instruction format, and the return value. It could add prerequisites or caveats, but the information provided is sufficient for basic use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters. The description adds an example instruction, but does not provide additional semantic detail beyond what the schema gives, meeting the baseline for full coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a specific verb+resource: 'Apply a plain-English change to a diagram previously created with generate_diagram.' It clearly distinguishes this from the sibling generate_diagram by focusing on editing existing diagrams, and includes a concrete example.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'previously created with generate_diagram' gives a clear prerequisite for when to use this tool. However, it does not explicitly state exclusions (e.g., when not to use it) or alternative tools beyond the implicit contrast with generate_diagram.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_diagramGenerate a diagramA
Generate a draw.io-style diagram with draft1.ai from a natural-language description or from source code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML). Returns a shareable URL plus a diagram_id for follow-up edits.
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Type of the input. Defaults to "auto" (the API detects the input type). | |
| prompt | Yes | What to diagram: a plain-English description (e.g. 'a web app with a load balancer, two app servers and a postgres db') or raw source code pasted verbatim. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description conveys key behavioral aspects: it creates a diagram, accepts various source formats, and returns a URL plus diagram_id. It does not disclose potential side effects like resource consumption or rate limits, but for a generation tool, the core behavior is disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded. The first sentence states the primary action and input types; the second explains the output and follow-up capability. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the description appropriately explains what is returned (shareable URL and diagram_id). It covers input formats and hints at subsequent editing. It lacks error-handling or authentication details, but these are not critical for a generation tool and the description is fairly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents both parameters well. The description adds context about input types and the auto-detection default, but this largely reinforces what the enum descriptions already convey. No significant additional parameter semantics are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool generates diagrams from natural language or source code, specifying the output (shareable URL + diagram_id) and hinting at the sibling tool for follow-up edits. It distinguishes itself well from edit_diagram.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states the input types (natural-language description or source code formats) and mentions that the returned diagram_id is for follow-up edits, implying when to use edit_diagram instead. However, it does not explicitly state when not to use this tool or provide direct alternative comparisons.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
edit_diagram - First observed
generate_diagram
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one creates diagrams, the other edits them. There is no overlap in functionality, so an agent can easily select the right tool based on whether a new diagram or a modification is needed.
Both tools follow the verb_noun pattern consistently: generate_diagram and edit_diagram. This provides a predictable and intuitive naming convention.
With only two tools, the set is on the thin side. For a diagram service, one might expect additional operations like list or delete, but the narrow scope of generating and editing makes the count borderline acceptable.
The core lifecycle of diagram creation and modification is covered. However, there is no way to list, delete, or retrieve a specific diagram by ID, which could be considered minor gaps, but the shareable URL and edit-by-ID cover the essential workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Collaborative whiteboard MCP server — create objects, connectors, C4 diagrams, and manage boards
Generate org charts, MCD/ERD data models, and C4 architecture diagrams — pilot OrgGen AI via MCP.
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Related MCP Servers
- AlicenseBqualityAmaintenanceAn MCP server that generates beautiful Excalidraw architecture diagrams with perfect auto-layout, stateful editing, and architecture-aware component styling.26148MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to programmatically create and manage flowcharts, ERDs, and swimlane diagrams. It provides tools for manipulating diagram structures, performing auto-layouts, and exporting to Mermaid or Markdown formats.2MIT
- AlicenseAqualityDmaintenanceAn MCP server that generates professional infrastructure diagrams using the Python diagrams DSL, with first-class Azure support and GitHub Copilot integration for natural language diagram generation.4MIT
- AlicenseNot gradedqualityCmaintenanceProfessional AI-powered architecture diagram generator with multi-cloud support and MCP server integration. Generates beautiful, accurate diagrams with provider-specific icons for AWS, Azure, GCP, Kubernetes, and more.11MIT