Get the FREE Ultimate OpenClaw Setup Guide →

Office-Word

A Model Context Protocol (MCP) server for creating, reading, and manipulating Microsoft Word documents. This server enables AI assistants to work with Word documents through a standardized interface, providing rich document editing capabilities.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gongrzhe-office-word-mcp-server python /path/to/word_mcp_server.py

How to use

Office-Word-MCP-Server exposes a comprehensive set of Word document operations through the MCP interface, enabling AI assistants to create, read, edit, and analyze Word documents via a standardized toolset. Core capabilities include document management (creating new documents, listing, merging, converting to PDF, and extracting metadata), content creation (inserting and formatting headings, paragraphs, tables, images, page breaks, and lists), rich text formatting (font properties, color, bold/italic/underline, style application, search and replace), advanced table formatting (borders, shading, headers, cell formatting, merging, width control, and auto-fit), and advanced document manipulation (inserting content relative to text indices, applying styles consistently, and complex layout adjustments). Additional features cover document protection (passwords, restricted editing, signatures), and comment extraction (filtering by author, retrieving by paragraph, and accessing metadata).

To use the server, configure MCP clients (like Claude for Desktop) to point to the Python-based server entry point (for example, word_mcp_server.py). Once configured, you can issue prompts to perform tasks such as creating a new document with a title, inserting headings and paragraphs with specific formatting, constructing tables with data, applying styles, inserting and formatting lists, extracting or inspecting comments, and converting documents to other formats. The API is organized around standard document-editing operations, so you can compose complex sequences of edits by invoking the appropriate tools in the desired order (e.g., create document, insert a heading, add a two-paragraph body, format the heading, insert a table, adjust cell formatting, then export to PDF).

How to install

Prerequisites:\n- Python 3.8 or higher\n- pip (Python package manager)\n\nInstallation steps:\n1) Clone the repository (or download the server package):\nbash\n# Clone the repository\ngit clone https://github.com/GongRzhe/Office-Word-MCP-Server.git\ncd Office-Word-MCP-Server\n\n2) Install Python dependencies:\nbash\npip install -r requirements.txt\n\n3) Run the setup script to generate MCP configuration (optional, provides MCP config and environment prep):\nbash\npython setup_mcp.py\n\n4) Start the MCP server using the generated entry point (example):\nbash\npython word_mcp_server.py\n Note: If you prefer an on-demand setup without running the server directly, you can still rely on the provided configuration example for Claude integration (see Usage section).

Additional notes

Tips and notes:\n- The server is Python-based. Ensure Python 3.8+ is installed and that your environment has access to any Microsoft Word-related tooling or libraries required by the server (as defined in requirements.txt).\n- Example MCP config uses the entry point path to word_mcp_server.py; adjust the path to where you deploy the server script.\n- If you deploy in a constrained environment, consider using a virtual environment (venv) and activating it before running the server.\n- For Claude/Desktop integration, you may configure the mcpServers section with either a local Python path (as shown) or via uvx for environments where Python tools are not available locally.\n- Environment variables can be added to the mcp_config under an env object if needed by your deployment (e.g., for authentication, file paths, or Word interop settings).\n- When exporting or converting documents (e.g., to PDF), ensure the hosting environment has the necessary conversion tools or libraries installed.\n- If you encounter file path or permission issues, verify that the server process has read/write access to the documents you intend to modify.\n- This MCP server focuses on Word documents; for other formats, use corresponding MCP servers or adapters that support those formats.

Related MCP Servers

Sponsor this space

Reach thousands of developers