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/mcp

For 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.

Download the tracked-changes fixtureSynthetic NDA with one tracked changeDOCX

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.

Review the agent outputLoads the sample automatically. Files stay in this browser.
Loading…

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_PRESETTools
legacy (default)13: 3 lifecycle + 10 grouped intent tools
core5: 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:

ToolPurpose
superdoc_openOpen a .docx file and return a session_id
superdoc_saveWrite to the original path, or to out. Overwrites without warning
superdoc_closeClose the session and release memory

The default legacy preset adds ten grouped intent tools:

ToolPurpose
superdoc_get_content, superdoc_searchRead content and find stable targets
superdoc_edit, superdoc_formatChange text and apply formatting
superdoc_create, superdoc_listAdd blocks and manipulate lists
superdoc_tableBuild and change tables
superdoc_comment, superdoc_track_changesManage comments and resolve suggestions
superdoc_mutationsRun 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.

On this page