# OfficeCTRL

> OfficeCTRL is an open-source MCP server for files and documents. Open-source MCP server letting AI agents create, read and edit Word, Excel and PowerPoint. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, Windows, API, Self-hosted
- **Repository:** https://github.com/karlmoriaty/officectrl
- **MCP Registry name:** io.github.karlmoriaty/officectrl
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-12-02

## About

Office documents become something an agent can script through structured JSON rather than raw XML or a COM bridge. Each element gets a stable path such as /slide[1]/shape[2], so commands can target a paragraph, cell or slide directly, and every response uses the same schema with machine-readable error codes.

A built-in renderer turns files into HTML or PNG so the agent can inspect its own layout, catch overflowing titles or overlapping shapes, and correct them. Formulas are evaluated on write and pivot tables are aggregated in the file, so final values can be read without Microsoft Office installed.

The project suits developers building document automation, report generation pipelines and agent workflows that need to produce or revise .docx, .xlsx and .pptx files on Linux, Windows or headless servers.

## Features

- **Path-based element access:** Every paragraph, cell, slide and shape has a stable path that commands can address directly.
- **Built-in rendering:** Converts documents to HTML or PNG so an agent can check its own output without a display.
- **Excel formula evaluation:** Over 350 Excel functions are computed on write and pivot tables are aggregated on disk.
- **Template merge:** Fills {{placeholders}} in Word, Excel and PowerPoint files from JSON data for batch generation.
- **Atomic batch operations:** Applies many edits in one pass, rolling back everything if an item fails, or continuing best-effort.
- **Structured JSON output:** Commands return consistent JSON with error codes and suggestions for self-correction.

## Good for

- Generating branded reports or invoices from a template and JSON data
- Letting an AI agent draft and revise slide decks from a prompt
- Importing CSV data into Excel sheets and building pivot tables automatically
- Auditing existing Word or PowerPoint files for issues like missing alt text
- Automating document edits in CI pipelines or Docker containers

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add officectrl -- npx -y @officectrl/officectrl
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add officectrl -- npx -y @officectrl/officectrl
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.officectrl]
command = "npx"
args = ["-y", "@officectrl/officectrl"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user officectrl npx -- -y @officectrl/officectrl

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "officectrl": {
      "command": "npx",
      "args": [
        "-y",
        "@officectrl/officectrl"
      ]
    }
  }
}
```

## FAQ

### Does OfficeCTRL require Microsoft Office?

No. The project states it runs without Microsoft Office and ships as a self-contained binary.

### How do I connect OfficeCTRL to an MCP client?

Run the officectrl mcp command or use the npm package @officectrl/officectrl with npx in the client's MCP configuration.

### What license is OfficeCTRL under?

The project is licensed under Apache License 2.0.

### Which file formats are supported?

Word (.docx), Excel (.xlsx) and PowerPoint (.pptx).

### Is OfficeCTRL free?

Yes. OfficeCTRL is open source, so you can use and self-host it for free.

### How do I add OfficeCTRL to Claude Code?

Run this command in your terminal: claude mcp add officectrl -- npx -y @officectrl/officectrl

### What are the best alternatives to OfficeCTRL?

The closest alternatives to OfficeCTRL are cmd_op, Office MCP, Office files, OfficeRoutines and Word AI.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [cmd_op](https://ai-powered.com/mcp/cmd-op): cmd_op is an open-source MCP server for files and documents.
- [Office MCP](https://ai-powered.com/mcp/office-mcp): Office MCP is an open-source MCP server for files and documents.
- [Office files](https://ai-powered.com/mcp/office-files): Office files is an open-source MCP server for files and documents.
- [OfficeRoutines](https://ai-powered.com/mcp/officeroutines): OfficeRoutines is an open-source MCP server for files and documents.
- [Word AI](https://ai-powered.com/mcp/word-ai): Word AI is an open-source MCP server for files and documents.
- [Office Oxide MCP](https://ai-powered.com/mcp/office-oxide-mcp): Office Oxide MCP is an open-source MCP server for files and documents.
- [8sheets](https://ai-powered.com/mcp/8sheets): 8sheets is a paid MCP server for files and documents.
- [Docx Forge](https://ai-powered.com/mcp/docx-forge): Docx Forge is an open-source MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/officectrl
