mcp-win-stdio-word
v0.5.6Windows-optimized Model Context Protocol (MCP) server for Word documents: 20 tools for multi-unit margins, multi-column layout, paragraph spacing/indentation…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_document_layout
Extract comprehensive page layout geometry, exact margins across multiple units (in, cm, mm, pt, twips), multi-column layout (IEEE/Journal), printable area, section break types, and header/footer distances. Args: file_path: Absolute or relative path to the .docx or .doc file.
| Parameter | Type | Description |
|---|---|---|
file_path * | string |
get_paragraph_spacing_and_indentation
Extract detailed paragraph spacing (line spacing, space before/after in pt), indentation (first-line indent, left/right margins in inches), and alignment. Args: file_path: Absolute or relative path to the .docx or .doc file. max_paragraphs: Number of paragraphs to analyze (default: 40, max: 100).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
max_paragraphs | integer |
get_document_typography
Extract all typography details (font families, font sizes, colors, headings, styles, and alignments) across the Word document. Args: file_path: Path to the .docx or .doc file. max_paragraphs: Maximum paragraph styles to detail (default: 40, max: 100).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
max_paragraphs | integer |
get_document_images
Extract all images and graphics from headers, footers, body paragraphs, and tables along with exact placement, alignment, dimensions, and coordinates. Args: file_path: Absolute or relative path to the .docx or .doc file. max_images: Maximum images to detail (default: 50, max: 100).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
max_images | integer |
get_document_tables
Extract tables from a Word document as structured JSON or readable Markdown with safe limits. Args: file_path: Absolute or relative path to the .docx or .doc file. format: Output format ('markdown' or 'json'). Default is 'markdown'. max_tables: Maximum tables to extract (default: 10, max: 25). max_rows: Maximum rows per table to extract (default: 30, max: 100).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
format | string | |
max_rows | integer | |
max_tables | integer |
get_document_outline
Extract the heading hierarchy and table of contents tree (H1, H2, H3, H4) with paragraph positions. Args: file_path: Absolute or relative path to the .docx or .doc file. max_headings: Maximum headings to extract (default: 100, max: 200).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
max_headings | integer |
get_document_metadata
Retrieve document properties, author, title, revision, word count, and timestamp metadata. Args: file_path: Absolute or relative path to the .docx or .doc file.
| Parameter | Type | Description |
|---|---|---|
file_path * | string |
read_word_document
Read and extract the content of a Word document formatted as Markdown or structured JSON. Includes token-safe truncation for large documents to prevent LLM context bloating. Args: file_path: Path to the .docx or .doc file. include_tables: Whether to include table contents (default: True). include_headers_footers: Whether to include header and footer text (default: True). output_format: Output format ('markdown' or 'json'). Default is 'markdown'. max_paragraphs: Maximum body paragraphs to extract (default: 80, max: 300). max_chars: M…
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
include_headers_footers | boolean | |
include_tables | boolean | |
max_chars | integer | |
max_paragraphs | integer | |
output_format | string |
search_word_document
Search for a text term or pattern across paragraphs, headers, footers, and table cells in a Word document. Args: file_path: Path to the .docx or .doc file. search_term: String or pattern to search for. match_case: Case-sensitive search flag (default: False). max_matches: Maximum number of matches to return (default: 50, max: 200).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
search_term * | string | |
match_case | boolean | |
max_matches | integer |
edit_paragraph
Safely edit the text of a specific paragraph (1-indexed) in a Word document, preserving its style and formatting. Args: file_path: Path to the .docx file. paragraph_index: 1-based index of the paragraph to edit. new_text: Replacement text for the paragraph. output_path: Optional destination path to save modified document. If omitted and overwrite=True, modifies original file. overwrite: Safety confirmation flag required if modifying the file directly without output_path.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
new_text * | string | |
paragraph_index * | integer | |
output_path | ||
overwrite | boolean |
insert_table
Insert a structured table into a Word document. Args: file_path: Path to the target .docx file. headers: Column header names. rows: 2D list of row cell values. style: Word table style (default: 'Table Grid'). output_path: Optional destination path. If omitted and overwrite=True, modifies original file. overwrite: Safety confirmation flag required if modifying the file directly without output_path.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
headers * | array | |
rows * | array | |
output_path | ||
overwrite | boolean | |
style | string |
inspect_revisions_and_comments
Extract author comments, tracked insertions, and tracked deletions from a Word document (.docx). Args: file_path: Path to the .docx or .doc file. max_items: Maximum items to extract per category (default: 50, max: 100).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
max_items | integer |
create_document
Create a new empty Microsoft Word (.docx) document with custom page setup, margins, and metadata. Args: file_path: Path to the new .docx file to create. title: Optional document title to set in core metadata and insert as Title heading. author: Optional author name to set in core metadata. paper_size: 'A4' (default), 'Letter', 'Legal', or 'A3'. orientation: 'portrait' (default) or 'landscape'. margin_inches: Margins on all sides in inches (default: 1.0). overwrite: Whether to overwrite if the file already exists (default: True).…
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
author | ||
margin_inches | number | |
orientation | string | |
overwrite | boolean | |
paper_size | string | |
title |
add_paragraph
Append a styled paragraph to a Word document. Args: file_path: Path to the .docx document. text: Paragraph text content. style: Built-in style name (e.g. 'Normal', 'List Bullet', 'List Number', 'Quote'). font_name: Font family name (e.g. 'Calibri', 'Times New Roman', 'Arial'). font_size_pt: Font size in points (e.g. 11, 12, 14). bold: Whether text is bold. italic: Whether text is italic. underline: Whether text is underlined. color_hex: Text hex color code without '#' (e.g. '002060', 'C00000'). alignment:…
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
text * | string | |
alignment | ||
bold | boolean | |
color_hex | ||
font_name | ||
font_size_pt | ||
italic | boolean | |
line_spacing | ||
space_after_pt | ||
space_before_pt | ||
style | ||
underline | boolean |
add_heading
Append a heading (level 1-9) or Title (level 0) to a Word document. Args: file_path: Path to the .docx document. text: Heading text content. level: Heading level from 0 (Title) to 9 (default: 1).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
text * | string | |
level | integer |
fill_template
Populate a Word document template by replacing placeholder tags (e.g. {{client_name}}, {{date}}, {{total_amount}}) across body paragraphs, tables, headers, and footers while preserving styles. Args: template_path: Path to the source .docx template file. output_path: Destination path for the populated .docx file. replacements: Key-value dictionary of placeholders to replacement strings (e.g. {"{{client_name}}": "Acme Inc"}).
| Parameter | Type | Description |
|---|---|---|
output_path * | string | |
replacements * | object | |
template_path * | string |
replace_text
Find and replace text across the entire Word document (paragraphs and tables). Args: file_path: Path to the .docx document. search_text: Substring to find. replace_text: Replacement substring. match_case: Whether to match case sensitive (default: False). output_path: Optional output path (overwrites file_path if omitted).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
replace_text * | string | |
search_text * | string | |
match_case | boolean | |
output_path |
insert_image
Insert an image into a Word document with optional scaling and caption. Args: file_path: Path to the target .docx document. image_path: Path to the image file (.png, .jpg, .jpeg, etc.). width_inches: Image width in inches (preserves aspect ratio if height omitted). height_inches: Image height in inches (preserves aspect ratio if width omitted). caption: Optional caption text placed below the image.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
image_path * | string | |
caption | ||
height_inches | ||
width_inches |
export_to_pdf
Export a Microsoft Word document (.docx) to a high-fidelity PDF file using Windows Word COM automation. Args: file_path: Path to the source .docx file. output_pdf_path: Optional destination path for the .pdf file (defaults to same name with .pdf extension).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
output_pdf_path |