VisioMCP
VisioMCP is a Windows MCP server that lets AI clients create, edit, read, and export Microsoft Visio diagrams via COM automation.
Document management: check Visio status, launch Visio, create/open/save/close documents, and inspect document info.
Page management: list pages and create new pages.
Shape management: add shapes (flowchart, network, UML, and basic geometry), set text, move, resize, delete shapes, and list shapes or current selection.
Connector management: connect shapes with labeled connectors and inspect existing connections.
Export: export documents or pages to PNG, PDF, SVG, EMF, or VSDX.
Diagram generation: use a high-level analyze → plan → design pipeline to generate diagrams from natural-language requirements, with support for stencil resolution, layout planning, and validation.
Click on "Deploy 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., "@VisioMCP Create a flowchart for the login process"
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.
VisioMCP
A Windows MCP server that controls Microsoft Visio via COM automation.
Any MCP-compatible AI client can create, edit, read, and export Visio diagrams by calling clean, structured tools — without knowing anything about COM.
AI Client (Claude, GPT, etc.)
↕ MCP / stdio
VisioMCP (npx / node)
↕ Windows COM
Microsoft VisioQuick Start
Prerequisites
Windows 10 or 11
Microsoft Visio (2013, 2016, 2019, 2021, or Microsoft 365)
Node.js 18+
An MCP-compatible AI client (Claude Desktop, Claude Code, etc.)
The "Desktop development with C++" workload from Visual Studio Build Tools —
winax, the Windows COM bridge VisioMCP uses to talk to Visio, is a native addon compiled on install. This is a one-time setup step, same as any other native Node addon (e.g.keytar,robotjs).
Install
Add VisioMCP to your MCP client config — no download or installer needed, npx fetches and runs the package on first use:
{
"mcpServers": {
"visio": {
"command": "npx",
"args": ["-y", "visiomcp"]
}
}
}Restart your AI client. You should see Visio tools available. (npx will compile the native winax addon the first time it runs, which takes a little longer than a normal npx invocation — this only happens once.)
Prefer a permanent install? npm install -g visiomcp and point command at visiomcp directly instead of npx.
Related MCP server: Visio MCP Server
Tools
See TOOLS.md for the full list of available tools and their parameters.
Document tools: get_visio_status, open_visio, create_document, open_document, save_document, close_document, get_document_info
Page tools: get_pages, create_page
Shape tools: add_shape, set_shape_text, move_shape, resize_shape, delete_shape, get_shapes, get_selection
Connector tools: connect_shapes
Export tools: export_document
Diagram generation tools: list_diagram_types, get_type_vocabulary, resolve_stencil, validate_spec, analyze_requirement, plan_diagram, design_diagram — a higher-level analyze → plan → design pipeline: describe a diagram in plain language and let the AI drive real Visio stencils (UML Activity, Basic Flowchart) through automatic layered layout and orthogonal connector routing, instead of placing every shape by hand. See the diagram_from_requirement prompt and the Diagram Generation section of TOOLS.md.
Example: Diagram Generation (analyze → plan → design)
User: Draw a UML activity diagram for an online purchase flow.
AI calls:
1. list_diagram_types -> picks "activity"
2. get_type_vocabulary { diagram_type: "activity" }
3. analyze_requirement { diagram_type: "activity", nodes: [...], edges: [...] }
4. plan_diagram { spec: <analysis> } -> auto-layout + routing
5. resolve_stencil { diagram_type: "activity" }
6. design_diagram { spec: <positioned spec>, out_basename: "purchase-flow" }
-> purchase-flow.vsdx + purchase-flow.png, real UML masters, orthogonal connectorsExample: Network Diagram (low-level shape tools)
User: Create a network diagram with a router, firewall, and server.
AI calls:
1. open_visio
2. create_document
3. add_shape { type: "rectangle", x: 4, y: 1, text: "Router" }
4. add_shape { type: "rectangle", x: 4, y: 3, text: "Firewall" }
5. add_shape { type: "rectangle", x: 4, y: 5, text: "Server" }
6. connect_shapes { fromShapeId: "Sheet.1", toShapeId: "Sheet.2" }
7. connect_shapes { fromShapeId: "Sheet.2", toShapeId: "Sheet.3" }
8. save_document { filePath: "C:\\Diagrams\\network.vsdx" }Configuration
Config file: %LOCALAPPDATA%\VisioMCP\config.json
{
"visioPath": "C:\\Program Files\\Microsoft Office\\root\\Office16\\VISIO.EXE",
"autoStartVisio": true,
"confirmDestructiveActions": false,
"logLevel": "info",
"comTimeoutMs": 30000,
"allowSilentOverwrite": false
}All fields are optional. VisioMCP auto-detects Visio if visioPath is not set.
You can also set VISIOMCP_VISIO_PATH as an environment variable.
Logs
Logs are written to: %LOCALAPPDATA%\VisioMCP\logs\visiomcp-YYYY-MM-DD.log
Never written to stdout (reserved for MCP protocol communication).
Security
No arbitrary COM execution exposed
No network server — stdio only
All file paths validated and normalized
No silent file overwrites by default
License
MIT
Available Tools
26 toolsadd_shapeB
Add a shape to a Visio page. Coordinates are in inches from the top-left corner.
Inputs: x (required), y (required), type (required), text, +4 more.
analyze_requirementA
PHASE 1 of diagram generation. You (the calling model) read the requirement, decide the diagram type, and extract the elements, then call this to validate the graph against that type's vocabulary (rejecting mixed element types) and get back a normalized analysis to pass into plan_diagram.
Inputs: edges, nodes, title, rationale, +2 more.
close_documentB
Close the active Visio document.
Inputs: save.
connect_shapesB
Draw a connector (arrow) between two shapes.
Inputs: toShapeId (required), fromShapeId (required), text, pageIndex.
create_documentA
Create a new blank Visio drawing document.
Inputs: no named parameters.
create_pageA
Add a new page to the active Visio document.
Inputs: name.
delete_shapeA
Permanently delete a shape from the page.
Inputs: shapeId (required), pageIndex.
design_diagramA
PHASE 3 of diagram generation. Renders the positioned spec in Visio and saves <out_basename>.vsdx plus <out_basename>.png. Resolves the diagram type's stencil first; if it is not installed this returns status "needs_download" and renders nothing unless allow_primitive_fallback=true. Visio stays open and visible.
Inputs: spec (required), out_dir, png_dpi, out_basename, +1 more.
export_documentB
Export the Visio document or a page to PNG, PDF, SVG, EMF, or VSDX.
Inputs: format (required), outputPath (required), pageIndex.
get_connectionsA
List all connectors on a page, showing which shapes they connect.
Inputs: pageIndex.
get_document_infoA
Get name, path, page count and save status of the active document.
Inputs: no named parameters.
get_pagesA
List all pages in the active Visio document with name, size, and shape count.
Inputs: no named parameters.
get_selectionA
Get the shapes currently selected in the active Visio window.
Inputs: no named parameters.
get_shapesA
List all shapes on a page with their IDs, positions, sizes, and text content.
Inputs: pageIndex.
get_type_vocabularyA
Return the full element vocabulary for one diagram type: each kind's Visio master, default size (px @96dpi), and default styling. Use this to build nodes with valid "kind" values for the chosen type.
Inputs: diagram_type (required).
get_visio_statusA
Check whether Microsoft Visio is running and return version and open document info.
Inputs: no named parameters.
list_diagram_typesA
List every diagram type this server can build (currently UML Activity and Basic Flowchart), with a one-line description and the element-kind vocabulary each type allows. Use this to choose a type when the requirement does not name one.
Inputs: no named parameters.
move_shapeB
Move a shape to a new position (top-left coordinates in inches).
Inputs: x (required), y (required), shapeId (required), pageIndex.
open_documentC
Open an existing Visio file (.vsdx or .vsd).
Inputs: filePath (required).
open_visioA
Start Microsoft Visio. Auto-detects the installation. Does nothing if already running.
Inputs: visioPath.
plan_diagramA
PHASE 2 of diagram generation. Takes the analysis (or any IR spec) and computes a concrete, positioned layout: ranks/rows, orthogonal edge routing through empty corridors, guard-label placement. Explicit x/y on any node or explicit edge waypoints are preserved (manual override).
Inputs: spec (required).
resize_shapeC
Resize a shape to new dimensions.
Inputs: width (required), height (required), shapeId (required), pageIndex.
resolve_stencilA
Resolve which installed Visio stencil supplies a diagram type's masters (discovery-first: running docs -> candidate files -> master index). Returns status "resolved" (with the stencil path) or "needs_download" when the stencil is not installed.
Inputs: diagram_type (required).
save_documentA
Save the active Visio document. Optionally save to a new path.
Inputs: filePath, overwrite.
set_shape_textB
Set or replace the text label of a shape.
Inputs: text (required), shapeId (required), pageIndex.
validate_specA
Validate a diagram spec (an IR object with diagram_type/nodes/edges). Runs vocabulary/structure checks and, if nodes are positioned, geometry checks (on-page, no overlaps). Returns { ok, problems }.
Inputs: spec (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Most tools map to distinct resource+action pairs like document, page, shape, connector, and diagram type, and the phase-labeled generation tools are clearly separated. The only mild overlap is between analyze_requirement and validate_spec, both validation-based, but their descriptions distinguish graph validation from full spec/geometry validation.
All 26 tools consistently use a snake_case verb_noun pattern such as get_document_info, create_page, add_shape, and design_diagram. Verb choices vary naturally by operation, but there are no mixed casing styles or inconsistent naming conventions.
26 tools is on the heavy side and slightly exceeds the typical well-scoped range, but the count is organized around app/document lifecycle, shape editing, export, and diagram generation. It feels one or two tools over rather than bloated.
The surface covers document lifecycle, page and shape manipulation, connectors, export, and a full diagram generation pipeline. Obvious gaps include page deletion/renaming, a stencil download tool for the needs_download path, and shape property editing beyond text and geometry.
Maintenance
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Read, query, edit and render DWG drawings with AI. No AutoCAD required.
Create, read and live-edit visual boards, Kanban plans, Gantt timelines and diagrams with AI agents.
Draw architecture diagrams, UML, planning boards and clickable wireframes from your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Microsoft Outlook emails, calendar events, contacts, and folders via COM automation.1MIT
- AlicenseNot gradedqualityFmaintenanceEnables to create and edit Microsoft Visio diagrams programmatically via a standardized API.2,680 PyPI87MIT
- FlicenseAqualityDmaintenanceDrives Microsoft Visio desktop via COM automation to create, style, and layout diagrams such as flowcharts and cloud architecture, then exports PNGs for visual feedback and iteration.231-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to drive Microsoft Word for Windows via COM automation, including opening and creating documents, editing text, managing paragraphs, tables, images, styles, tracked changes, and exporting to PDF.3MIT