Skip to main content
Glama

Office Word MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_DEBUGNoEnable detailed logging when set to 10

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
create_document

Create a new Word document with optional metadata.

copy_document

Create a copy of a Word document.

get_document_info

Get information about a Word document.

get_document_text

Extract all text from a Word document.

get_document_outline

Get the structure of a Word document.

list_available_documents

List all .docx files in the specified directory.

get_document_xml

Get the raw XML structure of a Word document.

insert_header_near_text

Insert a header (with specified style) before or after the target paragraph. Specify by text or paragraph index. Args: filename (str), target_text (str, optional), header_title (str), position ('before' or 'after'), header_style (str, default 'Heading 1'), target_paragraph_index (int, optional).

insert_line_or_paragraph_near_text

Insert a new line or paragraph (with specified or matched style) before or after the target paragraph. Specify by text or paragraph index. Args: filename (str), target_text (str, optional), line_text (str), position ('before' or 'after'), line_style (str, optional), target_paragraph_index (int, optional).

insert_numbered_list_near_text

Insert a numbered list before or after the target paragraph. Specify by text or paragraph index. Args: filename (str), target_text (str, optional), list_items (list of str), position ('before' or 'after'), target_paragraph_index (int, optional).

add_paragraph

Add a paragraph to a Word document.

add_heading

Add a heading to a Word document.

add_picture

Add an image to a Word document.

add_table

Add a table to a Word document.

add_page_break

Add a page break to the document.

delete_paragraph

Delete a paragraph from a document.

search_and_replace

Search for text and replace all occurrences.

create_custom_style

Create a custom style in the document.

format_text

Format a specific range of text within a paragraph.

format_table

Format a table with borders, shading, and structure.

set_table_cell_shading

Apply shading/filling to a specific table cell.

apply_table_alternating_rows

Apply alternating row colors to a table for better readability.

highlight_table_header

Apply special highlighting to table header row.

merge_table_cells

Merge cells in a rectangular area of a table.

merge_table_cells_horizontal

Merge cells horizontally in a single row.

merge_table_cells_vertical

Merge cells vertically in a single column.

set_table_cell_alignment

Set text alignment for a specific table cell.

set_table_alignment_all

Set text alignment for all cells in a table.

protect_document

Add password protection to a Word document.

unprotect_document

Remove password protection from a Word document.

add_footnote_to_document

Add a footnote to a specific paragraph in a Word document.

add_footnote_after_text

Add a footnote after specific text with proper superscript formatting. This enhanced function ensures footnotes display correctly as superscript.

add_footnote_before_text

Add a footnote before specific text with proper superscript formatting. This enhanced function ensures footnotes display correctly as superscript.

add_footnote_enhanced

Enhanced footnote addition with guaranteed superscript formatting. Adds footnote at the end of a specific paragraph with proper style handling.

add_endnote_to_document

Add an endnote to a specific paragraph in a Word document.

customize_footnote_style

Customize footnote numbering and formatting in a Word document.

delete_footnote_from_document

Delete a footnote from a Word document. Identify the footnote either by ID (1, 2, 3, etc.) or by searching for text near it.

add_footnote_robust

Add footnote with robust validation and Word compliance. This is the production-ready version with comprehensive error handling.

validate_document_footnotes

Validate all footnotes in document for coherence and compliance. Returns detailed report on ID conflicts, orphaned content, missing styles, etc.

delete_footnote_robust

Delete footnote with comprehensive cleanup and orphan removal. Ensures complete removal from document.xml, footnotes.xml, and relationships.

get_paragraph_text_from_document

Get text from a specific paragraph in a Word document.

find_text_in_document

Find occurrences of specific text in a Word document.

convert_to_pdf

Convert a Word document to PDF format.

replace_paragraph_block_below_header

Reemplaza el bloque de párrafos debajo de un encabezado, evitando modificar TOC.

replace_block_between_manual_anchors

Replace all content between start_anchor_text and end_anchor_text (or next logical header if not provided).

get_all_comments

Extract all comments from a Word document.

get_comments_by_author

Extract comments from a specific author in a Word document.

get_comments_for_paragraph

Extract comments for a specific paragraph in a Word document.

set_table_column_width

Set the width of a specific table column.

set_table_column_widths

Set the widths of multiple table columns.

set_table_width

Set the overall width of a table.

auto_fit_table_columns

Set table columns to auto-fit based on content.

format_table_cell_text

Format text within a specific table cell.

set_table_cell_padding

Set padding/margins for a specific table cell.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GongRzhe/Office-Word-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server