OfficeRoutines
by recued
README.md
# OfficeRoutines
Give an AI agent Excel, Word, and PowerPoint. It can work step by step,
reading and changing a document element by element, or run a recipe:
recorded edits replayed on the next batch of files in one checked tool
call. It works on saved files, and on documents open in Office through the
OfficeRoutines pane. Connect Recued or any MCP client, on this computer or
from another one.
[Install](#install-and-check-your-setup) · [Connect an agent](#connect-an-agent) · [Try a recipe](#try-a-recipe) · [Already use OfficeCLI?](#already-use-officecli) · [Use with Recued](#use-officeroutines-with-recued) · [Remote MCP](#remote-mcp)
## What an agent can do
- **Change what is on screen.** With its OfficeRoutines pane connected, a
document open in Office changes as the agent works, as one transaction.
If a step fails, the earlier steps are undone, and the result says
whether the document is back as it was. Save in Office, or ask the agent
to. The pane is in preview.
- **Change saved files safely.** A closed file changes through a locked
working copy. Each write is read back before the copy replaces the file.
- **Repeat work in one call.** A recipe replays recorded edits on new files
and checks the result. In a measured weekly review, the recipe took 4
model requests where one OfficeCLI command per edit took 13.
- **Recover an outcome.** A change can carry a run ID, so an agent that
lost its connection can ask whether the change happened.
- **Copy or export.** Copy a document as it is on screen, unsaved changes
included, or make a PDF of it.
[Document tools](docs/mcp.md#read-and-edit-document-contents) · [Recipes](docs/mcp.md#discover-and-run-routines) · [Recover an outcome](docs/mcp.md#recover-an-outcome)
## Install and check your setup
Choose the package for your computer or build the CLI from source. The
Office add-in and desktop setup are in preview. Start with the CLI and
MCP for saved-file jobs and recipe replay.
[Apple Silicon Mac](docs/macos-release.md) · [Linux and Windows](docs/portable-install.md) · [Build from source](docs/getting-started.md#build-the-cli-from-source)
Install OfficeCLI too: recipes and document commands use it.
[Install OfficeCLI](https://github.com/iOfficeAI/OfficeCLI#for-humans)
Once `ofrt` is on your PATH, check the build and the OfficeCLI executable
it found.
```sh
ofrt job version
ofrt job doctor
```
## Connect an agent
Add OfficeRoutines to an agent app on this computer with one command.
```sh
ofrt job mcp install claude-desktop
```
The same command sets up `claude` (Claude Code), `codex`, `cursor`,
`vscode`, `opencode`, `lms` (LM Studio), `openclaw`, `hermes` (Hermes
Agent), and `dsh` (DeepSeek Harness). Restart the app or start a new
session to load it. When the Office companion is running, the agent can
also reach documents open in Office. To limit saved-file access, add
`--allow-folder` once per directory.
[MCP setup](docs/mcp.md#connect-to-another-local-mcp-client)
Claude Desktop can also install OfficeRoutines from a release's MCP Bundle:
open the `.mcpb` file for your computer and choose the one folder the agent
may use. A bundle works with saved files, not documents open in Office.
OfficeRoutines is in the official MCP Registry as `com.recued/office-routines`.
[MCP Bundles](mcpb/README.md)
For Recued, add OfficeRoutines in **Settings → Connections**. For an agent
on another computer, start the HTTPS listener.
[Connect to Recued](docs/mcp.md#connect-to-recued) · [Remote MCP](#remote-mcp)
## Already use OfficeCLI?
OfficeRoutines runs on your OfficeCLI installation and is tested with
OfficeCLI 1.0.143 to 1.0.163. `ofrt` forwards OfficeCLI's own arguments to
your installed executable, so existing scripts work unchanged. An optional
alias keeps the `officecli` command name.
[OfficeCLI](https://github.com/iOfficeAI/OfficeCLI) · [Set up the alias](docs/getting-started.md#keep-an-existing-scripts-command-name)
```sh
ofrt get report.xlsx /Sheet1/A1 --json
```
On top of OfficeCLI, an agent can change documents open in Office, run
recipes, and copy or export what is on screen. Writes are read back, and a
run ID recovers an outcome. `ofrt job mcp install` takes the same app names
as `officecli mcp`. If you use both, keep `officecli mcp` as its own entry.
## Try a recipe
### Apply the weekly sales review to two workbooks
The `weekly-review` recipe finds North and South by branch name, even
when their rows move between exports. Run the sample setup to create the
two workbooks and import the recipe, then apply it to both.
[Prepare the weekly sales example](docs/getting-started.md#replay-the-weekly-sales-example)
```sh
ofrt job apply --recipes office-example/recipes \
--output office-example/checked-sales weekly-review \
office-example/week-1.xlsx office-example/week-2.xlsx
```
The two verified copies in `office-example/checked-sales` show North and
South as **Reviewed**. The receipt reports the output files and the number
of cells checked. This command runs with Office closed.
### One apply call for a known recipe
An agent that knows the recipe name and file paths can apply it in one
tool call, including verification. In these examples, the recipe route
used one discovery call and one apply call through Recued with Qwen 3.7
Plus. Both routes produced the same verified cell values under the
workload's instructions.
| Weekly review | Individual OfficeCLI calls | Recipe tool calls with discovery | OfficeCLI tokens | Recipe tokens | Tokens saved |
| --- | ---: | ---: | ---: | ---: | ---: |
| One workbook, two edits | 4 | 2 | 154,052 | 97,831 | 36.5% |
| Two workbooks, six edits | 10 | 2 | 324,164 | 98,393 | 69.6% |
The two-workbook review took **4 model requests** with the recipe and
**13** with individual OfficeCLI commands. Each row compares one verified
run per route, with earlier attempts reported separately. The baseline
uses one OfficeCLI command per edit. OfficeCLI also supports batch commands.
The token totals include cached input.
[Workloads and measurement details](benchmarks/README.md#weekly-sales-review-with-an-ai-agent) · [Benchmark receipts](benchmarks/fixtures/weekly-review-measurements.json)
## Record and replay edits
Open the OfficeRoutines pane and record changes to a named Excel table
or to named text fields in Word or PowerPoint. Save the edits as a recipe,
then preview how it will apply to another document.
[Record in Excel](docs/live-excel.md#record-and-replay-edits) · [Record in Word and PowerPoint](docs/live-documents.md#record-and-replay-named-text)
## Repeat a job with new data
| Task | Where to start |
| --- | --- |
| Refresh an Excel report from a new export or fill a report template | [Reports and templates](docs/macos-release.md#refresh-a-report-or-create-one-from-a-template) |
| Highlight amounts that need review across sheets or workbooks | [Compare amounts](docs/macos-release.md#compare-two-amount-columns) |
| Fill Word templates, generate slides, or refresh a PowerPoint chart | [Word and PowerPoint jobs](docs/live-documents.md#fill-a-word-template-or-populate-a-deck) |
| Join, group, and transform data from CSV and XLSX files | [Saved data pipelines](docs/pipelines.md) |
The benchmarks include a finance dashboard built from three sheets and
an update to a large styled workbook.
[OfficeCLI user workflows](benchmarks/README.md#workflows-reported-by-officecli-users)
## Use OfficeRoutines with Recued
OfficeRoutines comes from Recued, a self-hosted gateway for choosing which
files, accounts, and tools your AI can use. Like Recued, it gives an agent
two ways to work: commands, step by step, for new work, and recipes for
work that repeats. Ask Recued to run the weekly sales review in Chat. It
can find the recipe by description, ask you to approve the write, and
record the result in your run history.
[Explore Recued](https://recued.com/) · [Install Recued](https://recued.com/get-started) · [Recued on GitHub](https://github.com/recued/recued) · [Connect OfficeRoutines to Recued](docs/mcp.md#connect-to-recued)
## Remote MCP
An agent on another computer can run jobs against allowed folders or
read, edit, and run recipes on connected Office documents. Start OfficeRoutines' HTTPS
listener on the computer with the files. For live edits, keep the
document's OfficeRoutines pane connected there.
Recued 26.11.26 supports local stdio and HTTPS with a certificate trusted
by the Recued server. Private HTTPS setup-file import requires a newer
Recued build with **Import MCP setup file** in **Connections**. The setup
file supplies the URL, bearer token, and private CA certificate.
[Set up remote MCP](docs/mcp.md#connect-a-remote-mcp-client)
OfficeRoutines is released under the [MIT license](LICENSE).
[Benchmarks](benchmarks/README.md) describe the OfficeCLI comparisons and
the saved-file and live Office qualification.
[Changelog](CHANGELOG.md) · [Report a security issue](SECURITY.md)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues