Office-Visio-MCP-Server

Office-Visio-MCP-Server

A Model Context Protocol (MCP) server for creating, reading, and manipulating Microsoft Visio documents.

25
Stars
3
Forks
0
Releases

Overview

Visio MCP Server provides tools to automate Visio diagram creation and editing using Python on Windows via the COM interface. It enables programmatic creation of diagrams, adding shapes, connecting shapes with various connectors, placing and editing text, and listing shapes within a document. It also supports saving diagrams to specified paths, exporting diagrams as images, and closing documents safely. The server requires Windows, Microsoft Visio (Professional or Standard), Python 3.12+, and Python packages mcp.server and pywin32 (win32com). Setup steps include installing Visio, installing dependencies, cloning the repository, and running the server with python visio_mcp_server.py. Two MCP configuration options are provided: a Local Python Server setup and an UVX-based deployment that lets you run the server from PyPI without a local installation. The API exposes operations to create a new file (with optional template and save path), open a file, add shapes with coordinates and size, connect shapes with a connector type, add text to shapes, and list shapes. The README includes workflow examples for creating, shaping, connecting, and annotating diagrams.

Details

Owner
GongRzhe
Language
Python
License
MIT License
Updated
2025-12-07

Features

Creating and Opening Files

Create new Visio diagrams and open existing ones.

Shape Management

Add shapes (Rectangle, Circle, Line, etc.), connect shapes, add text, and list all shapes.

File Operations

Save diagrams to specified locations, export diagrams as images, and close documents safely.

API-based Operations

Operate Visio via JSON-based API actions for creating/opening files, adding shapes, connecting shapes and adding text.

MCP Configuration Options

Two deployment options: Local Python Server configuration or UVX-based deployment from PyPI.

Audience

DevelopersAutomate Visio diagram creation and editing through a standardized MCP API.

Tags

VisioMCPMicrosoft Visiodiagram automationWindowsPythonCOMpywin32Shape managementAPI