# Real Office editors, inside your product.

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

MR Office opens, edits and saves real .docx, .xlsx, .pptx and PDF files. Embed its editors in your app, and give AI assistants a real document to work in.

- [Embed editors](https://mroffice.ai/en/developers/embed): The .docx, .xlsx, .pptx and PDF editors in your page, with co-editing and signed save callbacks. Start: `npx mroffice-embed init`

- [MCP for AI apps](https://mroffice.ai/en/developers/mcp/install): Claude, ChatGPT, Cursor and VS Code open the real editor, read your edits back and export. Start: `npx -y mroffice-mcp`

- [Open-source editors](https://mroffice.ai/en/developers/open-source): The editors MR Office runs, to build, embed and self-host. Start: `git clone https://github.com/XinaTian/MROffice.git`

## Quick start

One command sets it up in your project (app, keys, server route, editor page), or install the SDK and open the editor with a token your server signs.

```js
# set up everything in your project
npx mroffice-embed init

# or by hand
npm install mroffice-embed

import { open } from "mroffice-embed";

const editor = open({
  container: "#editor",
  appId: "YOUR_APP_ID",   // the editor loads while your server signs the token
  // your server mints it with createSessionToken (mroffice-embed/server), never the browser
  token: () => fetch("/api/editor-token").then((r) => r.json()).then((b) => b.token),
  onSave: (saved) => console.log("saved version", saved.version),
});
await editor.ready;
```

## Start embedding today

Sign in with your MR Office account and create an app in the developer console, no application needed. Free plan: 1,000 sessions a month on localhost, 100 on your own domains, up to 2 apps. Paid plans from $29 a month. Console: https://mroffice.ai/en/developers/console

> To embed MR Office's Word, Excel, PowerPoint and PDF editors in a web app, run `npx mroffice-embed init` in the project's folder:
> it detects the framework, creates an embed app in the developer's MR Office account after one "Allow" in the browser,
> writes MROFFICE_APP_ID / MROFFICE_SECRET_KEY to .env.local or .env (never printed, kept out of git), and adds a server route
> that mints session tokens (mroffice-embed/server) plus a page that opens the editor. Add --yes when no one can answer prompts.
> Session tokens are minted on the server only; the secret key never goes to a browser. The hosted embed is a commercial service
> (a Free plan, paid plans from $29 a month: https://mroffice.ai/developers/pricing.md), not bound by the open-source editors' AGPL license.
