Home / MCP / Office-Word-MCP-Server
Exposes Word document operations via MCP to create, edit, format, and analyze documents programmatically.
Configuration
View docs{
"mcpServers": {
"word_mcp": {
"command": "python",
"args": [
"/path/to/word_mcp_server.py"
]
}
}
}You can use Office-Word-MCP-Server to create, read, and edit Microsoft Word documents through a standardized Model Context Protocol interface. This server lets AI assistants interact with Word documents for tasks like creating documents, adding content, formatting, and extracting information in a clean, maintainable way.
You interact with the Office-Word-MCP-Server by connecting an MCP client to the local or remote server. You can run the local server process and then configure your MCP client to communicate with it using a simple stdio-based workflow or, if available, a remote HTTP endpoint. Once connected, you can perform practical operations such as creating a new document, inserting headings and paragraphs, building tables, applying formatting, and exporting to PDF. You can also read and extract content, search text, and manage comments and revisions. Use the provided tool functions to guide your prompts, for example creating a document titled with a specific name, adding a heading, inserting a table, and applying formatting across selected content.
Start by launching the local server process and then point your MCP client to the server. Typical workflows include creating a new Word document, adding structured content (headings, paragraphs, and lists), inserting tables and images, customizing styles, and performing content extraction or searches across the document.
Create a new document, add headings and paragraphs with direct formatting, build and format tables, insert images with proportional scaling, apply page breaks, and insert lists with correct XML numbering. You can also insert content relative to existing text, create and apply custom styles, format specific text ranges, and manage advanced table formatting such as borders, shading, and cell padding.
1) Start the server process locally. 2) Configure your MCP client to connect using a stdio command or a HTTP URL if you have a remote endpoint. 3) Begin issuing document manipulation commands through the MCP layer and verify the results in Word.
Create a new Word document with optional metadata such as title and author.
Retrieve document metadata and properties.
Extract all text from a document or specific sections.
Obtain the document's outline or structure.
Copy an existing document to a new filename.
Convert a Word document to PDF format.
Insert a heading with a chosen level and optional direct formatting.
Add a paragraph with optional styling and direct formatting.
Create a table with provided data and dimensions.
Insert an image with proportional scaling into the document.
Insert a page break at the current location.
Insert a header near a specified text or paragraph position.
Insert a line or paragraph near a target location with optional styling.
Insert a bulleted or numbered list near target content with proper XML formatting.
Retrieve text from a specific paragraph by index.
Search for text within the document with optional matching controls.
Apply bold, italic, underline, color, font size, and font name to a text range.
Find and replace text across the document.
Delete a paragraph by index.
Create and apply a custom style to document elements.
Apply formatting to a table, including header rows and borders.
Apply shading to specific table cells.
Apply alternating row colors to a table for readability.
Highlight the table header with a distinct style.
Merge multiple table cells across rows and columns.
Merge cells horizontally within a row.
Merge cells vertically within a column.
Set horizontal and vertical alignment for a specific cell.
Apply alignment to all cells in a table.
Format text within a specific table cell.
Set padding for table cells with explicit units.
Set the width of a specific table column.
Set multiple column widths for a table.
Set the overall table width.
Auto-fit table columns to content.
Extract all comments from the document.
Filter comments by author.
Get comments associated with a specific paragraph.