Microsoft Word automation for AI assistants. Requires Word for Windows.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP server that lets AI assistants drive Microsoft Word for Windows through COM automation: open documents, read and edit text, manage paragraphs and tables, set document properties and export to PDF.
Windows only. A local installation of Microsoft Word is required β this server automates the real application, it does not parse
.docxfiles.
| OS | Windows 10/11 |
| Runtime | .NET 9 SDK or runtime |
| Office | Microsoft Word 2016 or newer (desktop, not Microsoft Store version) |
A thin extension in vscode-extension/ registers the server with VS Code, so
there is nothing to configure by hand. It does not bundle the server; it launches it through dnx,
which means the server updates without a new extension release.
Build and install it from a checkout:
Then run MCP: List Servers from the Command Palette and start Word.
The tool is then available as mcp-word.
To update or remove it later:
To run an unreleased build instead, pack it locally and install from the output folder:
The server is listed in the MCP registry as io.github.trsdn/mcp-server-word. Clients that resolve packages themselves can run it through dnx, which fetches the version on demand instead of keeping a global tool around:
The server speaks stdio.
.vscode/mcp.json:
%APPDATA%\Claude\claude_desktop_config.json:
Every operation runs inside a session. A session owns one Word instance and one open document, identified by a session_id such as word-a1b2c3d4e5f6g.
C:\Users\me\Documents\report.docx)..docx, .docm, .doc, .dotx, .dotm, .rtf.Sessions normally live inside the MCP server process and disappear with it. WordMcp.Service.exe
is an optional background daemon that holds them instead, so a session survives a restarted client
and can be shared by several of them:
Starting it by hand is rarely necessary β a client configured to use it starts it on demand. The pipe it listens on embeds your SID and is ACL'd to it, so sessions are never shared between accounts. It exits on its own once no session has been open for the idle timeout.
To use it, set WORDMCP_SERVICE_MODE=daemon for the MCP server. Every tool call then travels to
the daemon instead of running in the server's own process. Without it the server keeps sessions to
itself, which is what a single client wants: no second process and no startup wait.
Seventeen tools, each with an action parameter.
file β session lifecycle| Action | Purpose |
|---|---|
open | Open an existing document and start a session |
create | Create a new document at path |
save | Save the open document |
close | Save (optionally) and close the session |
list | List all active sessions |
test | Check whether Word can be automated on this machine |
text β content| Action | Purpose |
|---|---|
get | Read the whole text or a character range (start, end, max_length) |
append | Append text, optionally as a new paragraph |
find | Find a term; returns positions and surrounding context |
replace | Replace occurrences (match_case, match_whole_word, replace_all) |
format | Apply bold, italic, underline, font_name, font_size, color to a range |
Character positions come from get and find and are Word range offsets.
paragraph β structure| Action | Purpose |
|---|---|
list | List paragraphs with index, text, style, alignment and outline level |
add | Append a paragraph, optionally with style |
insert | Insert a paragraph before a given index |
delete | Delete a paragraph by index |
set-style | Apply a style such as Heading 1 |
set-alignment | left, center, right or justify |
Paragraph indices are 1-based, matching Word.
table β tables| Action | Purpose |
|---|---|
list | List tables with dimensions and style |
create | Create a table with rows Γ columns |
read | Read all cells of a table as a row/column matrix |
set-cell | Write a single cell (row, column, text) |
add-row | Append a row |
delete-row | Delete a row |
set-style | Apply a table style such as Table Grid |
document β metadata and export| Action | Purpose |
|---|---|
get-info | Word, character, paragraph, page, table and section counts |
get-properties | Title, author, subject, keywords, comments, company |
set-properties | Update those built-in properties |
export-pdf | Export to PDF without touching the open document |
save-as | Save a copy in another format |
image β pictures| Action | Purpose |
|---|---|
list | List inline images with index, size, alt text and link state |
insert | Insert a picture, optionally with width, height, caption and alt_text |
resize | Resize by width/height or by scale_percent |
replace | Swap the picture behind an index, keeping its size by default |
delete | Delete an image by index |
set-alt-text | Set the alternative text for accessibility |
field β fields and tables of contents| Action | Purpose |
|---|---|
list | List all fields with index, type and field code |
insert-toc | Insert a table of contents (upper_heading_level, lower_heading_level) |
update-toc | Recalculate every table of contents |
update-all | Update all fields, including those in headers and footers |
insert-page-number | Add a page number to the header or footer |
section β sections and page setup| Action | Purpose |
|---|---|
list | List all sections with start type, margins, page size and orientation |
add | Insert a section break (start_type: next-page, continuous, even-page, odd-page) |
page-setup | Set margins, orientation and paper_size for one section or the whole document |
header-footer β headers and footers| Action | Purpose |
|---|---|
get | Read the header or footer of one section or of all sections |
set | Write text, optionally with an alignment |
clear | Empty the header or footer |
kind selects header or footer, type selects primary, first-page or even-pages.
style β styles| Action | Purpose |
|---|---|
list | List styles; by default only the ones the document uses |
create | Add a custom style, optionally based on an existing one |
modify | Change font and paragraph formatting of a style |
delete | Remove a custom style |
style_type selects paragraph, character, table or list. Pass in_use_only: false to
list for the full set, which is over 370 entries on a localized Word.
list β bullets and numbering| Action | Purpose |
|---|---|
get | Report the list formatting of the paragraphs, including the rendered bullet or number |
apply | Format a paragraph range as a bullet, number or outline-number list |
set-level | Set the list level of a paragraph range (1β9) |
restart | Start the numbering over at a paragraph |
remove | Strip the list formatting |
Omitting end_index applies the action to start_index alone.
comment β review notesNo reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/word)<a href="https://allmcps.com/mcp/word"><img src="https://allmcps.com/api/badge/word?style=directory" alt="Word on AllMCPs" /></a>