Registry / communication / office-word-mcp-server

office-word-mcp-server

JSON →
library1.1.11pypypiunverified

The Office Word Model Context Protocol (MCP) Server is a Python library designed to enable AI assistants to create, read, and manipulate Microsoft Word documents through a standardized interface. It exposes a rich set of document operations as tools and resources, facilitating seamless integration of Word document manipulation into AI-powered workflows. The current version is 1.1.11, requiring Python 3.11 or newer, and appears to be actively maintained with recent updates.

pip install office-word-mcp-server
INSTALL
IMPORT
SIG · OFFICE-WORD-MCP-SE
O
office-word-mcp-server
communicationpythonv1.1.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

To use the `office-word-mcp-server`, you typically run it as a standalone server process. AI agents or integrated development environments (IDEs) then connect to this server using the Model Context Protocol (MCP) to perform operations on Word documents. The quickstart demonstrates how to initiate the server process, after which an AI agent can issue commands like creating new documents, adding content, or applying formatting via API calls.

# 1. Install the server (if not already installed) # pip install office-word-mcp-server # 2. Run the MCP server. This makes its capabilities available via a local API. # The `uvx` command is often used for running CLI entry points from installed packages. # Ensure `uv` is installed (pip install uv) if `uvx` is not available. import subprocess import os # This command typically runs in a separate terminal or as a background service. # For a quick demo, we can run it via subprocess (though not ideal for production). # In a real scenario, you'd configure your AI agent/IDE to start and connect to it. print("Starting Office Word MCP Server...") # Use a placeholder for a real AI agent configuration or an actual API call # The server logs its activity, and AI agents communicate via its exposed API. # Example command from GitHub README [2] # For demonstration, we'll just print the command. Actual execution would block or run in background. server_command = "uvx --from office-word-mcp-server word_mcp_server" print(f"Execute this in your terminal: {server_command}") # To simulate interaction, an AI agent would make API calls like: # create_document(filename="report.docx", title="Quarterly Report") # add_heading(filename="report.docx", text="Introduction", level=1) # add_paragraph(filename="report.docx", text="This is the first paragraph of the report.") print("\nServer started. An AI agent can now interact with it, e.g., to create or edit Word documents.") print("Refer to your AI agent's documentation for connecting to a local MCP server.")
office-word-mcp-server --version
Debug
Known issues
gotchaThe `office-word-mcp-server` operates as a standalone service designed for AI agent integration, not as a library for direct Python function calls within a script. Your AI client or IDE must be configured to connect to the running MCP server.
fix
Ensure your AI assistant or client environment (e.g., Claude Desktop, Cursor, Microsoft Agent 365) is correctly configured to discover and communicate with local MCP servers. Interaction occurs via API calls, not direct Python imports.
affects: All versions
gotchaDocuments lacking standard Word styles may lead to the server applying direct formatting instead of style-based formatting, which can result in inconsistent document appearance or difficulty in future edits.
fix
For optimal results and maintainability, always use document templates with clearly defined, standard Microsoft Word styles. This ensures the server can apply formatting consistently and reliably.
affects: All versions
gotchaFile system permission issues can prevent the server from reading or writing Word documents to specified paths, leading to errors or failed operations.
fix
Verify that the user account running the `office-word-mcp-server` has appropriate read and write permissions for the directories and files it needs to access. For image insertions, ensure absolute paths are used.
affects: All versions
Errors
Common errors & fixes
Failed to connect to MCP server: Connection timed out
The client (AI agent/IDE) could not establish a connection with the MCP server within the allowed time. This can be due to the server not running, network issues, or server overload.
fix
Ensure the `office-word-mcp-server` process is running correctly. Check for firewall blocks, verify network connectivity, and ensure the server isn't overloaded. If running locally, confirm no other process is blocking the port.
401 Unauthorized: Invalid API key
The client attempted to connect to the MCP server without proper authentication credentials, or with an incorrect/expired API key.
fix
Verify that your AI client or IDE is configured with the correct API key. Ensure the API key is not expired and is provided with the correct prefix (e.g., 'Bearer ' or 'Key ') and no leading/trailing whitespace.
Error: Document lacks required styles for heading operations.
The target Word document does not contain the expected styles for operations like adding headings, forcing the server to use direct formatting as a fallback.
fix
Modify the Word document to include standard heading styles (e.g., 'Heading 1', 'Heading 2'). For new documents, start with a template that defines these styles.
Upgrade
Version history
1.1.11latest on PyPI · released Dec 31, 2025
Audit
Dependencies
python-docxrequiredCore library for Word document manipulation.
fastmcprequiredLikely provides the Model Context Protocol server framework.
msoffcrypto-toolrequiredPossibly for handling encrypted Word documents.
docx2pdfrequiredFor converting Word documents to PDF format.
PythonrequiredRequired Python runtime environment.
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
office-word-mcp-server — pip install office-word-mcp-server · libregistry