OfficeAgent.NET — Claude Code MCP server for Word, PowerPoint, Excel
An MCP server that hands your agent typed operations on .docx, .pptx and .xlsx files: edits, tables, comments, templates.
claude mcp add --env OfficeAgent__FileSystemConnections__0__ConnectionId=<OfficeAgent__FileSystemConnections__0__ConnectionId> --env OfficeAgent__FileSystemConnections__0__RootPath=<OfficeAgent__FileSystemConnections__0__RootPath> --env OfficeAgent__AllowCreation=<OfficeAgent__AllowCreation> --transport stdio officeagentnet -- docker run -i --rm -e OfficeAgent__FileSystemConnections__0__ConnectionId -e OfficeAgent__FileSystemConnections__0__RootPath -e OfficeAgent__AllowCreation ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0What OfficeAgent.NET does
OfficeAgent.NET is a .NET library built on the Open XML SDK, and the MCP server is one of three ways into the same engine. Your agent sends JSON operations such as replacing a clause as a tracked change or appending a row to a table, instead of touching raw XML. A single client routes each document to the Word, PowerPoint or Excel module.
On the Word side you get document creation and editing — text, paragraphs, tables, styles, headers, footers, content controls, document properties — plus comment handling and revision state. PowerPoint covers decks with slides, layouts, native editable charts, media and notes. Excel covers worksheet and range inspection, finding raw or displayed values, setting cells and formulas, appending table rows. Templates bind content-control tags or shape names, and Word comparison produces a redline plan only when the rest of the package is untouched.
The server runs from the ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0 image, so Docker has to be present. File access is scoped to the roots you declare in OfficeAgent__FileSystemConnections__0__RootPath; with no storage configured, documents stay in the session. If your workflow leans on Office's own layout or calculation engine, this is the wrong tool — it works on package structure and does not recalculate formulas.
What it helps with
- generate a .docx from a template and data
- record a contract edit as a tracked revision
- append a table row and set a formula in Excel
- read comments and review state from a document
- build a PowerPoint deck with slides and charts
Example prompts for the agent
- Replace clause 4.2 in
contract.docxas a tracked change - Append a row to the table on sheet
Q3inreport.xlsx - Build a deck from
outline.mdand save it asdeck.pptx
How to install OfficeAgent.NET
Platform CLI
claude mcp add --env OfficeAgent__FileSystemConnections__0__ConnectionId=<OfficeAgent__FileSystemConnections__0__ConnectionId> --env OfficeAgent__FileSystemConnections__0__RootPath=<OfficeAgent__FileSystemConnections__0__RootPath> --env OfficeAgent__AllowCreation=<OfficeAgent__AllowCreation> --transport stdio officeagentnet -- docker run -i --rm -e OfficeAgent__FileSystemConnections__0__ConnectionId -e OfficeAgent__FileSystemConnections__0__RootPath -e OfficeAgent__AllowCreation ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0Replace <…> with your own values
Platform CLI
codex mcp add officeagentnet --env OfficeAgent__FileSystemConnections__0__ConnectionId=<OfficeAgent__FileSystemConnections__0__ConnectionId> --env OfficeAgent__FileSystemConnections__0__RootPath=<OfficeAgent__FileSystemConnections__0__RootPath> --env OfficeAgent__AllowCreation=<OfficeAgent__AllowCreation> -- docker run -i --rm -e OfficeAgent__FileSystemConnections__0__ConnectionId -e OfficeAgent__FileSystemConnections__0__RootPath -e OfficeAgent__AllowCreation ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0Replace <…> with your own values
Config file
{
"mcpServers": {
"officeagentnet": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OfficeAgent__FileSystemConnections__0__ConnectionId",
"-e",
"OfficeAgent__FileSystemConnections__0__RootPath",
"-e",
"OfficeAgent__AllowCreation",
"ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0"
],
"env": {
"OfficeAgent__FileSystemConnections__0__ConnectionId": "<OfficeAgent__FileSystemConnections__0__ConnectionId>",
"OfficeAgent__FileSystemConnections__0__RootPath": "<OfficeAgent__FileSystemConnections__0__RootPath>",
"OfficeAgent__AllowCreation": "<OfficeAgent__AllowCreation>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"officeagentnet": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OfficeAgent__FileSystemConnections__0__ConnectionId",
"-e",
"OfficeAgent__FileSystemConnections__0__RootPath",
"-e",
"OfficeAgent__AllowCreation",
"ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0"
],
"env": {
"OfficeAgent__FileSystemConnections__0__ConnectionId": "<OfficeAgent__FileSystemConnections__0__ConnectionId>",
"OfficeAgent__FileSystemConnections__0__RootPath": "<OfficeAgent__FileSystemConnections__0__RootPath>",
"OfficeAgent__AllowCreation": "<OfficeAgent__AllowCreation>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e OfficeAgent__FileSystemConnections__0__ConnectionId=<OfficeAgent__FileSystemConnections__0__ConnectionId> -e OfficeAgent__FileSystemConnections__0__RootPath=<OfficeAgent__FileSystemConnections__0__RootPath> -e OfficeAgent__AllowCreation=<OfficeAgent__AllowCreation> officeagentnet docker run -i --rm -e OfficeAgent__FileSystemConnections__0__ConnectionId -e OfficeAgent__FileSystemConnections__0__RootPath -e OfficeAgent__AllowCreation ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0Replace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about OfficeAgent.NET
How do I install OfficeAgent.NET in Claude Code?
Run `claude mcp add --env OfficeAgent__FileSystemConnections__0__ConnectionId=<OfficeAgent__FileSystemConnections__0__ConnectionId> --env OfficeAgent__FileSystemConnections__0__RootPath=<OfficeAgent__FileSystemConnections__0__RootPath> --env OfficeAgent__AllowCreation=<OfficeAgent__AllowCreation> --transport stdio officeagentnet -- docker run -i --rm -e OfficeAgent__FileSystemConnections__0__ConnectionId -e OfficeAgent__FileSystemConnections__0__RootPath -e OfficeAgent__AllowCreation ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0`, substituting your own values for the placeholders.
What does OfficeAgent.NET do?
It exposes typed document operations for Word, PowerPoint and Excel: creation, targeted edits, tables, styles, images, comments and revisions. You reach it over MCP, through Microsoft Agent Framework tools, or via the .NET API directly.
What do I need to run the server?
Docker, since the server starts from the ghcr.io/ilia-sokolov/officeagent-mcp:1.2.0 image. You also set the filesystem root paths and the flag that allows document creation.