Skip to main content
The SuperDoc MCP server lets AI agents open, read, edit, and save .docx files. It exposes the same operations as the Document API through the Model Context Protocol — the open standard for connecting AI tools to agents.
The MCP server is in alpha. Tools and output formats may change.

Setup

Install once. Your MCP client spawns the server automatically on each conversation.
claude mcp add superdoc -- npx @superdoc-dev/mcp

Workflow

Every interaction follows the same pattern: open, read or edit, save, close.
superdoc_open → superdoc_find / superdoc_get_text → edit tools → superdoc_save → superdoc_close
  1. superdoc_open loads a .docx file and returns a session_id
  2. superdoc_find locates content and returns target addresses
  3. Edit tools (superdoc_insert, superdoc_replace, superdoc_delete, superdoc_format) use those addresses
  4. superdoc_save writes changes to disk
  5. superdoc_close releases the session

Tools

23 tools in eight groups. All tools take a session_id from superdoc_open.

Lifecycle

ToolInputDescription
superdoc_openpathOpen a .docx file. Returns session_id and file path
superdoc_savesession_id, out?Save to the original path, or to out if specified
superdoc_closesession_idClose the session. Unsaved changes are lost

Query

ToolInputDescription
superdoc_findsession_id, type?, pattern?, limit?, offset?Search by node type, text pattern, or both. Returns matches with addresses
superdoc_get_nodesession_id, addressGet details about a specific node by its address
superdoc_infosession_idDocument metadata: structure summary, node counts, capabilities
superdoc_get_textsession_idFull plain-text content of the document

Mutation

All mutation tools accept suggest? — set to true to make the edit a tracked change instead of a direct edit.
ToolInputDescription
superdoc_insertsession_id, text, target, suggest?Insert text at a target position
superdoc_replacesession_id, text, target, suggest?Replace content at a target range
superdoc_deletesession_id, target, suggest?Delete content at a target range

Format

ToolInputDescription
superdoc_formatsession_id, style, target, suggest?Toggle formatting on a text range. Styles: bold, italic, underline, strikethrough

Create

ToolInputDescription
superdoc_createsession_id, type, text?, level?, at?, suggest?Create a block element. Types: paragraph, heading (headings require level 1-6)

Track changes

Review and resolve tracked changes (suggestions) in the document.
ToolInputDescription
superdoc_list_changessession_id, type?, limit?, offset?List tracked changes with type, author, date, and excerpt
superdoc_accept_changesession_id, idAccept a single change, applying it to the document
superdoc_reject_changesession_id, idReject a single change, reverting it
superdoc_accept_all_changessession_idAccept all tracked changes at once
superdoc_reject_all_changessession_idReject all tracked changes at once

Comments

Add and manage comments anchored to text ranges.
ToolInputDescription
superdoc_add_commentsession_id, text, targetAdd a comment anchored to a text range
superdoc_list_commentssession_id, include_resolved?List all comments with author, status, and anchored text
superdoc_reply_commentsession_id, comment_id, textReply to an existing comment thread
superdoc_resolve_commentsession_id, comment_idMark a comment as resolved

Lists

ToolInputDescription
superdoc_insert_listsession_id, target, position, text?Insert a list item before or after an existing one
superdoc_list_set_typesession_id, target, kindChange a list between ordered (numbered) and bullet

Suggesting mode

Set suggest=true on any mutation, format, or create tool to make edits appear as tracked changes. The document stays unchanged until someone accepts the suggestions — in Word, in SuperDoc’s browser editor, or programmatically via the track changes tools.

How it works

The MCP server runs as a local subprocess, communicating over stdio. It manages document sessions in memory — each superdoc_open creates an Editor instance, and all subsequent operations run against that in-memory state until you superdoc_save.
AI Agent (Claude, Cursor, Windsurf)
  │ MCP protocol (stdio)

@superdoc-dev/mcp
  │ Document API

SuperDoc Editor (in-memory)
  │ export

.docx file on disk
Your documents never leave your machine. The server runs locally, reads files from disk, and writes back to disk.

Debugging

Test the server directly with the MCP Inspector:
npx @modelcontextprotocol/inspector -- npx @superdoc-dev/mcp
This opens a browser UI where you can call each tool manually and inspect the raw JSON-RPC messages.
  • CLI — edit documents from the terminal
  • SDKs — typed Node.js and Python wrappers
  • Document API — the in-browser API that defines the operation set
  • AI Agents — headless mode for server-side AI workflows