
MR Office: open-source document, spreadsheet, presentation, PDF, handwriting, and code editors. https
MR Office: open-source document, spreadsheet, presentation, PDF, handwriting, and code editors. https
MR Office is a workspace for notes, AI, and real files. This repository publishes the source code of its editors: the same editors that MR Office runs, which you can build, run, and embed on your own. They are open-source editors, not a complete open-source office suite: the reading and writing of Microsoft Office files stays in MR Office (see below).
MR Office hosts the editors; your server signs a short-lived session token and your page opens the editor. It edits real Word, Excel, PowerPoint, and PDF files (.docx, .xlsx, .pptx, .pdf), with co-editing, uploading, any export format, printing, and saves sent back to your server in a signed callback. The free plan: 1,000 sessions per month on localhost, 100 on your own domains, up to 2 apps. It is a hosted commercial service, so your own app is not bound by this repository's AGPL license.
npx mroffice-embed init (or create an app in the developer console): one "Allow" in the browser, and the app's keys are written to .env.local / .env.createSessionToken from mroffice-embed/server; the secret key never leaves the server.open() from mroffice-embed (or the script `https://mroffice.ai/embed/v1/embed.js``).// server: GET /api/mroffice/session (check who is signed in first)
import { createSessionToken } from "mroffice-embed/server";
const token = await createSessionToken({
appId: process.env.MROFFICE_APP_ID,
secretKey: process.env.MROFFICE_SECRET_KEY, // mro_sk_..., server only
file: { key: "contract-42", name: "contract.docx", url: signedUrlToTheFile },
user: { id: user.id, name: user.name },
mode: "edit",
});
// page
import { open } from "mroffice-embed";
open({ container: "#editor", token: () => fetch("/api/mroffice/session").then((r) => r.json()).then((b) => b.token) });AI apps open, read, edit, and export documents in the real MR Office editor through its MCP server: connect the hosted endpoint https://mcp.mroffice.ai/mcp`` (sign in with your MR Office account, no key), or run npx -y mroffice-mcpon your own computer. Its source is inapps/mcp`. MCP guide →
The six editors in this repository can be built into your own product under the AGPL-3.0: if people use a modified version over a network, you must offer them its complete source code, and keep the "MR Office" attribution (NOTICE.md). They open their own formats, CSV, HTML, Markdown, and PDF; Word, Excel, and PowerPoint files are not part of the open-source editors (the hosted embed above has them). A commercial license is available from [email protected]. Open-source guide →
The editors are available on npm as React components: npm i mroffice-docs mroffice-core (and mroffice-sheets, mroffice-slides, mroffice-pdf, mroffice-ink, mroffice-code); the README of each package shows how to embed it.
Calculating formulas with functions, drawing charts, and laying out SmartArt all run in MR Office's own engine, in the MR Office desktop app: the open-source editors keep the formulas, charts, and SmartArt that a file contains, and show SmartArt as it was saved.
apps/desktop contains the MR Office Editors: the source of the MR Office desktop app's shell (Electron), under its own identity. With the free MR Office component from Releases, it is the MR Office desktop app, with Word, Excel, PowerPoint and PDF files, sign-in and AI. Without the component, it runs the open-source editors on their own, which open .mrdoc, .mrsheet, .mrslides and .mrink files, CSV, HTML, Markdown and PDF. The shell and the editors are AGPL source code; the component is compiled, free to use and not open source. After npm run build, start it with:
The MR Office desktop app is free, has these editors and the full service, and works offline on your own computer. It adds what the open-source editors leave out: