ms word.com
ms word.com logo

MS Word

Integrates with Microsoft Word documents to enable reading, writing, and editing of text, tables, and images for automat...

Created byApr 23, 2025

MCP Server Office

A Model Context Protocol (MCP) server providing tools to read/write Microsoft Word (docx) files.

Usage

Install with pip:
Then, start the MCP server:
Or using uv, just:

Available Tools

  1. `read_docx`: Read complete contents of a docx file including tables and images. - Input: `path` (string) - Absolute path to the target file - Note: Images are converted to [Image] placeholders, and track changes are not shown
  1. `write_docx`: Create a new docx file with given content. - Input: - `path` (string) - Absolute path to target file - `content` (string) - Content to write to the file - Note: Use double line breaks for new paragraphs, and [Table] tag with | separators for tables
  1. `edit_docx_paragraph`: Make text replacements in specified paragraphs of a docx file. - Input: - `path` (string) - Absolute path to file to edit - `edits` (array) - List of dictionaries containing search/replace text and paragraph index - `paragraph_index` (number) - 0-based index of the paragraph to edit - `search` (string) - Text to find within the specified paragraph - `replace` (string) - Text to replace with - Note: Each search string must match exactly once within the specified paragraph
  1. `edit_docx_insert`: Insert new paragraphs into a docx file. - Input: - `path` (string) - Absolute path to file to edit - `inserts` (array) - List of dictionaries containing text and optional paragraph index - `text` (string) - Text to insert as a new paragraph - `paragraph_index` (number, optional) - 0-based index of the paragraph before which to insert. If not specified, insert at the end.

Requirements

  • Python >= 3.12
  • Dependencies: - mcp[cli] >= 1.2.0 - python-docx >= 1.1.2

MCP Server Office ( )

Microsoft Word (docx) Model Context Protocol (MCP)
pip :
MCP :
  1. `read_docx`: docx - : `path` ( ) - - : [Image]
  1. `write_docx`: docx - : - `path` ( ) - - `content` ( ) - - : 2 [Table] |
  1. `edit_docx_paragraph`: docx - : - `path` ( ) - - `edits` ( ) - / - `paragraph_index` ( ) - 0 - `search` ( ) - - `replace` ( ) - - :
  1. `edit_docx_insert`: docx - : - `path` ( ) - - `inserts` ( ) - - `text` ( ) - - `paragraph_index` ( , ) - 0
  • Python >= 3.12
  • : - mcp[cli] >= 1.2.0 - python-docx >= 1.1.2