# ilia-sokolov/OfficeAgent.NET [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/ilia-sokolov/OfficeAgent.NET  
**GitHub Stars:** 21  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ilia-sokolov-officeagent-net

## Description
⃣ 🎖️ 🏠 ☁️ 🍎 🪟 🐧 - Let agents edit real Microsoft Word (.docx) documents - tracked changes, tables, styles, comments, content controls, and document properties - with edits validated and previewed before saving. Built on the Open XML SDK; reads and writes documents in place through filesystem or SharePoint storage without automating Word. Runs over stdio or streamable HTTP.

## Claude Desktop Quick Installation
Heuristic fallback — verify the package name and runner against the repository README before running it. Uses `npx` (confidence: low):

```json
"mcpServers": {
  "officeagent-net": {
    "command": "npx",
    "args": ["-y","ilia-sokolov-officeagent-net"]
  }
}
```

## Documentation

## What ilia-sokolov/OfficeAgent.NET MCP server does

ilia-sokolov/OfficeAgent.NET MCP server translates an agent's requested document change into a typed edit plan. The server validates that plan, previews the proposed result, and applies it only when the operation is valid. It supports Microsoft Word `.docx` files and PowerPoint `.pptx` decks through one client, routing each file to the appropriate document module. Excel is not supported.

For Word files, supported workflows include editing text as tracked changes, working with tables, preserving styles and comments, handling content controls, and maintaining document properties. The implementation works with the Office Open XML package directly, so it does not require Microsoft Word or PowerPoint to be installed. Applications can also use the underlying .NET API or integrate the libraries with Microsoft Agent Framework and `Microsoft.Extensions.AI`.

## How it works

The agent first registers or creates a document, then uses inspection and search operations to obtain structured document data and anchors. It creates an edit plan from those results rather than transmitting the entire Office package through the model. A preview checks the plan before commit. Applying a successful plan writes to the original document by default and uses an optimistic version check to help prevent changes based on an outdated document state.

Word text replacements use tracked changes by default. A caller can instead select a direct change mode where appropriate. PowerPoint decks do not use Word-style redlines, so deck connections need a direct default change mode. Saving with `NewVersion` preserves the source and writes a sibling version instead of replacing it.

The MCP server can run over stdio or streamable HTTP. Files may come from configured filesystem roots or SharePoint storage. For workflows without persistent storage, an ephemeral session can hold imported document bytes and return the edited result later. Inline base64 document handling is also available for a single self-contained exchange.

## Setup and configuration

Install the server as a .NET tool:

```bash
dotnet tool install --global OfficeAgent.Mcp
```

A filesystem connection identifies a connection ID and root directory. Creation is disabled unless `AllowCreation` is enabled; when enabled, the agent can create new documents in the configured location. File extensions are restricted per connection, with `.docx` accepted by default. Add `.pptx` explicitly when deck editing is needed and set the default change mode to `Direct`.

Configuration can be supplied in an `OfficeAgent` JSON section or through environment variables. Environment values override configuration-file values. The server can also be started with a configuration-file path. When no storage root exists, configure an ephemeral connection and use import/export operations, or enable inline content handling.

## Tools and capabilities

The ilia-sokolov/OfficeAgent.NET MCP server exposes operations to:

- Register existing documents and create new ones when permitted.
- Inspect document structure and search for text or other relevant anchors.
- Preview a typed plan and apply it after validation.
- Read and write Word and PowerPoint files through supported providers.
- Import and export document content for session-only workflows.
- Save changes in place or as a new document version.

The same document engine is available through the MCP server, a .NET API, and integrations for Microsoft agent frameworks.

## Limitations and notes

The ilia-sokolov/OfficeAgent.NET MCP server does not implement Excel support. HTTP hosting has no built-in authentication layer, so deployments need external authentication and network controls. Filesystem roots should be protected with ACLs that prevent untrusted users or processes from creating, renaming, or replacing entries while the server is running.

Inspection and search results can expose document text and structure to the MCP client and model. Connect only document locations and model providers suitable for the data being processed. The server does not send the complete Open XML package through the model, but returned text and structure may still contain sensitive information.

_Full upstream README: https://allmcps.com/mcp/ilia-sokolov-officeagent-net/readme_

