Enterprise-Grade Document Automation Protocol for Amazon Q & Kiro
Office-Word-MCP is a robust Model Context Protocol (MCP) server designed to enable advanced document processing capabilities for AI assistants like Amazon Q Developer, Kiro, and other MCP-compliant clients.
It provides a standardized interface for AI agents to programmatic create, read, manipulate, and analyze Microsoft Word documents (.docx). By abstracting complex document object models into clean API tools, it empowers AI assistants to generate professional reports, contracts, and documentation workflows autonomously.
- Seamless Integration: Optimized for Amazon Q and Kiro environments.
- Rich Formatting: Support for complex tables, styling, and layout controls.
- Enterprise Ready: Includes document protection, comment analysis, and structured data handling.
- Secure: Runs locally with explicit permission controls.
- Lifecycle Control: Create, copy, merge, and convert documents (to PDF).
- Structure Analysis: Extract outlines, metadata, and statistics.
- Security: Apply password protection and manage restricted editing.
- Advanced Tables: Create complex layouts with merges, shading, and custom borders.
- Rich Text: precision control over fonts, colors, and paragraph styles.
- Media: Insert images with proportional scaling.
- Dynamic Lists: XML-compliant bulleted and numbered lists.
- Comment Mining: Extract and filter comments by author or content.
- Track Changes: (Future roadmap) Support for revision tracking.
- Python 3.10 or higher
uv(recommended) orpippackage manager
No installation required. You can run the server directly using uvx.
uvx --from office-word-mcp-server word_mcp_serverClone the repository and install dependencies:
git clone https://github.com/GongRzhe/Office-Word-MCP-Server.git
cd Office-Word-MCP-Server
pip install -r requirements.txtTo integrate Office-Word-MCP with Amazon Q Developer:
- Open your IDE settings and navigate to Amazon Q > MCP Servers.
- Add a new server configuration:
- Name:
word-automation - Command:
uvx - Args:
--from,office-word-mcp-server,word_mcp_server
- Name:
- Restart your IDE. Amazon Q will now have access to Word tools.
Configure the server in your Kiro settings or configuration file:
{
"mcpServers": {
"office-word": {
"command": "uvx",
"args": ["--from", "office-word-mcp-server", "word_mcp_server"]
}
}
}Add the following to your MCP configuration file (e.g., claude_desktop_config.json):
{
"mcpServers": {
"word-server": {
"command": "uvx",
"args": ["--from", "office-word-mcp-server", "word_mcp_server"]
}
}
}The server exposes the following tools to the AI assistant.
| Tool Name | Description |
|---|---|
create_document |
Create a new blank or template-based document. |
get_document_text |
Extract all text content from a file. |
list_available_documents |
Scan directory for valid Word files. |
convert_to_pdf |
Export .docx to PDF format. |
| Tool Name | Description |
|---|---|
add_heading |
Insert structured headings (Levels 1-9). |
add_paragraph |
Add text blocks with style support. |
add_table |
Create a new table structure. |
format_text |
Apply bold, italic, color, etc., to text ranges. |
| Tool Name | Description |
|---|---|
format_table |
Apply styles, borders, and shading to tables. |
merge_table_cells |
Merge cells horizontally or vertically. |
set_table_column_width |
Precise control over column dimensions. |
(See full tool list in word_mcp_server.py source)
Permission Denied
- Cause: The server cannot access the file system.
- Fix: Ensure the running process has R/W access to the target directory. On Windows, ensure the file isn't open in Microsoft Word.
Styling Not Applied
- Cause: Using a style name that doesn't exist in the base template.
- Fix: Use
create_custom_styleto define the style before using it, or use standard Word styles (e.g., "Normal", "Heading 1").
Image Insertion Failures
- Cause: Relative paths may be ambiguous.
- Fix: Always use absolute paths for images.
Set the MCP_DEBUG environment variable to 1 to enable verbose logging:
# Windows (PowerShell)
$env:MCP_DEBUG = "1"This project is licensed under the MIT License. See LICENSE for details.
Built for the Agentic Era.
