Skip to main content
Glama

KitchenSink4Word

Tests PyPI License: AGPL-3.0

Edit Word documents with your AI assistant: tracked changes, citations, templates, and live edits in an open document.

Your AI gets 231 actions in Word, a backup before every change, and a question instead of a guess when your request could mean more than one place.

KitchenSink4Word is an MCP server that lets Claude Code, the Codex CLI, Copilot CLI, Claude Desktop and other local MCP clients read and edit .docx files. It can also work on a document while it is open in Microsoft Word, so you watch the changes arrive. This is the free Community edition, licensed under the AGPL-3.0.

Product page · llms.txt · Changelog

Platform: Windows. Editing files works without Word installed. Live editing and the Word-powered features (PDF import and export, document compare, proofing, field refresh) need Microsoft Word.

Install

The package needs Python 3.12 or newer. Run the commands below in PowerShell or a terminal, not in an AI chat.

Claude Code or Codex CLI. Install uv, run the line for your app, and start a new session:

claude mcp add word -s user -- uvx kitchensink4word
codex mcp add word -- uvx kitchensink4word

Claude Desktop. Install uv and restart Claude Desktop. Download the .mcpb file from the latest release, then open Settings > Extensions > Advanced settings > Install extension and choose the file. The first launch downloads the Python package, so it needs a network connection.

Any other local MCP client. Use uvx as the command and kitchensink4word as its argument, or install the package and run kitchensink4word as the server command:

pip install kitchensink4word

Installing the package by itself does not connect it to an AI app; add it as a local MCP server in your client's settings.

Related MCP server: MCP Word Commander

What it can do

  • Revise a report while it stays open in Word, with each edit visible as it lands.

  • Read, accept and reject tracked changes, write edits as tracked changes, and work through reviewer comments.

  • Fill templates, assemble chapter files into one document, and run mail merges.

  • Build and format tables, lists, headings, sections and page layouts.

  • Insert citations, bibliographies, footnotes, endnotes, captions and cross-references, including Zotero library citations.

  • Check formatting, accessibility and document structure before you hand a file over.

  • Compare two versions of a document, redact selected text, and import or export PDF through Word.

In total the server offers 115 operations in 10 tools, 231 counting each action an operation can take (for example each kind of note or table change). The whole tool list costs about 9.2k tokens of your AI's working memory at startup. Figures come from scripts/measure_surface.py and scripts/count_operations.py.

Highlights

  • Table columns through merged cells. Inserting or deleting a column works correctly when the table has horizontally or vertically merged cells.

  • Bulk edits in one call. Twenty cell edits are one set_cells call, not twenty round trips.

  • Real tracked changes. Edit tools accept track and an author and produce Word revisions the recipient can accept or reject. With no author named, changes and comments are signed with your Office user name, the one your own Word uses, and the result's author_source says where the name came from. To sign one call as the assistant instead, pass author="assistant", which signs "AI Assistant via KS4Word".

  • Word-native compare. com_multi_document with action="compare" produces a redline between two versions.

  • Built not to corrupt. Saves are atomic and validated, the previous version is backed up before every change, and anything the call does not touch (equations, text boxes, content controls) passes through byte for byte. A file that is open in Word is refused with a clear message instead of a hang.

  • Find and replace across split runs. Matches work even when Word has broken the text into many runs, and per-character formatting is preserved. User regular expressions run with a timeout.

  • Edits you can aim. Text that matches more than once is refused with every candidate listed, so the wrong paragraph is never edited silently, and a refusal carries the next call to make.

The ten tools and context cost

The server lists ten tools, all from the first message, with nothing to switch on. Every tool except word_help takes an op (the operation to run) and args (its arguments, including the file_path of the .docx). word_help returns the arguments and a worked example for any operation, and an argument an operation does not define is refused rather than ignored. Token figures count the full tools/list entry the client receives and come from scripts/measure_surface.py.

Tool

Operations

Approx. tokens

What it covers

word_read

24

1,400

Read text, an anchored document view, the outline and tables; find text; list elements; read styles, comments, tracked changes, headers and footers, properties and protection; validate and diagnose; word counts and structured diff; citation checks; get_workflows, get_server_info and Word status

word_edit

9

1,103

Insert, change and delete paragraphs, find and replace across split runs, batch edits with apply_edits, breaks, anchors and verified redaction

word_format

6

620

Styles, character and paragraph formatting, heading levels and publication formats

word_structure

15

1,025

Headers and footers, sections, page numbers, lists and numbering, tables (create, edit, restructure, sort, import), chapter headers and moving sections

word_media

12

906

Images, charts, equations, text boxes, hyperlinks, fields, content controls and form fields

word_review

7

787

Threaded comments, accepting and rejecting tracked changes, switching Track Changes on or off in a closed file, marking edits made with Track Changes off against an earlier copy, anonymizing for peer review and restoring, submission preparation

word_references

13

1,032

Footnotes and endnotes, captions, tables of contents and figures, index entries, bookmarks, cross-references, Word-native citations and bibliography, Zotero search and cite, citation style conversion

word_document

15

1,030

New and copied documents, backups, properties and embedded fonts, inserting and splitting documents, templates and mail merge, front matter, protection, watermarks, accessibility fixes, table export

word_app

14

1,070

Drives a local Word: save a document open in Word, edit it live, toggle track changes, refresh fields, PDF import and export, compare and combine, proofing, readability, open-clean validation. Needs Windows with Word. Also updates the server when you ask (update_now) and turns update notices on or off (update_notices)

word_help

0

213

The arguments and a worked example for any operation, and an explanation of the location object

All ten

115

9,186

Loaded once at the start; nothing to switch on later

For a recipe, ask your AI to call get_workflows. It lists 13 tasks, each with the right tool and operation for every step. Clients that load tool schemas on first use, such as Claude Code, pay close to nothing until a tool is called. The server's own instructions add about 500 tokens to the figures above.

Administrators who want a narrower server can set KS4W_READ_ONLY=1, which lists only the operations that read, or list the tools or operations to remove in KS4W_FORBID (see Configuration). What is removed no longer counts toward the cost.

Fewer permission prompts: in Claude Desktop's tool permissions for this server, set the read-only tools to Always Allow. They cannot change anything. Leave the editing tools on Ask.

Safety model

  • Before every change to a closed file, the current version is copied into a hidden .ks4w-backups/ folder next to the document. Each document keeps two copies: prev.docx (the state before the most recent change) and anchor.docx (the state at the start of the session, refreshed after an hour of inactivity). Storage stays at about two copies per document no matter how many edits you make. manage_backups lists, restores and purges them, and a restore can itself be undone.

  • Edits to a document that is open in Word are not part of this backup system. Word's own AutoRecover and undo cover the open document.

  • Saves are atomic and validated. If an operation fails, the original file is left exactly as it was.

  • Changes to the same file are serialized, within one server and across server processes, so parallel calls cannot overwrite each other.

  • Deleting content that holds footnote references removes the orphaned notes, and validate checks integrity in both directions. Paragraph deletion refuses ranges that would cut a field such as a TOC in half or remove a section break by accident.

  • Exclude .ks4w-backups/ from cloud sync (OneDrive, Dropbox, Google Drive). The backup files change with every edit, and sync clients can hold locks that slow saves down.

  • Protection is honored. A document with an editing restriction, and a file with Windows' read-only attribute, are not edited around: the write refuses with PROTECTED and the file is left exactly as it was. set_document_protection and manage_backups stay available on a protected document, so you can lift the restriction or restore a backup.

  • Snapshots before destructive operations. redact_text, resolve_revisions, prepare_for_submission, anonymize_for_review and set_document_protection keep a labeled snapshot of the file as it was, and manage_backups restores it by label.

  • Refusals instead of guesses. Ambiguous targets are refused with every candidate listed, an unknown style, key or cell address is refused by name, and a call that would delete a header's pictures or tables is refused unless you say so. Each refusal is structured ({ok: false, error: {code, message, hint}}) and names the next call to make.

  • Word stays yours. An encrypted file is refused before the server's hidden Word starts, so no password dialog lands on your desktop. The server ends a Word process only if it started that process itself and can prove it, never by program name, and a call that runs past its time limit answers TIMEOUT and, for a file edit, saves nothing.

  • Redaction and anonymization are not guaranteed. redact_text removes the text you name from every place it can safely reach, then re-reads the saved file and reports anything left. anonymize_for_review masks self-citations and author metadata and flags the rest for you. Neither can see text inside pictures or scans, and neither can know a name you did not give it, such as initials or a nickname. Check anything sensitive yourself before you share or submit it. For legal or regulated redaction, redact the final PDF with a dedicated tool.

Privacy

The server runs on your computer. KitchenSink4AI never receives your files or usage data. Your AI app may send prompts, file contents and tool results to its own provider under that app's settings and terms. The update check described below contacts PyPI at most once a week and sends only the package name and the installed version. Choosing Update now downloads the new version from PyPI, or the new bundle from GitHub for Claude Desktop. The server's startup banner is switched off, so the framework it runs on makes no version check of its own. The Privacy Policy covers the product, purchases and support.

Configuration

Launch settings are environment variables in the server's configuration. They are read once at start and never change afterward, and no tool call, argument or prompt can change them. A setting the server cannot parse stops it at start with one readable line that ends with "The server did not start."

Variable

Effect

KS4W_READ_ONLY

1 lists only the operations that read, so nothing can change a file

KS4W_FORBID

A comma-separated list of tool or operation names to remove from the tool list and from word_help; a call to one refuses NOT_AVAILABLE. An unknown name stops startup. word_app here closes every route to your running Word, including the live routes of other operations

KS4W_ALLOWED_ROOTS

Path sandbox: folders separated by ; on Windows (: elsewhere)

KS4W_AUTHOR

Who tracked changes and comments are signed by when a call names no author: user (the default) signs with your own Office user name, the one Word uses (never an email address: the Windows sign-in name stands in for one); assistant signs "AI Assistant via KS4Word", and a call can ask for that name itself with author="assistant" whatever the setting is. Any other author in a call wins, except an email address, which is never written into a document: the default signs instead and the answer says so. In a document open in Word, Word signs edits with its own user name

KS4W_CALL_TIMEOUT_S

Wall-clock bound for one call, in seconds (default 300, from 1 to 3600)

KS4W_MAX_CALL_TIMEOUT_S

Ceiling for operations that declare a longer bound of their own, such as the Word-driven ones (default 900, from 1 to 3600)

KS4W_MAX_OUTPUT_CHARS

Ceiling on the size of one reply, in characters (default 80,000, minimum 2,000). A longer reply is cut and says what was cut and how to continue

KS4W_UPDATE_CHECK

off turns the update check off completely (the older KS4W_NO_UPDATE_CHECK=1 also works)

KS4W_UPDATE_NOTICES

off turns update notices off; on turns them back on after you turned them off

Settings from earlier versions are handled for you. An old default (KS4W_MODE=lite, full or everything, KS4W_PACK_POLICY=auto, KS4W_ALL_TOOLS, KS4W_LOCK_TOOLS off) is ignored with a one-line notice on stderr, and the status report lists it. A setting that locked the tools (KS4W_PACK_POLICY=locked, KS4W_LOCK_TOOLS on or a KS4W_MODE list of tool groups) stops the start with a message naming what to use instead: KS4W_READ_ONLY or KS4W_FORBID.

Update check and update notices. At most once a week, after you use a tool, the server asks PyPI in the background which version of kitchensink4word is newest. The request names only the package and the installed version and contains no documents, file names or identifiers. When a newer version exists and the server runs through uvx or the Claude Desktop extension, your AI app shows a short notice with Update now and Not now, where the app supports one. Otherwise your AI mentions the new version once and offers to update. It never downloads or installs a new version unless you choose Update now in its notice or ask your AI to update it. To turn notices off, ask your AI to turn off KitchenSink4Word update notices; KS4W_UPDATE_NOTICES=off turns them off everywhere, and KS4W_UPDATE_CHECK=off turns the check off completely (the older KS4W_NO_UPDATE_CHECK=1 also works). The setting is kept in the server's own state folder, so it survives updates.

Sandboxing (optional). Set KS4W_ALLOWED_ROOTS to a list of folders separated by ; on Windows (: elsewhere), for example %USERPROFILE%\Documents;D:\Work. Every path the server reads or writes must then resolve inside one of them. The check runs on canonical paths, so ..\ traversal, symbolic links and junctions, 8.3 short names, extended-length prefixes, case tricks and lookalike folder names (Documents2 next to an allowed Documents) are all caught. Network (UNC) paths are refused unless an allowed root is itself a UNC path that contains them. A blocked call returns a typed error naming the path and the allowed roots before any file is opened. We recommend it whenever the server handles requests you do not fully trust.

Live editing in Word

Which operations work on a document that is open in Word. Dual-mode operations auto-route (live='auto'); everything else refuses with DOCUMENT_LOCKED until the file is closed. Word COM calls within one server process are serialized. Live calls and passwordless save or close also use a machine-local cross-process lock; a concurrent caller receives APP_BUSY before touching Word and nothing is queued. Live edits stay unsaved until com_save_document; get_workflows(task='live-editing') explains the model.

Dual-mode operation (file + live)

Live-mode notes

apply_edits

one COM undo group; markdown lists/pipe tables in insert ops refuse up front with a close-the-file hint; replace verifies matched text in the live range; all other index-addressed ops run the snapshot staleness guard against the last saved state

delete_paragraphs

section-break/field-crossing ranges refuse; range={} location endpoints run the snapshot staleness guard

find_text

plain queries, 500-match cap; formatting mode and include_textboxes file-mode only

format_text

formatting mode routes live; case mode file-mode only (live='force' refuses); range={} locations run the snapshot staleness guard

get_comments

same shape

get_document_info

same key names; adds words/track_revisions, omits part list

get_outline

same flat-list shape

get_text

body shape identical; include_textboxes/textbox modes file-mode only

insert_paragraphs

heading_level maps to built-in Heading styles by numeric constant (outline-based docs get direct outline levels); inherit_format/copy_format_from file-mode only; text-selector locations run the snapshot staleness guard

search_and_replace

plain items route live (255-char finds handled); preview and find_formatting modes are file-mode only (find_formatting with live='force' refuses)

set_cells

plain text cells; vertical merges refuse live

set_paragraph_format

shading/borders/tab_stops keys refuse live (XML-level); raw indices keep the v1 index-trust contract

set_paragraph_text

expect guard honored; tracked-revision paragraphs refuse; text-selector locations run the snapshot staleness guard

word_count

Word's own statistics engine; exclusions mode file-mode only

Live-only operations (need the document open): live_insert_at_cursor, live_repair, live_scroll_to, live_set_track_changes.
COM tier (drive the Word application, open or closed): com_export_pdf, com_import_pdf, com_multi_document, com_proofing_errors, com_readability_statistics, com_refresh_fields, com_save_document, com_validate_opens_clean, com_word_status.
Open-document reader: get_document_view (reads the last SAVED state and says so).

Every other operation that reads or changes a document's file is file-only: it refuses while the document is open (close it, or use com_save_document with close=true).

Known limits

  • Live regular-expression replacements skip matches that sit after complex fields in the same story, because Word's character offsets drift there. The number skipped is reported, and a plain-text find still works.

  • Live set_cells refuses tables with vertically merged cells. The file-based tool handles them; close the document first.

  • Live tracked-change attribution follows Word: if Word is signed in to an Office account, revisions are attributed to that account. Results report the author Word actually used.

  • Table of contents and caption-list page numbers need a field update. Word does it the next time the file opens, or call com_refresh_fields.

  • A content control bound to the document's custom XML shows the text saved in the file; Word fills it from the stored data when the file opens, so the two can differ.

  • A few operations slow down sharply on extreme documents. retrack_changes on a paragraph of 100,000 characters or more with a paragraph added after it takes over a minute and grows quickly with the length, and set_header_footer on a document with a thousand sections takes minutes. A call that reaches the time limit stops with an error and leaves the file unchanged.

  • In a document on disk, built-in styles are found by the English names Word keeps in every language, such as heading 2 or Caption, or by the document's own style IDs. A name in another language, such as Überschrift 2, is refused, and the refusal lists the style IDs the document has. On a document open in Word, a style name goes to Word as given, so a Word installed in another language may need its own name for the style.

Heuristic tools. convert_citation_style, anonymize_for_review, validate(checks=["defined_terms"]) and the text-reference scan in validate(checks=["cross_references"]) are heuristic. Each returns a list of what it could not handle with confidence, so review that list rather than trusting the result blindly.

Upgrading from 2.x

Version 3.0 regroups the 112 flat tools of 2.2.x into the ten tools above. Every operation keeps its name except enable_tools and disable_tools, which are gone, but you now call it as an operation of a tool: word_edit with op="insert_paragraphs" instead of a tool named insert_paragraphs. The install commands, the package name and the commands word-mcp and kitchensink4word are unchanged.

If you called

It now lives in

get_text, get_document_view, find_text, list_elements, get_headers_footers, get_document_info, com_word_status, validate, diagnose_document, get_workflows, get_styles, get_outline, get_table, get_comments, get_tracked_changes, get_server_info, structured_diff, get_paragraph_format, word_count, get_revision_report, comment_report, get_protection, detect_citation_system, parse_references

word_read

insert_paragraphs, search_and_replace, delete_paragraphs, insert_break, apply_edits, delete_element, stamp_anchors, set_paragraph_text, redact_text

word_edit

define_style, apply_style, format_text, set_paragraph_format, change_heading_level, apply_manuscript_format

word_format

set_header_footer, set_section_properties, insert_list, create_table, set_table_properties, set_cells, delete_table, modify_table_structure, format_cells, sort_table, import_table, set_list_numbering, set_page_numbers, setup_chapter_headers, move_section

word_structure

insert_image, insert_field, set_image, export_images, insert_chart, set_chart_data, insert_equation, set_textbox_text, insert_hyperlink, insert_content_control, set_content_control, set_form_fields

word_media

manage_comment, resolve_revisions, anonymize_for_review, deanonymize_document, prepare_for_submission

word_review

manage_note, insert_caption, insert_reference_list, insert_bookmark, convert_notes, insert_cross_reference, mark_index_entry, insert_citation, insert_zotero_citation, search_zotero_library, manage_source, set_bibliography_style, convert_citation_style

word_references

insert_document, copy_document, create_document, manage_backups, set_document_properties, split_document, copy_table, apply_template, fill_template, mail_merge, assemble_front_matter, set_document_protection, set_watermark, fix_accessibility, export_table

word_document

com_save_document, live_insert_at_cursor, live_set_track_changes, com_refresh_fields, com_validate_opens_clean, com_multi_document, com_import_pdf, com_export_pdf, live_scroll_to, live_repair, com_proofing_errors, com_readability_statistics

word_app

enable_tools, disable_tools

Gone. Every operation is available from the start

A few arguments changed spelling, and the old spellings still work: after_anchor is now after_text and anchor_text is now at_text, set_document_protection takes read_only and tracked_changes, and list and page-number formats are snake_case (lower_roman). stamp_anchors moved from get_document_view to its own word_edit operation. Some behavior changed too: format_text and the inserters that locate by text refuse an ambiguous match until you pick an occurrence, tracked changes and comments are signed with your Office user name unless you name an author, and a protected document refuses writes. docs/surface_map.md lists every 2.2.1 tool beside its replacement, and the migrate-from-v2 recipe in get_workflows gives your AI the same map, including the changed arguments. The changelog lists everything else.

Upgrading from 1.x

Every 1.x tool name changed in 2.0, when 189 tools were consolidated into 110 that cover every earlier capability. Read the migration guide first; it maps each old name to its 2.x name, and docs/surface_map.md then maps that name to its tool and operation in 3.0. get_workflows("migrate-from-v1") returns the first map inside a session.

Testing

The suite has 4,525 tests. 96 of them drive a real Word window, and 135 start a private hidden Word of their own; they run only on Windows with Word installed. Tests that need sample documents generate structurally equivalent synthetic files with tests/make_corpus.py, so the rest of the suite runs on any machine and on every pull request. tests/word_validator.py opens each output in an invisible Word and fails on any repair prompt.

To run the suite without Word:

pytest tests -m "not live and not hidden_word"

Reporting problems

Please open an issue with the tool name, the call you made, what happened and what you expected. Ask your AI to run get_server_info and paste the output; it is designed to be safe to share. Please do not attach documents that contain anything private. For security issues, follow SECURITY.md instead.

Business edition

The Business edition pairs these tools with a Windows installer, a signed update channel and support under the Business terms. Update checks tell you when a covered release is available, and nothing installs on its own. See pricing. The Community edition stays free under the AGPL, including business use that meets its terms.

Contributing

Bug reports, fixes, tests and documentation are welcome. See CONTRIBUTING.md; first-time contributors agree to the Contributor License Agreement.

Review AI-assisted work

AI assistants make mistakes, and so does software. Have a person review any document an AI has edited before you rely on it, share it or submit it, and keep the backups until you have. KitchenSink4Word is provided under the AGPL-3.0 without any warranty, and, to the extent the law allows, its authors and KitchenSink4AI are not liable for the results of using it; sections 15 and 16 of the license govern.

License

KitchenSink4Word is dual-licensed.

  • AGPL-3.0. Free for anyone, including businesses, for any use that complies with the AGPL. Its terms include sharing your source code, with your modifications, when you distribute the software or make it available over a network.

  • Commercial license. For organizations that want to build KitchenSink4Word into their own products or services without the AGPL's source-sharing obligations. Contact licensing@kitchensink4.ai.

Copyright (c) 2026 Alvut Consulting, LLC. KitchenSink4AI is a product line of Alvut Consulting, LLC. KitchenSink4AI tools are built with the help of AI coding assistants, and every release goes through the full test suite before it ships.

Not affiliated with, endorsed by, or sponsored by Microsoft Corporation. Microsoft and Word are trademarks of the Microsoft group of companies. GitHub and Copilot are trademarks of the Microsoft group of companies. Claude is a trademark of Anthropic. Codex and OpenAI are trademarks of OpenAI. All other trademarks are the property of their respective owners.

Available Tools

10 tools
word_appWord Application and Open DocumentsA
Destructive

Needs Microsoft Word itself: save or close a document open in Word, insert at the user's cursor, switch track changes on an open document, scroll Word to a spot, export to and import from PDF, compare, combine or merge documents, refresh fields, Word's proofing and readability statistics, the opens-clean check, and repair after a crashed live edit. Text edits to an open document go through word_edit and reads through word_read. Live edits stay unsaved until com_save_document; the other com_ ops work in a private hidden Word and never change the source file, except com_refresh_fields, which saves it in place. On a document open in Word, switch track changes on (live_set_track_changes) before editing, and save (com_save_document) last. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • com_save_document(opt save close password output_path): Save or close a document open in Word, or save an encrypted copy; close with save=false discards unsaved changes.

  • live_insert_at_cursor(text; opt newline): Insert text at the user's cursor position in the open document (main body text only; headers, footers, and footnotes not supported).

  • live_set_track_changes(enabled): Turn track changes on or off in the open document; the setting stays unsaved until com_save_document (set_track_changes for a closed file).

  • com_refresh_fields(): Update every field (TOC, page references, captions, cross-references) in a hidden Word; this saves the file in place. Header/footer PAGE and NUMPAGES keep their cached values; Word recomputes them at layout.

  • com_validate_opens_clean(opt timeout): Open the file in a hidden Word and report whether it opens clean, with Word's own error if it does not. More ops follow, in the same format, in the op parameter's description.

Inputs: op (required), args.

word_documentWord Files and AssemblyA
Destructive

Whole files: create, copy, assemble, split, templates, mail merge, backups, protection, watermark, document properties, accessibility fixes and table export. Edits inside one document belong to the other tools. Writes only the files named in args; manage_backups lists, restores and snapshots the automatic backups. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • insert_document(target_path, source_path; opt location formatting): Insert the ENTIRE body of source_path into target_path at one position, with full resource reconciliation: the chapter-merge tool.

  • copy_document(dest_path; opt overwrite): Copy a document byte for byte to dest_path; an existing destination is refused unless overwrite=true.

  • create_document(opt title): Create a new blank .docx, optionally with a title property; an existing file is refused.

  • manage_backups(action; opt file_path directory source scope dry_run label dest_dir): List, restore, purge or snapshot the automatic backups (prev and anchor slots); purge is a dry run unless dry_run=false.

  • set_document_properties(opt title author subject keywords category comments update_fields_on_open embed_fonts embed_fonts_subset): Set core document metadata (File > Info): title, author, subject, keywords, category, comments; only the parameters given change.

  • split_document(output_dir; opt level filename_from): Split a document into one standalone .docx per heading section, the inverse of com_multi_document merge (no Word needed).

  • copy_table(target_path, source_path, table_index; opt after_index after_text at_end): Copy one table from source_path into target_path, reconciling styles, numbering, images and notes; the source is not changed.

  • apply_template(reference_path; opt include_page_geometry): Restyle this document to match a reference document: styles, theme, fonts, layout settings, optionally page geometry. More ops follow, in the same format, in the op parameter's description.

Inputs: op (required), args.

word_editEdit Word TextA
Destructive

Change body text: insert, rewrite, delete, find and replace, page and section breaks, redaction, the anchored batch editor (apply_edits) and anchor stamping. Tables and lists are word_structure; styles and formatting are word_format. In any text an op writes, \n is a line break and \t a tab. Ops that take track=true record the change as a tracked change. Leave author out to sign with the user's own name, or pass author="assistant" to sign as "AI Assistant via KS4Word". Every edit to a closed file backs it up first and saves atomically, and a failed validation changes nothing. A document open in Word is edited live and stays unsaved until word_app com_save_document; ops with no live route refuse it. Paragraph numbers count body paragraphs from 0, tables not included, so the first paragraph (usually the title) is paragraph 0; get_text and get_outline show the numbers. An insert at {"paragraph": N} goes after paragraph N (position "before" puts it in front). When a heading or phrase marks the spot, use after_heading, search or anchor instead of a number. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • insert_paragraphs(paragraphs; opt location inherit_format copy_format_from track author): Insert paragraphs (items {text, style?, formatting?, heading_level?, paragraph_format?}) at a location object (omitted = document end). Each item becomes a new paragraph; to add words inside an existing paragraph, use search_and_replace. More ops follow, in the same format, in the op parameter's description.

Inputs: op (required), args.

word_formatWord Formatting and StylesA
Destructive

How text looks: apply or define styles, character and paragraph formatting, heading levels and manuscript format. To change the words themselves use word_edit. Every edit backs the file up first and saves atomically. format_text (formatting, not case) and set_paragraph_format edit a document open in Word live; the other ops refuse it. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • define_style(style_id; opt name style_type based_on next_style character_formatting paragraph_formatting): Create a paragraph or character style, or update one in place, replacing only the properties given. style_id is the style's id (Heading1, Normal, Title), not its display name, so a built-in style can be restyled without reading the style list first.

  • apply_style(style; opt range target): Apply a paragraph style to a range of paragraphs, or a character style to the text that target matches.

  • format_text(opt formatting case range find occurrence): Apply character formatting or change case.

  • set_paragraph_format(opt indices formatting start end): Set paragraph formatting on a batch: indices (0-based list) OR start/end (inclusive range), exactly one form.

  • change_heading_level(delta; opt heading_text paragraph_index subtree): Promote (delta=-1) or demote (delta=1) a heading, addressed by exact heading_text or paragraph_index.

  • apply_manuscript_format(style; opt running_head author_last_name): Apply a style guide's page conventions (apa7, apa7-professional, mla9, chicago17); choices the guides leave open are listed, not applied.

Inputs: op (required), args.

word_helpWord Tool HelpA
Read-onlyIdempotent

Read-only help. Call it when an op's arguments are unclear or after a BAD_PARAMS refusal. With no arguments it lists every tool and its ops; with op it returns that op's full arguments, an example call and the tool that runs it; topic='location' explains the location object. Reads no document.

Inputs: op, topic.

word_mediaWord Media, Fields and FormsA
Destructive

Embedded objects: images, charts, equations, text boxes, hyperlinks, fields, form fields and content controls. Plain text is word_edit and tables are word_structure. Every edit backs the file up first and saves atomically. These ops refuse a document open in Word. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • insert_image(image_path; opt location width_pt alignment wrap position z_order allow_overlap distance_pt wrap_text): Insert a PNG, JPEG, GIF, BMP or TIFF image at a location, inline by default or floating with wrap; aspect ratio is kept.

  • insert_field(field_code, location; opt placeholder): Insert a Word field (DATE, PAGE, NUMPAGES, SEQ, ...) at a location; codes outside the safe allowlist are refused.

  • set_image(image_id; opt source width_pt alt_text alt_title wrap position z_order allow_overlap distance_pt wrap_text force track author keep_width): Change one image (image_id from list_elements): swap the file (a tracked swap with track=true), resize, set alt text or wrapping; anything not named stays.

  • export_images(output_dir; opt prefix): Save every image in the document as files in output_dir; existing files are refused and the document is not changed.

  • insert_chart(chart_type, data; opt title width_pt height_pt location alignment legend colors): Insert a native, theme-following Word chart from data.

  • set_chart_data(chart_id, data; opt series_names): Replace a chart's data in place (chart_id from list_elements), keeping its formatting; the number of series must stay the same.

  • insert_equation(latex; opt display location at_text occurrence): Insert a LaTeX equation as NATIVE, editable Word math.

  • set_textbox_text(box_index, text): Replace the text of one text box (box_index from get_text(textbox=true)). More ops follow, in the same format, in the op parameter's description.

Inputs: op (required), args.

word_readRead Word DocumentA
Read-onlyIdempotent

Read-only: inspect, search, list, count and check a .docx before changing it. Never changes a file. To change anything use word_edit, word_format, word_structure, word_media, word_review, word_references, word_document or word_app. get_document_info, get_outline, get_text, find_text, get_comments and word_count read a document open in Word live; get_document_view reads its last saved state; the other reads of a file need it closed in Word. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • get_text(opt start end contains include_textboxes textbox): Read body paragraphs as [{index, text, style, ...}]; start and end are paragraph numbers, end exclusive.

  • get_document_view(opt scope detail include): Read the document as an anchored markdown projection, the low-token alternative to get_text for orientation and bulk editing. detail="full" shows revisions and comments.

  • find_text(opt query regex context_chars include_textboxes formatting scope max_results): Find text in paragraphs and table cells; returns locations plus context.

  • list_elements(type; opt filter): List one kind of element (tables, images, charts, bookmarks, notes, fields, lists, sources, ...) with the ids other ops take.

  • get_headers_footers(): Read every header and footer in every section: its text, its type, and whether it holds a page-number field.

  • get_document_info(): Read a one-call overview: paragraph, table, note, comment and revision counts, sections and package parts.

  • com_word_status(): Check whether Word is ready, busy or blocked by a dialog, and which open documents have unsaved changes; use before live edits.

  • validate(opt checks options): Run read-only check batteries (checks, default ['core']; also accessibility, notes, citation_parity and more) and return one report. More ops follow, in the same format, in the op parameter's description.

Inputs: op (required), args.

word_referencesWord References and NotesA
Destructive

Generated lists and scholarly apparatus: TOC and lists of figures and tables, footnotes and endnotes, captions, bookmarks, cross-references, index, citations, bibliography and Zotero. Plain text is word_edit. Every edit backs the file up first and saves atomically, and these ops refuse a document open in Word. Field results (TOC entries, page numbers, Word citations) fill in when Word updates fields, for example through word_app com_refresh_fields. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • manage_note(action; opt note_type text location note_id position): Insert, edit or delete a footnote or endnote, or remove orphaned note definitions (action).

  • insert_caption(text; opt table_index after_text image_id label above): Insert a numbered caption (SEQ field), 'Table N: text', above a table or below an image (image_id from list_elements; above flips either), or after the paragraph holding after_text.

  • insert_reference_list(type; opt title location options update_on_open): Insert a generated list (type): bibliography, TOC, list of figures, tables or equations, index, or glossary.

  • insert_bookmark(name, at_text; opt occurrence): Bookmark a text range by name, for cross-references, hyperlinks and the {bookmark: name} location; duplicate names are refused.

  • convert_notes(direction; opt note_id position): Convert footnotes to endnotes or back.

  • insert_cross_reference(to_bookmark, location; opt kind): Insert a cross-reference field pointing at a bookmark (create targets with insert_bookmark).

  • mark_index_entry(entry, location; opt subentry bold_page italic_page see): Mark an index entry with a hidden XE field at a location; insert_reference_list type='index' compiles the index. More ops follow, in the same format, in the op parameter's description.

Inputs: op (required), args.

word_reviewWord Comments and ReviewA
Destructive

Review state: add, reply to, resolve and delete comments, accept or reject tracked changes, switch Track Changes on or off in a closed file, anonymize a manuscript for blind review and restore it, and clean a manuscript for submission. To read comments or tracked changes use word_read; to make tracked edits use word_edit with track=true. resolve_revisions and prepare_for_submission can be undone only from the automatic backup. These ops refuse a document open in Word. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • manage_comment(action; opt text author comment_id location done): Add a comment at a location, or reply to, resolve or delete one by comment_id. Leave author out to sign with the user's own name, or pass author="assistant" to sign as "AI Assistant via KS4Word".

  • resolve_revisions(action; opt author): Accept or reject tracked changes in bulk, for every author or one (author); undo is from the automatic backup only.

  • anonymize_for_review(author_names; opt replacement mapping_path): Heuristic: review the flagged items rather than trusting silently. Anonymize a manuscript for blind review, reversibly; writes a private mapping file and flags identifying prose for you to check.

  • deanonymize_document(opt mapping_path): Reverse anonymize_for_review using its mapping file (default .anonymization.json beside the document).

  • prepare_for_submission(opt accept_revisions remove_comments scrub_metadata keep_title): Accept all tracked changes, delete all comments and scrub identifying metadata in one call; footnotes, fields and citations stay.

  • set_track_changes(enabled): Turn Track Changes on or off in a closed document, so Word and ops that take track record later edits (live_set_track_changes for an open one). One tracked edit needs only track=true on that op. More ops follow, in the same format, in the op parameter's description.

Inputs: op (required), args.

word_structureWord Tables, Lists and LayoutA
Destructive

Tables, lists and page layout: create and change tables and lists, sections, page setup, headers and footers, and page numbers. Body text is word_edit. Every edit backs the file up first and saves atomically. set_cells edits a document open in Word live; the other ops refuse it. Ops, one per line, as name(required; opt optional): what it does. file_path, live and backup are not repeated; word_help shows them:

  • set_header_footer(part, text; opt section ref_type alignment include_page_number replace_content): Set a section's header or footer text, replacing the whole part. ref_type 'first' is a different first page, no section break needed.

  • set_section_properties(opt section orientation page_width_pt page_height_pt margins_pt columns line_numbering): Set one section's page size, orientation, margins, columns and line numbering; with no changes it returns the current values.

  • insert_list(items; opt kind location continue_from start_at levels): Insert a bulleted or numbered list with real bullet/number glyphs (numbering.xml as needed).

  • create_table(data; opt location header_row width_pt): Create a table from 2D string data with single-line borders and a bold repeating header row (header_row=False for none).

  • set_table_properties(table_index; opt style banded_rows first_row_header column_widths header_row_repeat): Set table-wide attributes; pass any combination.

  • set_cells(table_index; opt edits block nested track author): Write many table cells in one call.

  • delete_table(table_index): Delete a whole table and its contents.

  • modify_table_structure(table_index, action; opt target at count copy_format_from width_pt start end columns range row cell at_row): Insert or delete rows or columns, or merge, unmerge or split one table (action picks which; extra arguments are refused).

  • format_cells(table_index, targets, formatting): Format table cells in bulk. More ops follow, in the same format, in the op parameter's description.

Inputs: op (required), args.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 10 tools

    Disambiguation4/5

    The ten top-level tools target mostly distinct areas such as reading, editing body text, formatting, structure, media, review, references, whole-document operations, and live Word actions. Descriptions explicitly redirect overlapping tasks, but boundaries between word_edit and word_format/word_structure, and between word_document and word_app, can still blur because of live-versus-closed-file routing.

    Naming Consistency5/5

    The exposed tool names all follow a clean word_<domain> snake_case pattern: word_read, word_edit, word_format, word_structure, word_media, word_review, word_references, word_document, word_app, word_help. Internal op names use some mixed prefixes such as com_ and live_, but the top-level tool naming itself is highly predictable.

    Tool Count4/5

    Ten top-level category tools is a reasonable count for a broad Word automation server, and each category maps to a recognizable capability area. However, several tools bundle a very large number of operations, so the nominal count understates the true surface complexity.

    Completeness5/5

    The surface covers document reading, body editing, formatting, tables and lists, media, comments and revisions, citations and references, file assembly, backups, templates, and live Word integration. This is effectively full lifecycle coverage for Word documents, with additional operations indicated behind 'More ops follow'.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers