Microsoft 365 Visio / diagram publishing
MCP Server
Version 2.0.0 replaced a package that did not exist. This skill previously invoked
npx -y @anthropic-ai/microsoft-graph-mcp (404 on npm) and documented two graph_*
tool names that exist in no server. The tool names below came from the live server.
The filter is mandatory
Unfiltered, the server exposes 188 tools at ~225,355 tokens — 45× the 5,000-token ceiling.
Keep the filter as narrow as the task allows.
This invocation can write — treat it accordingly
--read-only is omitted here on purpose, which makes this the one M365 surface that changes
remote state. Under Principle III a write to a system of record is gated: confirm the target
path and filename with the operator before uploading, and never overwrite an existing item
without saying so first. Use msgraph-files for anything that only needs reading.
Verified tools
| Tool |
What it does |
upload-file-content |
write file bytes to a drive path — the write |
get-drive-item |
metadata for one item, to check whether you are about to overwrite |
list-folder-files |
folder contents, to confirm the destination exists |
login / verify-login |
device-code sign-in and session state |
There are no graph_* tools, and there is no Visio rendering or conversion tool. This
surface moves files; it does not open or edit Visio documents.
Workflow: publish a generated diagram
verify-login, and login if needed — surface the device code, never fabricate a session
list-folder-files on the destination folder — confirm it exists and note existing names
get-drive-item on the intended filename — is this an overwrite? If so, say so and get
confirmation before proceeding
upload-file-content with the bytes
- Report the resulting item id and path. Do not claim success without the server's response.
Produce the .vsdx itself with document-generation or a diagram skill; this skill only
publishes what already exists on disk.
Reading results honestly
- An upload confirms transfer, not correctness. That the bytes landed says nothing about
whether the diagram is accurate.
- A failed upload can leave a partial item depending on size and session; re-check with
get-drive-item rather than assuming a clean failure.
- There is no rename or delete here — the filter excludes them deliberately. Fixing a bad
filename is an operator action in the web UI.
Not verified
Tool names and manifest cost are measured; no upload has been performed. That needs an M365
tenant with write scope, which this environment does not have. The write path is
correct-by-construction and unproven.
Integration with Other Skills
| Skill |
How They Work Together |
msgraph-files |
Read-only inspection — prefer it whenever you are not writing |
document-generation, drawio-diagram, uml-diagram |
Produce the file this publishes |
gait-session-tracking |
Record every upload: path, filename, item id |
Environment Variables
MS365_MCP_CLIENT_ID — Entra ID app registration (client) ID
MS365_MCP_TENANT_ID — tenant ID, or common
1---
2name: msgraph-visio
3description: "Upload and retrieve Visio (.vsdx) and other diagram files in OneDrive/SharePoint via the Microsoft 365 MCP server. Use when publishing a generated topology diagram to OneDrive, or fetching an existing .vsdx for reference"
4version: 2.0.0
5license: Apache-2.0
6tags: [microsoft365, visio, onedrive, diagrams, upload]
7---
8
9# Microsoft 365 Visio / diagram publishing
10
11## MCP Server
12
13- **Package**: [`@softeria/ms-365-mcp-server`](https://www.npmjs.com/package/@softeria/ms-365-mcp-server) (MIT)
14- **Invocation** — deliberately **not** `--read-only`, because publishing requires a write:
15 ```
16 npx -y @softeria/ms-365-mcp-server --enabled-tools 'upload-file-content|drive-item|folder-files'
17 ```
18- **Requires**: an Entra ID app registration with delegated `Files.ReadWrite` scope.
19
20> **Version 2.0.0 replaced a package that did not exist.** This skill previously invoked
21> `npx -y @anthropic-ai/microsoft-graph-mcp` (**404 on npm**) and documented two `graph_*`
22> tool names that exist in no server. The tool names below came from the live server.
23
24### The filter is mandatory
25
26Unfiltered, the server exposes **188 tools at ~225,355 tokens — 45× the 5,000-token ceiling.**
27Keep the filter as narrow as the task allows.
28
29### This invocation can write — treat it accordingly
30
31`--read-only` is omitted here on purpose, which makes this the one M365 surface that changes
32remote state. Under Principle III a write to a system of record is gated: **confirm the target
33path and filename with the operator before uploading**, and never overwrite an existing item
34without saying so first. Use `msgraph-files` for anything that only needs reading.
35
36## Verified tools
37
38| Tool | What it does |
39|---|---|
40| `upload-file-content` | write file bytes to a drive path — **the write** |
41| `get-drive-item` | metadata for one item, to check whether you are about to overwrite |
42| `list-folder-files` | folder contents, to confirm the destination exists |
43| `login` / `verify-login` | device-code sign-in and session state |
44
45There are **no `graph_*` tools**, and there is **no Visio rendering or conversion tool**. This
46surface moves files; it does not open or edit Visio documents.
47
48## Workflow: publish a generated diagram
49
501. `verify-login`, and `login` if needed — surface the device code, never fabricate a session
512. `list-folder-files` on the destination folder — confirm it exists and note existing names
523. `get-drive-item` on the intended filename — **is this an overwrite?** If so, say so and get
53 confirmation before proceeding
544. `upload-file-content` with the bytes
555. Report the resulting item id and path. Do not claim success without the server's response.
56
57Produce the `.vsdx` itself with `document-generation` or a diagram skill; this skill only
58publishes what already exists on disk.
59
60## Reading results honestly
61
62- **An upload confirms transfer, not correctness.** That the bytes landed says nothing about
63 whether the diagram is accurate.
64- **A failed upload can leave a partial item** depending on size and session; re-check with
65 `get-drive-item` rather than assuming a clean failure.
66- **There is no rename or delete here** — the filter excludes them deliberately. Fixing a bad
67 filename is an operator action in the web UI.
68
69## Not verified
70
71**Tool names and manifest cost are measured; no upload has been performed.** That needs an M365
72tenant with write scope, which this environment does not have. The write path is
73correct-by-construction and unproven.
74
75## Integration with Other Skills
76
77| Skill | How They Work Together |
78|-------|----------------------|
79| `msgraph-files` | Read-only inspection — prefer it whenever you are not writing |
80| `document-generation`, `drawio-diagram`, `uml-diagram` | Produce the file this publishes |
81| `gait-session-tracking` | Record every upload: path, filename, item id |
82
83## Environment Variables
84
85- `MS365_MCP_CLIENT_ID` — Entra ID app registration (client) ID
86- `MS365_MCP_TENANT_ID` — tenant ID, or `common`