Skip to main content

Using an AI coding agent?

Run this first. It generates an AGENTS.md that teaches your agent how to use SuperDoc.
npx @superdoc-dev/create
Then set up the MCP server so your agent can edit DOCX files directly:
claude mcp add superdoc -- npx @superdoc-dev/mcp
Done. Ask your agent to open a .docx file and make an edit. MCP setup guide → · LLM tools →

Edit DOCX from backend code

npm install @superdoc-dev/sdk
import { SuperDocClient } from '@superdoc-dev/sdk';

const client = new SuperDocClient({ defaultChangeMode: 'tracked' });
const doc = await client.open({ doc: './contract.docx' });

// query, edit, format, comment, track changes...

await doc.save();
await doc.close();
SDK docs → · CLI docs →

Embed a DOCX editor

1

Install

npm install superdoc
2

Mount the editor

<div id="editor" style="height: 100vh"></div>

<script type="module">
  import { SuperDoc } from 'superdoc';
  import 'superdoc/style.css';

  const superdoc = new SuperDoc({
    selector: '#editor',
  });
</script>
That’s a blank editor. Now give it a file.
3

Load a document

Pass a URL, a File from an input, or a Blob from your API.
new SuperDoc({
  selector: '#editor',
  document: '/files/contract.docx',
});
Tracked changes, tables, images, headers/footers — all working.

Using React?

import { SuperDocEditor } from '@superdoc-dev/react';
import '@superdoc-dev/react/style.css';

function App() {
  return <SuperDocEditor document={file} />;
}
Install with npm install @superdoc-dev/react. Full React guide →

What’s next

Document Engine

Architecture and how to choose a surface

LLM tools

Build custom AI agents with the SDK

Framework guides

React, Vue, Angular, Vanilla JS

Examples

Working demos on GitHub