Read, render and edit Visio files through a headless Rust engine, command line and MCP server.
Open-source alternatief voor Visio
Read, render and edit Visio files through a headless Rust engine, command line and MCP server. Reads diagrams, stencils and templates, renders PNG, SVG and PDF, and writes and authors drawings with glued connectors and routing.
READMEMisterDiagram/MisterDiagram op GitHub
Your diagrams, as requested. (Visio files without Visio!)
Tell Claude what you want drawn, in plain English, and get a real Visio .vsdx back. MisterDiagram has no GUI. Its interface is an MCP server (and a CLI for scripts), and its output is a file that opens in Visio without a repair prompt. "Make a flowchart of our onboarding process", "draw the org chart for these twelve people", "a network diagram with two offices, a firewall each and a VPN between them" become shapes dropped from stencils, glued connectors routed the way Visio routes them, and a .vsdx you can hand to whoever still has Visio.
Underneath is a clean-room, headless Rust implementation of Visio's file format and ShapeSheet. It reads and writes Visio drawings, stencils and templates, renders them to PNG, SVG and PDF, and exports them to PowerPoint. Each claim below has been measured against what Visio 2021 (and PowerPoint 2021, for the export) does with the same file.
Download: MisterDiagram 0.1.0-beta.8, the eighth beta (edits on drawings with stored formula errors, large pages to SVG and PDF), for macOS (universal), Windows (x64 and arm64) and Linux (x64 and arm64). The binaries are unsigned; docs/install.md covers checksums, the first-run warnings and MCP setup. Testers wanted: see below.
MisterDiagram's own renders. Each label gives the mean per-pixel distance from Visio 2021's PNG export of the same file, measured by the test harness; Visio's exports stay out of the repository.
MisterDiagram is headless by design. If you want a desktop app that opens and edits Visio files, these open-source projects have one (the ones I know of, in alphabetical order):
.vsd), draw.io and Excalidraw files, with an MCP server.All three are Rust and MIT or Apache-2.0, like this project. They are independent of MisterDiagram.
If you are building your own Visio-compatible tool and you have a licensed copy of Visio, you
can make the reference drawings this project is tested against.
tools/oracle/make-corpus.ps1 drives Visio through COM and
writes about 200 small drawings with one feature each: fill patterns and gradients, line
patterns and weights, every line end from 0 to 45 at three sizes, text layout, connectors and
routing, a page theme. Beside each drawing it saves Visio's own PNG, SVG and PDF and a dump of
every ShapeSheet cell, so you can compare your output with Visio's, picture by picture.
Two things to know before you run it:
common.ps1 from the same folder, and the image drawings
expect the sample files that make-assets.py makes.Download the archive for your platform and unpack it. docs/install.md walks through the first-run warnings on macOS and Windows.
Register the server with Claude Code, using the full path to the binary:
claude mcp add misterdiagram -- /full/path/to/misterdiagram mcp
Any MCP client works the same way: misterdiagram mcp speaks MCP over stdin and stdout.
docs/install.md has the setup for other
clients and for Windows paths.
Ask for a drawing, and say where to save it: "draw our two-office network with a firewall in each and save it as offices.vsdx", then "export it to PNG" or "export it to PowerPoint".
The server has seventeen tools: open, save, render and export documents, inspect documents and shapes, search and open stencils, drop masters, connect shapes, read and set ShapeSheet cells, and run any engine command or a batch of them. docs/mcp.md lists them with examples, including the office, SAN and fabric drawings the tests build.
M4 met its plan gates on 2026-10-15 and M5 on 2026-11-04. CI runs all eight gates on Linux, Windows and macOS, plus an Ubuntu check at the declared Rust minimum.
crates/sheet/src/functions/mod.rs's IMPLEMENTED registry. Inheritance covers
masters, style sheets and document defaults, with dirty-set recalculation. The full
oracle check passes its fixed floors, including 62,415/67,866 cached text metrics
and 54,548/58,180 COM text metrics.<text> that can be searched, selected and edited.
Use --font-names exact to name only the document face.run --batch FILE. The built-in network stencil provides eleven semantic
device masters as native editable geometry via stencil.open {"builtin":"network"}.The rulings behind each gate are dated in ROADMAP.md.
Rendering is close to Visio, but it is not complete appearance or cell parity. The main limits:
THEME() colour argument, the Text Callout cycle, SVG import).Every gap, with its measurements, is in docs/gaps.md.
All 85 native-opened field files now render, but this is not complete appearance or cell
parity. Timeline date labels, milestone positions and two caption colours, stored ActiveX
versus live-control appearance, 3D rotation, fine equipment details, repeated-master strict
evaluation and some master cells still differ. THEMEVAL retains 2,550 unequal secondary
backgrounds and dormant gradient angles. Container/list formulas, text wrapping, larger-page
routing, legacy formats, EMF+, compound line patterns, shadows, PowerPoint pattern fills and
masters with several top-level shapes remain limited. Large-drawing authoring is slow
(#39; measurements in
docs/gaps.md). From Microsoft's template catalogue, filed and open: THEME() with a colour
argument (#88) and the Text Callout cycle (#91). From the first batch of real company files,
filed and open: SVG import (#103). The 2026-11-03 batch (#112 to #117) is closed. Text in
an embedded picture that uses a symbol font or glyph indexes stays as outlines in SVG. One
field page sits about 15 px off Visio's image (a small aspect difference). Gradient
directions 10 to 13 keep a corner fallback, and gradients
with more than two stops keep a small angle difference from Visio.
SVG export does not write Visio's v: extension data, which Visio
reads when it imports an SVG. The bundled symbol face covers the dingbat, geometric, arrow and
pictograph blocks; Segoe UI Symbol's mathematics and Windows icon ranges, and the Wingdings and
Webdings symbol-charset fonts, are not covered (docs/gaps.md). Where a connector does reroute,
the path is this router's, not Visio's: all three connectors that rerouted on the witness
drawings differ from Visio's path (two take the other side of the obstacle, one bends
elsewhere); the 28 of 29 geometry witnesses still hold.
A to D row form, no
longer block edits.render to SVG or PDF keeps the size of a large page, up to 65,535 px per side at 96 dpi
(#120).On 307 real drawings that open, one added rectangle is accepted on 292 (290 on beta.7). For drawings without stored errors, output is byte-identical to beta.7. The full list of changes is in CHANGELOG.md.
MisterDiagram has been checked against Visio 2021 on drawings its own scripts made. Real drawings are the next test, and that needs people who use Visio at work. Beta binaries for macOS, Windows and Linux are on the Releases page; docs/install.md covers download, checksums, the first-run warnings for unsigned binaries and MCP setup. The most useful things to try:
info and render. Tell us which files
fail to open and where a render differs from what Visio shows.Report each finding as an issue, with the command you ran and what you expected. Please do not attach drawings that hold customer names, addresses or other private data: a small file that shows the same problem, or a screenshot and a description, is enough.
misterdiagram info drawing.vsdx
misterdiagram sheet drawing.vsdx --page 1
misterdiagram render drawing.vsdx --page 1 out.png
misterdiagram convert drawing.vsdx out.pptx
info lists the package parts. sheet prints every evaluated cell in the same columns as a
Visio COM dump, so the two diff directly. render also takes .svg, .pdf and .pptx output
names, and --masters stencil.vssx draws a contact sheet of a stencil. render and convert
accept --fit to crop PNG, SVG and PDF to foreground drawing content, including off-page
shapes. Add --margin "0.25 in" or --margin "5 mm" for padding on every side. No page margin
is added automatically. An empty fitted page keeps its original page size and reports a warning.
Session retention defaults to a 2 GiB ceiling; use --memory-limit <MiB> or
MISTERDIAGRAM_MEMORY_LIMIT (the flag wins) to change it without changing any per-file
admission bound.
To build from source you need Rust stable with edition 2024:
cargo build --release
target/release/misterdiagram info drawing.vsdx
Build the CLI with cargo build -p misterdiagram-cli, then run this script from the
repository root. The built-in network library provides eleven semantic device masters with native geometry; this example places them with tree layout and fits the page.
#!/usr/bin/env bash
# Contributor-original office network, MIT OR Apache-2.0. Run from the repository root.
set -euo pipefail
cli="${MISTERDIAGRAM_CLI:-target/debug/misterdiagram}"
out="${1:-target/office-network}"; image="${2:-docs/images/office-network.png}"
mkdir -p "$out" "$(dirname "$image")"
args=(--cmd 'stencil.open={"builtin":"network"}')
names=('Sky Internet' 'Alder Firewall' 'Birch Router' 'Cedar Core' 'Elm Access' 'Fir Access' 'Grove Server' 'Hazel Wi-Fi' 'Iris PC' 'Juniper PC')
masters=(network.cloud network.firewall network.router network.switch.core network.switch.access network.switch.access compute.server network.wireless_ap compute.desktop compute.desktop)
for i in "${!names[@]}"; do
args+=(--cmd "master.drop={\"master\":\"${masters[$i]}\"}" --cmd "shape.text={\"id\":$((i+1)),\"text\":\"${names[$i]}\"}")
done
args+=(--cmd 'layout.tree={"root":1,"edges":[[1,2],[2,3],[3,4],[4,7],[4,5],[4,6],[5,9],[6,10],[6,8]],"gutter_x":2,"gutter_y":0.5,"fit_page":true}')
"$cli" run "${args[@]}" --save "$out/office-network.vsdx"
"$cli" convert "$out/office-network.vsdx" "$image"
The same script is tools/examples/office-network.sh.
It saves target/office-network/office-network.vsdx and renders the image above.
Check it with python3 tools/check-layout.py target/office-network/office-network.vsdx --cli target/debug/misterdiagram --root 1 --fit-page.
run commits each command separately. Page numbers are one-based in Visio's order (foreground pages first, then background pages), shape IDs are
document IDs, lengths use inches and angles use radians. commands and describe
print the command schemas. misterdiagram mcp serves the same engine over stdio;
see the tools and examples.
See ROADMAP.md for the milestones and the numbers each one has to reach.
Beta. Milestones M0 to M5 (reading, evaluation, rendering, writing, authoring and routing, then MCP, layout and PowerPoint export) are met and independently reviewed, each under dated gate rulings recorded in the roadmap. The commands and MCP tools are settled; the work from here is correctness and fidelity, driven by tester reports. There is no GUI and none is planned in this repo, but anyone is welcome to build one on top: the core is the part that has to be right. See Looking for a GUI? for projects that have one.
The canonical repository is github.com/MisterDiagram/MisterDiagram. Issues, discussion and pull requests go to this repository.
Clean room. Visio is observed only as a black box, on drawings this repo's own scripts made, in a licensed copy of Visio Standard 2021. File formats come from Microsoft's published references, cited in doc comments and collected in docs/sources.md. No Microsoft stencils, templates, icons or fonts are in this repository; the reference corpus is private for that reason, and the scripts to regenerate it with your own Visio are in tools/oracle. Every milestone is a number produced by the test harness against Visio's output, with floors that only rise. Details are in docs/provenance.md.
It is built in the mould of the Craft apps (deckcraft, vectorcraft and their siblings) and shares their conventions. Code reused from them is MIT OR Apache-2.0 and is listed per file in ATTRIBUTION.md.
The project was called DiagramCraft until 2026-10-16, when it was renamed out of respect for DiagramCraft, an older open-source diagram editor with that name.
MisterDiagram is not affiliated with, endorsed by or sponsored by Microsoft. Microsoft Visio is a trademark of Microsoft Corporation.
Build gates, the oracle VM workflow, corpus pinning and contact sheets are in docs/development.md. Operating rules for agents are in AGENTS.md; layers and architecture in docs/architecture.md.
MIT OR Apache-2.0; see LICENSE-MIT, LICENSE-APACHE and NOTICE. The embedded fonts Carlito, Caladea, Arimo, Tinos and Cousine are under the SIL Open Font License 1.1.
Laatst bijgewerkt vanaf GitHub: 4 uur geleden
GitHub-cijfers worden een paar keer per dag ververst.
Log in of maak een account aan om te reageren.
Nog geen reacties. Wees de eerste.
Laat het zien: een live kaart met je positie en beoordeling, die zichzelf bijwerkt.
Liever de kleine? Voeg toe: ?style=flat