# Packages

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

MR Office's packages for developers: the mroffice-embed SDK and the mroffice-mcp server on npm, and the open-source @mrnote editors.

## mroffice-embed

The embed SDK. It frames the editor, hands it a session token your server signed, and tells you when the document is ready, changed and saved. Typed, dependency-free, MIT licensed; the same code MR Office serves as embed.js. Its server half, mroffice-embed/server, signs session tokens (createSessionToken) and verifies callbacks (verifyCallback) in Node, Deno, Bun or an edge function.

npm:

```bash
npm install mroffice-embed
```

pnpm:

```bash
pnpm add mroffice-embed
```

yarn:

```bash
yarn add mroffice-embed
```

<script>:

```html
<script src="https://mroffice.ai/embed/v1/embed.js"></script>
```

```js
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;
```

Or let it set up your project: npx mroffice-embed init detects the framework, creates an app after one Allow in the browser, writes its keys to the env file and adds a token route and an editor page.

```bash
npx mroffice-embed init
```

- [npmjs.com/package/mroffice-embed](https://www.npmjs.com/package/mroffice-embed): Versions, README and types.
- [JavaScript SDK reference](https://mroffice.ai/en/developers/embed/sdk): Every option, event and method.

## mroffice-mcp

The MCP server that puts MR Office's editors into AI conversations. AGPL-3.0; its source is in the open-source repository as apps/mcp. Registry name: ai.mroffice/office.

```bash
npx -y mroffice-mcp
```

> No install at all: AI apps can connect to the hosted server at https://mcp.mroffice.ai/mcp and sign in in the browser (MCP › Install).

## @mrnote editors

| Package | What it is |
| --- | --- |
| @mrnote/docs | A paged word processor with the Office-style ribbon: styles, lists, tables, sections, shapes, equations, comments and tracked changes. |
| @mrnote/sheets | Cells and formulas, number and conditional formats, sorting and filtering, frozen panes, several sheets; CSV and TSV. |
| @mrnote/slides | Slides with themes, layouts and masters, shapes, tables, WordArt, transitions, animations and a slide show. |
| @mrnote/pdf | Read, search, present and print PDF files; highlight and annotate text. |
| @mrnote/ink | Handwriting with pressure-sensitive pens, highlighters, lasso and ruler. |
| @mrnote/code | A light code editor; JavaScript, TypeScript, Python, SQL, Lua and shell run in the browser. |
| @mrnote/core | What the editors share. |

They are published as source on GitHub (not on npm). See Open-source editors for building and self-hosting them.
