IM

isiec9ai/mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 65 趋势 8

It attaches to the running Visio instance through the COM running-object table, so the drawing on your screen is the drawing the model sees.

概览

It attaches to the running Visio instance through the COM running-object table, so the drawing on your screen is the drawing the model sees. It never launches a second, hidden copy of Visio and it never opens files behind your back — whatever is in front of you is what gets read and edited, live, with each tool call landing as a single Ctrl+Z step. - Windows, with Microsoft Visio installed (desktop Visio — the web app has no COM API) - Python 3.10 or newer - pywin32, installed automatically on Windows The server itself must run on the same Windows machine as Visio. It can't reach a Visio running on another host, in a VM, or in Visio for the web. Open Visio with the drawing you care about, then add the server. — in %APPDATA%\Claude\claude_desktop_config.json (see claude_desktop_config.example.json): Ask for visio_status first; it tells you which instance is attached and what it has open. Everything defaults to the document and page you are looking at.

README

以下为原文 README 节选,完整内容请查看原文。

visio-mcp

An MCP server that drives the Microsoft Visio window you already have open.

It attaches to the running Visio instance through the COM running-object table, so the drawing on your screen is the drawing the model sees. It never launches a second, hidden copy of Visio and it never opens files behind your back — whatever is in front of you is what gets read and edited, live, with each tool call landing as a single Ctrl+Z step.

you: "the approval box should say 'Legal review' and hang off the risk step"
     -> visio_list_shapes, visio_render_page, visio_set_shape_text, visio_connect_shapes

Requirements

  • Windows, with Microsoft Visio installed (desktop Visio — the web app has no COM API)
  • Python 3.10 or newer
  • pywin32, installed automatically on Windows

The server itself must run on the same Windows machine as Visio. It can’t reach a Visio running on another host, in a VM, or in Visio for the web.

Install

git clone https://github.com/isiec9ai/MCP.git visio-mcp
cd visio-mcp
py -m venv .venv
.venv\Scripts\pip install -e .

Point a client at it

Open Visio with the drawing you care about, then add the server.

Claude Code

claude mcp add visio -- C:\path\to\visio-mcp\.venv\Scripts\visio-mcp.exe

Claude Desktop — in %APPDATA%\Claude\claude_desktop_config.json (see claude_desktop_config.example.json):

{
  "mcpServers": {
    "visio": {
      "command": "C:\\path\\to\\visio-mcp\\.venv\\Scripts\\visio-mcp.exe",
      "args": []
    }
  }
}

Ask for visio_status first; it tells you which instance is attached and what it has open.

Tools

Everything defaults to the document and page you are looking at. Pass document (file name or 1-based index) and page (name or 1-based index) to work elsewhere. Coordinates and sizes are inches from the bottom-left of the page, and a shape’s x/y is its centre — matching Visio’s own ShapeSheet.

Reading

Tool What it does
visio_status Which Visio instance is attached, and what it has open
visio_list_documents Open drawings (add include_stencils for the rest)
visio_list_pages Pages, their size and shape counts
visio_list_shapes Shapes with the ids every editing tool needs, text, master, geometry
visio_get_shape One shape in full: Shape Data, user cells, layers, hyperlinks, neighbours
visio_list_connections The page as a graph, including connectors dangling at one end
visio_search_text Find shapes by text across every page
visio_list_masters Masters available to drop, from the drawing and open stencils
visio_render_page A PNG of the page, returned inline so the model can look at it
visio_export_page Write a page to .png/.jpg/.svg/.emf/… on disk
visio_export_pdf Export the document to PDF

Editing

Tool What it does
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "visio": { "command": "C:\\path\\to\\visio-mcp\\.venv\\Scripts\\visio-mcp.exe", "args": [] } } }