by GongRzhe
Provides programmatic creation, editing, and exporting of Microsoft Visio diagrams through a standardized API using Python and the COM interface.
Visio MCP Server enables automation of Visio diagram workflows, allowing scripts to create new files, add and connect shapes, insert text, export images, and perform other common editing tasks without manual UI interaction.
pip install pywin32
pip install mcp-server
python visio_mcp_server.py
uvx
as shown in the README.Q: Which operating system is required? A: Windows, because the server uses the COM interface to control Visio.
Q: Do I need a specific Visio edition? A: Any installed Microsoft Visio (Professional or Standard) works.
Q: Can I run the server without a visible Visio UI? A: Headless operation is planned for future releases; currently the Visio UI may appear during processing.
Q: How are shape types identified? A: Use the exact shape name (e.g., "Rectangle", "Circle"); unrecognized names fall back to a rectangle.
Q: What should I do if I encounter COM errors? A: Restart any hanging Visio processes, ensure you have sufficient permissions, and verify Visio launches manually.
A MCP server that provides tools for creating and editing Microsoft Visio diagrams programmatically via a standardized API.
Visio MCP Server allows you to automate Visio diagram creation and editing using Python. It leverages Microsoft's COM interface to control Visio, enabling you to programmatically create diagrams, add shapes, connect them, add text, and more.
mcp.server
win32com.client
(pywin32)pip install pywin32
pip install mcp-server
python visio_mcp_server.py
The server provides the following functionality:
Add the server to your MCP settings configuration file:
{
"mcpServers": {
"ppt": {
"command": "python",
"args": ["/path/to/ppt_mcp_server.py"],
"env": {}
}
}
}
If you have uvx
installed, you can run the server directly from PyPI without local installation:
{
"mcpServers": {
"ppt": {
"command": "uvx",
"args": [
"--from", "office-visio-mcp-server", "visio_mcp_server"
]
}
}
}
Creates a new Visio diagram.
{
"template_path": "[optional] Path to Visio template (.vstx, .vst)",
"save_path": "[optional] Where to save the file"
}
Example:
{
"save_path": "C:\\Users\\YourUsername\\Documents\\MyDiagram.vsdx"
}
Opens an existing Visio diagram.
{
"file_path": "Path to the Visio file to open"
}
Adds a shape to a Visio diagram.
{
"file_path": "Path to the Visio file",
"shape_type": "Type of shape (Rectangle, Circle, Line, etc.)",
"x": 1.0,
"y": 1.0,
"width": 1.0,
"height": 1.0
}
Connects two shapes in a Visio diagram.
{
"file_path": "Path to the Visio file",
"shape1_id": 1,
"shape2_id": 2,
"connector_type": "Dynamic, Straight, or Curved"
}
Adds text to a shape in a Visio diagram.
{
"file_path": "Path to the Visio file",
"shape_id": 1,
"text": "Text to add to the shape"
}
Lists all shapes in a Visio diagram.
{
"file_path": "Path to the Visio file"
}
Here's a complete workflow example:
{
"save_path": "C:\\Diagrams\\FlowChart.vsdx"
}
{
"file_path": "C:\\Diagrams\\FlowChart.vsdx",
"shape_type": "Rectangle",
"x": 2.0,
"y": 2.0,
"width": 1.5,
"height": 1.0
}
{
"file_path": "C:\\Diagrams\\FlowChart.vsdx",
"shape_type": "Circle",
"x": 5.0,
"y": 2.0,
"width": 1.0,
"height": 1.0
}
{
"file_path": "C:\\Diagrams\\FlowChart.vsdx"
}
{
"file_path": "C:\\Diagrams\\FlowChart.vsdx",
"shape1_id": 1,
"shape2_id": 2,
"connector_type": "Straight"
}
{
"file_path": "C:\\Diagrams\\FlowChart.vsdx",
"shape_id": 1,
"text": "Start"
}
The following features are planned for future releases:
Visio Not Launching:
Template Not Found:
Invalid Shape Type:
COM Errors:
This project is licensed under the MIT License - see the LICENSE file for details.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.