# Repository Briefing: XinaTian/MROffice
> Source: https://repoforai.com/repo/XinaTian/MROffice (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/XinaTian/MROffice
- **Official Docs / Website**: https://mr-note.com
- **Category**: Chat UI & AI Apps (聊天界面与 AI 应用)
- **Primary Language**: TypeScript
- **License**: AGPL-3.0
- **Engineering Health**: A (82/100 · Maintenance 35/35 · Adoption 16/25 · Releases 20/20 · License 11/20)
- **Latest Release**: v0.1.10 (2026-12-01) — https://github.com/XinaTian/MROffice/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: MCP, CLI, API
- **Momentum**: 5,033 ★ total (+26 24h / +1,475 7d) · 278 forks
- **Topics**: `ai`, `ai-agent`, `claude-code`, `codex`, `copilot`, `cursor`, `document-editor`, `docx`, `embed`, `excel`, `mcp`, `mcp-server`
- **When to Use**: Best for: Teams embedding a browser editor, connecting an MCP agent to a shared editing session, or using the full desktop product for offline Office-file work. Skip if: You need an entirely source-built, self-hosted stack with DOCX/XLSX/PPTX round trips and the full formula engine, or cannot allow the hosted service to process documents.

## Overview
```text
### Architecture & Core Mechanics
MR Office is a TypeScript workspace built around five editor packages under `packages/`: `@mrnote/docs`, `@mrnote/sheets`, `@mrnote/slides`, `@mrnote/pdf`, and `@mrnote/code`. They share `@mrnote/core` and run together in `apps/playground` or in the Electron shell under `apps/desktop`. The React packages are separately embeddable. The full desktop product adds a separately downloaded MR Office component; building the shell and editors alone does not produce that product.

The agent integration is a separate surface: `apps/mcp` contains the MCP server, and clients can connect through the OAuth-backed hosted endpoint or launch `mroffice-mcp` locally with `npx`. The hosted path processes files with the MR Office engine under the signed-in account. Clients supporting MCP Apps can render the editor in the conversation; others receive a link and a page image. The hosted embed also exposes a document object model, macros, and plugins.

### Key Capabilities & Differentiators
The standalone packages provide paginated document editing with tables and comments, multi-sheet editing with live cell arithmetic, slide editing with speaker notes, PDF viewing and text search, and a code editor with an outline and file explorer. Documents can open HTML and Markdown, and sheets can read and write CSV and TSV. Preserving formulas is not the same as evaluating them: functions such as `SUM`, `IF`, and `VLOOKUP` need the full engine in the desktop product or hosted embed. Those full-product routes also provide DOCX, XLSX, and PPTX round trips and saving edits to native PDF text.

MCP tools include `create_document`, `get_document`, `update_document`, `render_page`, and `export_document`. Listed export targets include DOCX, XLSX, PPTX, PDF, Markdown, HTML, and CSV; validate the source-to-target pairs required by your workflow. In the product UI, Copilot previews proposed object-level changes and waits for confirmation. In the shared agent flow, the agent can read back user edits, and an update is refused if it would overwrite changes the agent has not seen.

### Trade-offs & Limitations
The key choice is source control versus format coverage. The AGPL-3.0 packages can be built into a self-hosted product, but the standalone build is not a drop-in Office-format backend with the full formula engine. If users access a modified version over a network, offer its corresponding source and retain the attribution in `NOTICE.md`. A commercial license is available separately. Hosted embedding avoids running the editor infrastructure and does not impose AGPL obligations on the integrating app, but it introduces service dependency, data-handling review, and usage quotas.

The hosted free tier allows up to two apps and lists 1,000 monthly localhost sessions and 100 monthly sessions on your own domains. The cited ONLYOFFICE Docs Developer Edition offer instead uses an annual license priced by concurrent connections on customer-run servers. Session counts and connection caps are not interchangeable, and no Univer Pro price is listed. Before choosing, test representative Office-format round trips, complex spreadsheets, and save-callback handling rather than treating feature availability as evidence of fidelity.

### Hardware & Deployment Guide
Use Node.js 20.19 or newer. For a source build, run `npm install`, `npm run fonts` to prepare the open font substitutes, `npm run build`, then `npm run preview` at `http://localhost:5178`. `npm run dev` starts the development server at the same address; `npm run smoke` checks a build. After building, `npm run desktop` starts the Electron shell. The full desktop download is the offline route for local Office-format file editing, but that does not establish offline AI inference.

For hosted integration, `npx mroffice-embed init` provisions app keys, or you can register the app through the developer console. Have your backend authenticate the user and mint a short-lived session token, let the page open the editor, and verify the signature on save callbacks. For agent access, use `https://mcp.mroffice.ai/mcp` with OAuth or `npx -y mroffice-mcp` as a local MCP client entrypoint; the latter does not establish that the full Office engine runs locally. New releases continue in `mrnote-ai/MRNote`. In the old release series, v0.1.10 fixed Word assistant updates incorrectly rejected as unsaved changes and raised the editable desktop PDF limit from 128 MB to 256 MB.
```

## Key Capabilities
```text
- Editor architecture: Five TypeScript editors share `@mrnote/core` and run in a browser playground or an Electron shell.
- Format boundary: Standalone editors use `.mrdoc`, `.mrsheet`, and `.mrslides` as native formats; Office-format round trips require the hosted embed or full desktop product.
- MCP integration: `apps/mcp` exposes document operations such as `update_document`, `render_page`, and `export_document`; updates are rejected if they would overwrite edits the agent has not seen.
- Hosted embedding: Short-lived tokens signed by the integrating backend open editor sessions, and signed callbacks return saves to that backend.
- Calculation boundary: Standalone sheets evaluate basic cell arithmetic and preserve formulas; the full function engine runs in the hosted embed and full desktop product.
- Release continuity: v0.1.10 fixes rejected Word assistant edits and raises the editable desktop PDF limit from 128 MB to 256 MB; active releases continue in `mrnote-ai/MRNote`.
```

## Quick Start / Clone
```bash
npm install
npm run fonts     # the open substitutes for Office's fonts
npm run build
npm run preview   # http://localhost:5178
```
