home / mcp / visio mcp server

Visio MCP Server

A Python-based MCP server that automates Visio diagram creation and editing via a standardized API.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "gongrzhe-office-visio-mcp-server": {
      "command": "python",
      "args": [
        "visio_mcp_server.py"
      ]
    }
  }
}

You can automate Microsoft Visio diagram creation and editing using this MCP Server, enabling you to programmatically create diagrams, add shapes, connect them, and manage text and exports through a standardized API using Python.

How to use

Using this MCP Server, you can perform common diagram tasks from your MCP client: create or open Visio documents, add shapes (Rectangle, Circle, Line, etc.), connect shapes with various connectors, attach text to shapes, list shapes in a document, and save or export diagrams. Use the MCP client to send requests that map directly to these capabilities and handle shapes, connections, and text in your Visio diagrams.

How to install

Prerequisites you need before running the server:

Windows operating system with Microsoft Visio installed and a supported Python version.

Install Python packages shown in the steps below.

Step by step setup

# Ensure Visio is installed on the system

# Install required Python packages
pip install pywin32
pip install mcp-server

# Run the MCP server from the command line
python visio_mcp_server.py

Configure your MCP client to use the Visio MCP Server

The server runs as a local Python process. To connect your MCP client, register a stdio MCP server that starts the Python process and runs the Visio MCP server script.

{
  "mcpServers": {
    "visio": {
      "type": "stdio",
      "name": "visio_mcp",
      "command": "python",
      "args": ["visio_mcp_server.py"],
      "env": []
    }
  }
}

Available tools

Create File

Create a new Visio diagram or open an existing one to begin editing.

Open File

Open an existing Visio file to modify shapes and connections.

Add Shape

Add a shape to the current Visio document, specifying type (Rectangle, Circle, Line, etc.) and its position and size.

Connect Shapes

Connect two shapes with a selected connector type (Dynamic, Straight, or Curved).

Add Text

Attach text to a specific shape to annotate the diagram.

List Shapes

List all shapes present in the active Visio document.

Save Diagram

Save the current diagram to a specified path.

Export Diagram

Export the diagram to image formats or PDFs if supported by the server.