Create, read, and update diagrams with Microsoft Visio Desktop MCP

Important

Microsoft Visio Desktop MCP is in preview. Preview software is for evaluation and isn't intended for production environments or critical workloads. Features might change before general availability.

With Visio Desktop MCP, you work with diagrams by describing what you want in your AI client's agent mode. This article shows how to create, read, and update diagrams, with example prompts that you can adapt.

Create a diagram

Describe the diagram you want in a natural language prompt, or give the agent the information it should contain. The agent finds the right Visio shapes and adds them in Visio with real connectors, containers, and swimlanes. Ask the agent to save when you want a .vsdx file.

You can start from:

  • A prompt that describes the diagram in your own words.
  • A data file, such as a CSV, JSON, or Excel export.
  • A table pasted into the chat.
  • A description, such as process notes, meeting notes, or requirements.

When you provide a file or text, your AI client reads it. Visio Desktop MCP doesn't import CSV, JSON, or Excel files itself.

Example: A hybrid network from a CSV file

A network diagram shows how devices connect across locations. In this example, a CSV file lists 31 devices in 7 locations: headquarters, a server room, two office floors, a DMZ, a branch office, and Azure. Each row is one link from a device to another device, with a label and the type of link:

DeviceID,Device,Type,Location,IPAddress,ConnectsTo,LinkLabel,LinkType
INET,Internet,Internet,Internet,,,,
R1,Edge Router 1,Router,Headquarters,203.0.113.2,INET,ISP A,Wired
R1,Edge Router 1,Router,Headquarters,203.0.113.2,FW1,,Wired
FW1,Firewall 1,Firewall,Headquarters,10.0.0.1,FW2,HA sync,Wired
BR,Branch Router,Router,Seattle branch,192.0.2.2,INET,SD-WAN (IPsec),SD-WAN
...

This is only the start of the file. Give the agent the complete file. Rows with the same DeviceID are different links from the same device, not extra devices.

Prompt:

Create a network diagram in Visio from contoso-network.csv in this folder. Each row is one link from DeviceID to ConnectsTo, and a row with no ConnectsTo is a device with no outgoing link. Use Cisco network shapes that match each device's Type. Put the devices in a container for each Location, and leave the Internet outside the containers. Label each link with its LinkLabel. Use solid lines for Wired links and dashed lines for Wi-Fi, VPN, and SD-WAN links. Add each device's IP address as Shape Data. Use a landscape 17 x 11 page, and add the title "Contoso hybrid network" and a small legend for the line styles. Check the layout and fix any overlaps, and then confirm that the diagram has 31 devices, 32 links, and 7 locations. Save it as contoso-network.vsdx in this folder, and tell me the full path.

The agent creates a container for each location, adds the 31 devices with matching network shapes and their IP addresses as Shape Data, and connects them with 32 labeled links. It then checks the layout, confirms the counts, and saves the file. The counts in your own prompt should come from your complete source file.

After you review the diagram, ask for focused fixes. In this example, a follow-up prompt like this one moved a link that crossed another location's container:

In contoso-network.vsdx, reroute Floor 2's 10 GbE uplink from Core Switch 2 so that it doesn't pass through the Server room container, and add space between the Domain Controller label and the SQL Server shape. Don't change anything else. Check the layout again, confirm the counts, and save the file.

A hybrid network diagram with containers for headquarters, the server room, two floors, a DMZ, a Seattle branch, and Azure. Labeled connectors link 31 devices, with dashed lines for the Wi-Fi, VPN, and SD-WAN links.

Note

Large diagrams take longer, because the agent builds, checks, and adjusts the layout. How long it takes depends on your source, the model you use, and your Visio setup.

More prompts to try

  • Create a flowchart for a customer support process: a customer opens a ticket, support triages it by priority, and an engineer resolves it or escalates it to the product team. Save it as support-process.vsdx.
  • Create an org chart from team.csv. Put each person under their manager, add their title and location as Shape Data, and save it.
  • Create an architecture diagram from this table of applications and their connections. Use the same shape for each application type, and put the internal systems in a container named Platform.
  • Turn these meeting notes into a basic flowchart of the approval process, and save it.

Read and analyze a diagram

Ask questions about an existing diagram. The agent reads its pages, shapes, text, connectors, swimlanes, containers, and Shape Data, and answers without changing the file. It can read the whole diagram, specific pages, one shape, or the shapes you've selected in Visio. To include changes that aren't saved yet, ask about the diagram that's already open.

Prompt:

Read contoso-network.vsdx. Don't change the file. Summarize the network in three sentences, list the devices in each location, list every link between two locations with its label, and tell me if any device has no connections.

The agent answers in the chat. For example, it lists the links between locations:

From To Label
Edge Router 1, Headquarters Internet ISP A
Edge Router 2, Headquarters Internet ISP B
Firewall 2, Headquarters DMZ Switch, DMZ No label
Core Switch 1, Headquarters Server Switch, Server room 10 GbE
Core Switch 1, Headquarters Access Switch 1, Floor 1 10 GbE
Core Switch 2, Headquarters Access Switch 2, Floor 2 10 GbE
Branch Router, Seattle branch Internet SD-WAN (IPsec)
VPN Gateway, Azure (East US) Internet Site-to-site VPN

Check the answers against your diagram and your source. Reading a diagram doesn't confirm that the network itself is correct.

More prompts to try

  • Read order-to-cash.vsdx and list every decision and where each branch goes.
  • Which steps in this process have no owner in their Shape Data?
  • Turn the steps in this flowchart into a numbered list that I can paste into a document.
  • Compare process-v1.vsdx and process-v2.vsdx and tell me which steps changed, without changing either file.

Tip

For very large diagrams, ask about a specific page, a few shapes, or a specific question. The agent gets better answers when it doesn't have to work through the whole diagram at once.

Update a diagram

Ask for a focused change instead of a new diagram. The agent reads the diagram first to find the exact shapes, makes only the change you asked for, and then saves when you ask.

Prompt:

In onboarding.vsdx, add a "Manager check-in" step between "Complete orientation" and "Ready to start". Match the style of the other steps, and replace only the affected connector. Don't change anything else. Save the updated diagram to the same file and tell me what changed.

An onboarding flowchart with a new Manager check-in step added between Complete orientation and Ready to start.

You can ask the agent to:

  • Add, rename, move, resize, restyle, or delete shapes.
  • Add, reconnect, relabel, or delete connectors.
  • Move shapes into or out of containers and swimlanes.
  • Add or change Shape Data and hyperlinks.
  • Add, rename, or delete pages, and apply a theme. These are separate from changes to page content, and a theme applies to all foreground pages.

Important

Changes aren't saved automatically. Ask the agent to save, or leave the changes unsaved so you can review them first. Keep a copy of important diagrams. You don't need to close the diagram between requests, but don't edit it yourself while the agent is working, and don't open another copy in a separate Visio window.

Best practices for Microsoft Visio Desktop MCP

Use your organization's shapes

Microsoft Visio Desktop MCP tools and capabilities