The Office Word MCP Server is a tool that enables AI assistants to create, read, and manipulate Microsoft Word documents programmatically through the Model Context Protocol.
Key capabilities include:
Document Management: Create new documents with metadata, extract text, view properties, list/copy documents, merge multiple documents, and convert to PDF
Content Creation: Add headings, paragraphs, tables, images, page breaks, footnotes, and endnotes
Text Formatting: Apply bold/italic/underline formatting, change text color and font properties, apply custom styles, and search/replace text
Table Manipulation: Format tables with borders, styles, header rows, cell shading, and custom borders
Document Protection: Add password protection, implement restricted editing, apply digital signatures, and verify document integrity
Office-Word-MCP-Server
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.
Overview
Office-Word-MCP-Server implements the Model Context Protocol to expose Word document operations as tools and resources. It serves as a bridge between AI assistants and Microsoft Word documents, allowing for document creation, content addition, formatting, and analysis.
The server features a modular architecture that separates concerns into core functionality, tools, and utilities, making it highly maintainable and extensible for future enhancements.
Example
Pormpt
Output
Related MCP server: Appwrite MCP Server
Features
Document Management
Create new Word documents with metadata
Extract text and analyze document structure
View document properties and statistics
List available documents in a directory
Create copies of existing documents
Merge multiple documents into a single document
Convert Word documents to PDF format
Content Creation
Add headings with different levels and direct formatting (font, size, bold, italic, borders)
Insert paragraphs with optional styling and direct formatting (font, size, bold, italic, color)
Create tables with custom data
Add images with proportional scaling
Insert page breaks
Insert bulleted and numbered lists with proper XML formatting
Add footnotes and endnotes to documents
Convert footnotes to endnotes
Customize footnote and endnote styling
Create professional table layouts for technical documentation
Design callout boxes and formatted content for instructional materials
Build structured data tables for business reports with consistent styling
Insert content relative to existing text or paragraph indices
Rich Text Formatting
Format specific text sections (bold, italic, underline)
Change text color and font properties
Apply custom styles to text elements
Search and replace text throughout documents
Individual cell text formatting within tables
Multiple formatting combinations for enhanced visual appeal
Font customization with family and size control
Direct formatting during content creation (paragraphs and headings)
Reduce function calls by combining content creation with formatting
Add section header borders for visual separation
Table Formatting
Format tables with borders and styles
Create header rows with distinct formatting
Apply cell shading and custom borders
Structure tables for better readability
Individual cell background shading with color support
Alternating row colors for improved readability
Enhanced header row highlighting with custom colors
Cell text formatting with bold, italic, underline, color, font size, and font family
Comprehensive color support with named colors and hex color codes
Cell padding management with independent control of all sides
Cell alignment (horizontal and vertical positioning)
Cell merging (horizontal, vertical, and rectangular areas)
Column width management with multiple units (points, percentage, auto-fit)
Auto-fit capabilities for dynamic column sizing
Professional callout table support with icon cells and styled content
Advanced Document Manipulation
Delete paragraphs
Insert content relative to specific text or paragraph indices
Insert bulleted and numbered lists with proper XML numbering structure
Insert headers and paragraphs before or after target locations
Create custom document styles
Apply consistent formatting throughout documents
Format specific ranges of text with detailed control
Flexible padding units with support for points and percentage-based measurements
Clear, readable table presentation with proper alignment and spacing
Document Protection
Add password protection to documents
Implement restricted editing with editable sections
Add digital signatures to documents
Verify document authenticity and integrity
Comment Extraction
Extract all comments from a document
Filter comments by author
Get comments for specific paragraphs
Access comment metadata (author, date, text)
Installation
Installing via Smithery
To install Office Word Document Server for Claude Desktop automatically via Smithery:
Prerequisites
Python 3.8 or higher
pip package manager
Basic Installation
Using the Setup Script
Alternatively, you can use the provided setup script which handles:
Checking prerequisites
Setting up a virtual environment
Installing dependencies
Generating MCP configuration
Usage with Claude for Desktop
Configuration
Method 1: After Local Installation
After installation, add the server to your Claude for Desktop configuration file:
Method 2: Without Installation (Using uvx)
You can also configure Claude for Desktop to use the server without local installation by using the uvx package manager:
Configuration file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude for Desktop to load the configuration.
Example Operations
Once configured, you can ask Claude to perform operations like:
"Create a new document called 'report.docx' with a title page"
"Add a heading and three paragraphs to my document"
"Add my name in Helvetica 36pt bold at the top of the document"
"Add a section heading 'Summary' in Helvetica 14pt bold with a bottom border"
"Add a paragraph in Times New Roman 14pt with italic blue text"
"Insert a bulleted list after the paragraph containing 'Introduction'"
"Insert a numbered list with items: 'First step', 'Second step', 'Third step'"
"Add bullet points after the 'Summary' heading"
"Insert a 4x4 table with sales data"
"Format the word 'important' in paragraph 2 to be bold and red"
"Search and replace all instances of 'old term' with 'new term'"
"Create a custom style for section headings"
"Apply formatting to the table in my document"
"Extract all comments from my document"
"Show me all comments by John Doe"
"Get comments for paragraph 3"
"Make the text in table cell (1,2) bold and blue with 14pt font"
"Add 10 points of padding to all sides of the header cells"
"Create a callout table with a blue checkmark icon and white text"
"Set the first column width to 50 points and auto-fit the remaining columns"
"Apply alternating row colors to make the table more readable"
API Reference
Document Creation and Properties
Content Addition
Advanced Content Manipulation
Content Extraction
Text Formatting
Table Formatting
Comment Extraction
Troubleshooting
Common Issues
Missing Styles
Some documents may lack required styles for heading and table operations
The server will attempt to create missing styles or use direct formatting
For best results, use templates with standard Word styles
Permission Issues
Ensure the server has permission to read/write to the document paths
Use the
copy_documentfunction to create editable copies of locked documentsCheck file ownership and permissions if operations fail
Image Insertion Problems
Use absolute paths for image files
Verify image format compatibility (JPEG, PNG recommended)
Check image file size and permissions
Table Formatting Issues
Cell index errors: Ensure row and column indices are within table bounds (0-based indexing)
Color format problems: Use hex colors without '#' prefix (e.g., "FF0000" for red) or standard color names
Padding unit confusion: Specify "points" or "percent" explicitly when setting cell padding
Column width conflicts: Auto-fit may override manual column width settings
Text formatting persistence: Apply cell text formatting after setting cell content for best results
Debugging
Enable detailed logging by setting the environment variable:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Model Context Protocol for the protocol specification
python-docx for Word document manipulation
FastMCP for the Python MCP implementation
Note: This server interacts with document files on your system. Always verify that requested operations are appropriate before confirming them in Claude for Desktop or other MCP clients.