MCP server for draft1.ai - generate and edit draw.io-style architecture diagrams from prompts or code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML) from Claude Code, Claude Desktop, Cursor or any MCP client.
Two well-defined tools with clear naming (verb_noun pattern), comprehensive descriptions (194 - 250 chars), and complete input schemas using Zod with type constraints and parameter descriptions. Output is structured and actionable. Error handling is present but generic. No tool annotations (readOnlyHint/destructiveHint). Naming is clear and unambiguous; both tools follow single-responsibility principle. Descriptions explain WHAT, WHEN, and WHAT IS RETURNED. Parameters are typed and constrained (enums for format). However, output schema is documented only in prose (describeDiagram function), not as a formal JSON Schema. Error messages are user-friendly but lack recovery guidance (e.g., 'API key rejected' suggests checking DRAFT1_API_KEY, which is good, but no fallback options offered).
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.
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.
Output schema not formally documented. describeDiagram() returns prose text; no JSON Schema for diagram object (id, shareUrl, pngUrl, xml fields) is exposed to the LLM. LLMs cannot plan downstream operations without knowing response structure.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Both tools are WRITE operations (generate_diagram creates, edit_diagram modifies), but this is not declared. Agents cannot reason about side effects or retry safety.
Error handling lacks recovery guidance. Draft1ApiError messages are informative (e.g., 'API key rejected (401)') but do not suggest next steps. Pattern: 'User not found. Try search_users() with a partial name.' is missing.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 79 | 2026-07-28+ | v2 |
No input validation or constraint documentation for prompt parameter. Minimum length is enforced (minLength: 1) but no maximum, format hints, or examples of valid inputs (e.g., 'plain English or source code'). LLMs may pass excessively long or malformed prompts.
No pagination or result limiting documented. If diagram XML is large (KB-scale), responses could bloat context. No guidance on when to strip XML or offer summary-only mode.