Generate, validate, repair and style editable draw.io XML diagrams.
Runs on your machine from its package; the steps are below.

Not assessed yet.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y @yunshenwuchuxun/smart-drawio-mcp
MCP client config
{
"mcpServers": {
"smart-drawio": {
"command": "npx",
"args": [
"-y",
"@yunshenwuchuxun/smart-drawio-mcp"
]
}
}
}Create editable Draw.io diagrams from natural language or reference images, for research, documentation, and presentations.
Skill & MCP 0.1.0: GitHub release · MCP on npm · Official MCP Registry
| Home | Transformer |
|---|---|
![]() | ![]() |
| Swin-Transformer | CLIP |
|---|---|
![]() | ![]() |

smart-drawio-next is a diagram generation tool built with Next.js 16, embedded Draw.io, and streaming LLM APIs. It helps you:
The project includes multi-model configuration, workspace recovery, generation history, and notifications. It can be deployed as a personal tool or an internal team service.
Version 0.1.0 is published. Choose the entry point that fits your workflow:
| Entry point | What it does | Distribution | Model setup |
|---|---|---|---|
| Website | Generate from text or images, then edit the diagram in the embedded Draw.io canvas | Hosted app or self-hosted Next.js | Configure your provider in the browser |
smart-drawio Skill | Guide an agent through creating, editing, checking and saving editable diagrams | GitHub Skill and release ZIP | Uses the agent's own model |
| Smart Drawio MCP | Generate, validate, repair and style XML through local stdio tools | npm package and Registry entry | Only generate_drawio needs model API settings |
Install the fixed release:
npx skills add https://github.com/yunshenwuchuxun/smart-drawio-next/tree/tools-v0.1.0/skills/smart-drawio
The Skill is distributed as GitHub files, with no separate npm package. npx skills runs the general Skills CLI, which downloads the Skill from the repository. Its Python 3 validator works offline without third-party dependencies; MCP is optional.
Example agent request:
Use
$smart-drawioto create an original encoder–decoder Transformer diagram, save it as transformer.drawio, and check its connectors and labels.
Use Node.js 20.9 or later and a client that supports local stdio MCP. For clients using mcpServers JSON:
{
"mcpServers": {
"smart-drawio": {
"command": "npx",
"args": ["-y", "@yunshenwuchuxun/smart-drawio-mcp@0.1.0"]
}
}
}
The client starts the server and communicates over stdin/stdout. Configure SMART_DRAWIO_PROVIDER, SMART_DRAWIO_BASE_URL, SMART_DRAWIO_API_KEY and SMART_DRAWIO_MODEL in the MCP process environment to enable generation through your OpenAI/Anthropic-compatible provider.
| Tool | Function | Model API required |
|---|---|---|
generate_drawio | Create complete, validated XML from a text prompt | Yes |
validate_drawio | Check XML syntax, IDs, parents and references | No |
repair_drawio | Conservatively repair supported missing closing tags | No |
style_drawio | Apply themes, style packs, presets and drawing tricks | No |
list_drawio_options | List supported types, themes and tool options | No |
The MCP server returns uncompressed XML for the client to save. PNG/SVG/PDF previews and exports need an available Draw.io renderer or editor. Version 0.1.0 provides local stdio tools; the Registry link is installation metadata, and the Vercel URL is the website. This package has no remote HTTP MCP endpoint or live canvas session control.
Both examples below were rendered using the official Draw.io viewer and are available as editable files:
| Skill workflow | MCP generation workflow |
|---|---|
![]() | ![]() |
| Editable .drawio | Editable .drawio |
The Skill example used the agent's own model. The MCP example used a real OpenAI-compatible API request for codex/gpt-6.1-sol, then MCP validation and Draw.io rendering. The original MCP output includes one annotation crossed by a connector; the examples retain their actual outputs.
Release CI passed 291 JavaScript tests, 11 Python tests and 8 browser tests, plus lint, production build and isolated package installation. Public Skill installation and npm MCP handshake/tool calls were also verified.
See MCP setup, Skill installation, and version downloads. The Next.js application remains independently deployable to Vercel.
The app supports 20+ diagram types. You can choose one explicitly or let the model decide:
10 built-in color themes are available:
After generation, you can continue refining the diagram in the sidebar tools panel. All operations are XML-based transforms.
Used for bulk layout and connector refinement:
Used for stackable visual effects:
Used for one-click full visual styles:
Used for batch text formatting:
| Baseline: no style | Preset: comic + cross-hatch |
|---|---|
![]() | ![]() |
| Style pack: blueprint tech | Style pack: business clean |
|---|---|
![]() | ![]() |
Input Area (Chat + ImageUpload)
Code Editor
Canvas
Support Modals
ConfigManagerHistoryModalOptimizationPanelThe website and tools share the drawing core. To build and verify the packages from a source checkout:
pnpm build:mcp
pnpm test:tools
pnpm test:skill
pnpm verify:mcp
pnpm pack:tools
See packaging and publication for release checks. Publish only packages/mcp; the website's root package remains private.
@monaco-editor/reactgit clone https://github.com/yunshenwuchuxun/smart-drawio-next.git
cd smart-drawio-next
pnpm install
pnpm dev
Then open: http://localhost:3000
| Command | Description |
|---|---|
pnpm dev | Start development server |
pnpm build | Build for production |
pnpm start | Start production server |
pnpm lint | Run ESLint |
pnpm test -- run | Run unit tests |
docker compose up -d --build
Then open: http://localhost:3000
The image uses a multi-stage build and Next.js standalone output for deployment-friendly packaging.
Configure the provider, base URL, API key and model in the browser settings.
The current release uses the user's configuration for each generation request.
ACCESS_PASSWORD and SERVER_LLM_* are not implemented server-side configuration options.
If Docker needs a proxy or access to a model running on the host machine:
cp docker-compose.override.example.yml docker-compose.override.yml
Edit it for your environment, then restart:
docker compose up -d --build
Typical use cases:
docker compose logs -f app
docker compose down
docker compose up -d --build
docker compose ps
By default, users configure these in the UI:
Saved configurations persist in browser localStorage. Generation sends the active model configuration and input to the application's API route, which calls the selected model provider.
The applied diagram, unapplied code draft, text input, theme and presets are saved locally after changes and restored on reload. The header reports whether the draft was saved. Workspace snapshots exclude provider credentials and uploaded image data; images must be uploaded again after a reload.
Generation accepts requests up to 4 MiB and images up to 2 MiB to leave room for base64 encoding on Vercel. Model requests have a 240-second total deadline and a 60-second idle deadline. Stopping generation cancels pending retries and continuation requests as well as the upstream model request.
XML validation runs in browsers and Node.js. Each uncompressed page is checked independently for malformed XML, duplicate IDs, invalid parent chains and missing references. Compressed .drawio pages are not supported in this phase. Truncated output stays in the editor; explicitly applying it can repair missing closing tags and reports any discarded tail.
Legacy JSON input rejects unsupported or invalid elements without replacing the current diagram or draft. Explicitly applying [] creates an empty diagram and can be undone.
The saved configuration is stored locally in your browser. Each generation request sends the selected configuration, including the API key, to the application's server; the server uses that key to authenticate with your selected model provider. MCP generation uses the credentials configured in its process environment. The Skill can generate XML with the agent's own model without a separate diagram-generation API configuration.
The UI provides a continue-generation action automatically when needed.
Use a vision-capable model and make sure the image format and size are valid.
No. The app keeps only the most recent 20 entries by default.
MIT