# Use MR Office in your agent

Source: https://mroffice.ai/en/developers/mcp/agents

Plugins for Claude Code, Codex and Gemini CLI, and a rule for Cursor: MR Office's MCP server plus a skill that teaches the agent to edit Word, Excel, PowerPoint and PDF files.

## What a plugin adds

Each plugin connects your coding agent to MR Office's MCP server (npx -y mroffice-mcp) and adds a skill. Ask for a change to a .docx, .xlsx, .pptx or .pdf file and the agent opens it in MR Office's editors and edits it there instead of rewriting it with a script, so what it does not touch keeps its formatting.

With MR Office's desktop app running, the agent works on your own files in the app's window: you see each edit as it happens and can undo it.

## Claude Code

In Claude Code, add the marketplace and install the plugin:

```text
/plugin marketplace add XinaTian/mroffice-agents
/plugin install mroffice@mroffice
```

## Codex

Codex installs the same plugin from the same marketplace:

```bash
codex plugin marketplace add XinaTian/mroffice-agents
codex plugin add mroffice@mroffice
```

On a Codex version without plugins, add the server to its configuration instead:

```toml
# ~/.codex/config.toml
[mcp_servers.mroffice]
command = "npx"
args = ["-y", "mroffice-mcp"]
startup_timeout_sec = 60
tool_timeout_sec = 120
```

## Gemini CLI

Gemini CLI installs it as an extension, with the same guidance as its context file:

```bash
gemini extensions install https://github.com/XinaTian/mroffice-agents
```

## Cursor

Add the server with one click, then add the rule to your project so the agent knows when to use it:

- [Add to Cursor](https://cursor.com/en/install-mcp?name=mroffice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1yb2ZmaWNlLW1jcCJdfQ%3D%3D)

```bash
mkdir -p .cursor/rules
curl -fsSL https://raw.githubusercontent.com/XinaTian/mroffice-agents/main/cursor/rules/mroffice.mdc -o .cursor/rules/mroffice.mdc
```

## Sign in

The first Word, Excel or PowerPoint file opens your browser to sign in to MR Office (a free account works). The agent never asks for a password or a key.
