Quickstart
Connect a coding agent to SuperDoc through MCP and produce a reviewable tracked edit.
The MCP server lets a coding agent open, read, edit, and save .docx files on your machine. It is the fastest way to see agent-driven document editing, because the agent you already use supplies the model loop.
This quickstart connects the server, inspects a document, proposes a tracked edit, and saves the result to a separate file you can review.
1. Connect the server
The server runs locally over stdio. Your MCP client spawns it as a subprocess, so you never start it yourself.
For Claude Code:
claude mcp add superdoc -- pnpm dlx @superdoc-dev/mcpFor Claude Desktop, Cursor, or Windsurf, add the same command to the client's MCP configuration file:
{
"mcpServers": {
"superdoc": {
"command": "pnpm",
"args": ["dlx", "@superdoc-dev/mcp"]
}
}
}Claude Desktop reads ~/Library/Application Support/Claude/claude_desktop_config.json. Cursor reads ~/.cursor/mcp.json. Windsurf reads ~/.codeium/windsurf/mcp_config.json. Restart the client after editing the file.
2. Prepare a document
Download the synthetic NDA and save it as contract.docx. It contains the word termination and one existing tracked change.
Note its absolute path, for example /Users/you/documents/contract.docx. The prompts below use it.
3. Inspect before editing
Ask the agent to read the document first, using the absolute path:
Open /Users/you/documents/contract.docx with SuperDoc and summarize the
termination clause.The agent calls superdoc_open, which returns a session_id that every later call reuses, then reads content through superdoc_get_content. Reading first matters: an agent that edits before inspecting is guessing at what the document contains.
If the summary comes back empty or describes a document with no termination clause, the path was wrong and the agent is looking at a blank file.
4. Propose a tracked edit
Ask for a change that a person should approve:
Rewrite the termination clause to allow 30-day notice. Make it a tracked change
and save to /Users/you/documents/contract.reviewed.docx so the original stays
untouched.Tracked mode records the edit as a suggestion rather than overwriting text, and the separate output path keeps your source file intact. Both instructions are worth making explicit: the agent will otherwise apply a direct edit and save over the original.
5. Verify the output
Open contract.reviewed.docx in the editor below, or in Microsoft Word. The rewrite should appear as a tracked change you can accept or reject, and contract.docx should be unchanged.
The sample editor loads as this demo enters view. You can also open your own DOCX.
What the server exposes
The tool count depends on the preset. Three lifecycle tools are always present; the editing surface comes from the preset.
MCP_PRESET | Tools |
|---|---|
legacy (default) | 13: 3 lifecycle + 10 grouped intent tools |
core | 5: 3 lifecycle + superdoc_inspect and superdoc_perform_action |
This guide uses the server default so the setup above works with no extra configuration. That default is legacy, which is why this page shows those tools while Build an agent recommends core for SDK integrations. To run the core surface here too, add the environment variable to your client config:
{
"mcpServers": {
"superdoc": {
"command": "pnpm",
"args": ["dlx", "@superdoc-dev/mcp"],
"env": { "MCP_PRESET": "core" }
}
}
}The lifecycle tools are identical either way:
| Tool | Purpose |
|---|---|
superdoc_open | Open a .docx file and return a session_id |
superdoc_save | Write to the original path, or to out. Overwrites without warning |
superdoc_close | Close the session and release memory |
The default legacy preset adds ten grouped intent tools:
| Tool | Purpose |
|---|---|
superdoc_get_content, superdoc_search | Read content and find stable targets |
superdoc_edit, superdoc_format | Change text and apply formatting |
superdoc_create, superdoc_list | Add blocks and manipulate lists |
superdoc_table | Build and change tables |
superdoc_comment, superdoc_track_changes | Manage comments and resolve suggestions |
superdoc_mutations | Run multi-step edits as one atomic batch |
Every tool except superdoc_open takes the session_id. Unsaved work is lost on close, so the agent must save before closing.
Where to go next
Building the agent yourself, rather than connecting an existing one, means embedding the tool loop in your product. Build an agent covers that path with the SDK toolkit.
Before putting an agent near documents that matter, read Safety.