MCP Office Interop Word Server

Provides MCP tools to automate Word document processing via COM Interop on Windows.
  • typescript

13

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can automate Word processing on Windows by running a dedicated MCP server that exposes Word operations as MCP tools. This enables programmatic creation, editing, formatting, and retrieval of Word documents through simple tool calls from any MCP client.

How to use

You run the server locally and connect with an MCP client using either stdio or HTTP transport. Stdio keeps communication over standard input/output, ideal for local clients. HTTP/SSE allows web-based or remote clients to interact with Word documents.

To perform tasks, choose a tool name that starts with word_ and pass the required parameters. For example, to create a new document, call word_createDocument. To insert text, call word_insertText with the text you want to add. You can save, format, manipulate tables, headers/footers, images, and page setup using the respective tools listed in the available tool set.

If you are using the SSE transport, your client connects to the SSE endpoint and sends messages to the server’s message endpoint. The server exposes an HTTP-based endpoint at the SSE URL for streaming, typically http://localhost:3001/sse, and a message endpoint at http://localhost:3001/messages for client POSTs. For local, stdio usage, you simply start the server and connect via the standard input/output channel.

How to install

Prerequisites you need before install and run are:
- Node.js v18 or later
- npm
- Microsoft Word installed on Windows to enable COM Interop with Word objects.

Step by step install and run flow:

# 1) Install dependencies
npm install

# 2) Build TypeScript to JavaScript (produces files in dist)
npm run build

# 3) Start the server (stdio transport by default)
npm start

Additional notes

The server wraps common Word operations via COM Interop and exposes them as MCP tools. Transport options include stdio (default) and SSE/HTTP, enabling both local and remote clients to interact with Word documents.

Word object model constants used in tool arguments are represented by their numeric values (for example WdSaveFormat, WdUnits). Refer to Word VBA documentation for exact values when constructing tool params.

If you need to customize how you run the server, you can set the transport mode before starting. For SSE, set MCP_TRANSPORT to sse and then start the server.

Available tools

word_createDocument

Creates a new, blank Word document.

word_openDocument

Opens an existing Word document by file path.

word_saveActiveDocument

Saves the currently active Word document.

word_saveActiveDocumentAs

Saves the active document to a new path or format.

word_closeActiveDocument

Closes the active Word document.

word_insertText

Inserts text at the current selection.

word_deleteText

Deletes text relative to the selection by a given count and unit.

word_findAndReplace

Finds text and replaces it with new content.

word_toggleBold

Toggles bold formatting for the selection.

word_toggleItalic

Toggles italic formatting for the selection.

word_toggleUnderline

Toggles underline formatting for the selection with optional underline style.

word_setParagraphAlignment

Sets the alignment for the current paragraph.

word_setParagraphLeftIndent

Sets the left indent for the current paragraph.

word_setParagraphRightIndent

Sets the right indent for the current paragraph.

word_setParagraphFirstLineIndent

Sets first line or hanging indent for the current paragraph.

word_setParagraphSpaceBefore

Sets space before paragraphs.

word_setParagraphSpaceAfter

Sets space after paragraphs.

word_setParagraphLineSpacing

Sets line spacing for the current paragraph.

word_addTable

Adds a table at the current selection.

word_setTableCellText

Sets text inside a specific table cell.

word_insertTableRow

Inserts a row into a table.

word_insertTableColumn

Inserts a column into a table.

word_applyTableAutoFormat

Applies a style or format to a table.

word_insertPicture

Inserts an inline picture from a file.

word_setInlinePictureSize

Resizes an inline picture by specifying height and width.

word_setHeaderFooterText

Sets text in a header or footer for a section.

word_setPageMargins

Sets the page margins for the document.

word_setPageOrientation

Sets the page orientation (portrait or landscape).

word_setPaperSize

Sets the paper size for the document.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational