Skip to content

Commit e5271c7

Browse files
authored
docs: LLM-first quickstart with agent setup and MCP (#2534)
* docs: LLM-first quickstart with superdoc init and MCP setup SD-2244: Restructure the quickstart page to lead with agent-first instructions: 1. superdoc init — generates AGENTS.md for AI coding agents 2. MCP server setup — one command for Claude Code, config for Cursor/Windsurf 3. Backend code — SDK (Node.js, Python) and CLI tabs 4. Embed editor — existing content preserved below The page now serves three audiences: developers using AI coding agents, backend automation developers, and web app developers embedding the visual editor. * docs: tighten quickstart copy — show code, cut explanation * fix(docs): fix card icons and Python SDK quickstart snippet - Replace missing icons (gear → screwdriver-wrench, github → arrow-up-right-from-square) - Fix Python SDK example: sync client uses dict params and no await * docs: update quickstart to use npx @superdoc-dev/create
1 parent bcb6ce9 commit e5271c7

1 file changed

Lines changed: 121 additions & 12 deletions

File tree

apps/docs/getting-started/quickstart.mdx

Lines changed: 121 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,116 @@
11
---
22
title: Quick start
3-
keywords: "superdoc quickstart, docx editor tutorial, word editor setup, javascript docx quick start, 5 minute editor"
3+
keywords: "superdoc quickstart, docx editor tutorial, word editor setup, javascript docx quick start, mcp docx, ai agent docx, llm document editing, superdoc init"
44
---
55

6-
From zero to a working DOCX editor in under two minutes.
6+
## Using an AI coding agent?
7+
8+
Run this first. It generates an AGENTS.md that teaches your agent how to use SuperDoc.
9+
10+
```bash
11+
npx @superdoc-dev/create
12+
```
13+
14+
Then set up the MCP server so your agent can edit DOCX files directly:
15+
16+
<Tabs>
17+
<Tab title="Claude Code">
18+
```bash
19+
claude mcp add superdoc -- npx @superdoc-dev/mcp
20+
```
21+
</Tab>
22+
<Tab title="Cursor">
23+
Add to `~/.cursor/mcp.json`:
24+
25+
```json
26+
{
27+
"mcpServers": {
28+
"superdoc": {
29+
"command": "npx",
30+
"args": ["@superdoc-dev/mcp"]
31+
}
32+
}
33+
}
34+
```
35+
</Tab>
36+
<Tab title="Windsurf">
37+
Add to `~/.codeium/windsurf/mcp_config.json`:
38+
39+
```json
40+
{
41+
"mcpServers": {
42+
"superdoc": {
43+
"command": "npx",
44+
"args": ["@superdoc-dev/mcp"]
45+
}
46+
}
47+
}
48+
```
49+
</Tab>
50+
</Tabs>
51+
52+
Done. Ask your agent to open a `.docx` file and make an edit.
53+
54+
[MCP setup guide →](/document-engine/ai-agents/mcp-server) · [LLM tools →](/document-engine/ai-agents/llm-tools)
55+
56+
---
57+
58+
## Edit DOCX from backend code
59+
60+
<Tabs>
61+
<Tab title="Node.js">
62+
```bash
63+
npm install @superdoc-dev/sdk
64+
```
65+
66+
```typescript
67+
import { SuperDocClient } from '@superdoc-dev/sdk';
68+
69+
const client = new SuperDocClient({ defaultChangeMode: 'tracked' });
70+
const doc = await client.open({ doc: './contract.docx' });
71+
72+
// query, edit, format, comment, track changes...
73+
74+
await doc.save();
75+
await doc.close();
76+
```
77+
</Tab>
78+
<Tab title="Python">
79+
```bash
80+
pip install superdoc-sdk
81+
```
82+
83+
```python
84+
from superdoc import SuperDocClient
85+
86+
client = SuperDocClient(default_change_mode="tracked")
87+
doc = client.open({"doc": "./contract.docx"})
88+
89+
# query, edit, format, comment, track changes...
90+
91+
doc.save()
92+
doc.close()
93+
```
94+
</Tab>
95+
<Tab title="CLI">
96+
```bash
97+
npm install -g @superdoc-dev/cli
98+
```
99+
100+
```bash
101+
superdoc open contract.docx
102+
superdoc find --type text --pattern "ACME Corp"
103+
superdoc replace --target-json '...' --text "NewCo Inc." --change-mode tracked
104+
superdoc save && superdoc close
105+
```
106+
</Tab>
107+
</Tabs>
108+
109+
[SDK docs →](/document-engine/sdks) · [CLI docs →](/document-engine/cli)
110+
111+
---
112+
113+
## Embed a DOCX editor
7114

8115
<Steps>
9116
<Step title="Install">
@@ -85,9 +192,9 @@ From zero to a working DOCX editor in under two minutes.
85192
</Step>
86193
</Steps>
87194

88-
You now have a fully functional DOCX editor — tracked changes, tables, images, headers/footers, all working.
195+
Tracked changes, tables, images, headers/footers all working.
89196

90-
## Using React?
197+
### Using React?
91198

92199
```jsx
93200
import { SuperDocEditor } from '@superdoc-dev/react';
@@ -98,21 +205,23 @@ function App() {
98205
}
99206
```
100207

101-
Install with `npm install @superdoc-dev/react`. If you need to pin the underlying `superdoc` version, use `overrides` (or `pnpm.overrides`) in your app's `package.json`. See the full [React guide](/getting-started/frameworks/react).
208+
Install with `npm install @superdoc-dev/react`. [Full React guide →](/getting-started/frameworks/react)
209+
210+
---
102211

103212
## What's next
104213

105214
<CardGroup cols={2}>
106-
<Card title="Framework guides" icon="code" href="/getting-started/frameworks/react">
107-
React, Vue, Angular, Vanilla JS
215+
<Card title="Document Engine" icon="screwdriver-wrench" href="/document-engine/overview">
216+
Architecture and how to choose a surface
108217
</Card>
109-
<Card title="Configuration" icon="gear" href="/core/superdoc/configuration">
110-
Modes, roles, toolbar, and more
218+
<Card title="LLM tools" icon="sparkles" href="/document-engine/ai-agents/llm-tools">
219+
Build custom AI agents with the SDK
111220
</Card>
112-
<Card title="Import / Export" icon="file-export" href="/getting-started/import-export">
113-
Load and save DOCX files
221+
<Card title="Framework guides" icon="code" href="/getting-started/frameworks/react">
222+
React, Vue, Angular, Vanilla JS
114223
</Card>
115-
<Card title="Examples" icon="github" href="https://github.com/superdoc-dev/superdoc/tree/main/examples">
224+
<Card title="Examples" icon="arrow-up-right-from-square" href="https://github.com/superdoc-dev/superdoc/tree/main/examples">
116225
Working demos on GitHub
117226
</Card>
118227
</CardGroup>

0 commit comments

Comments
 (0)