MCP Office Interop Word Server
by mario-andreschak
This project implements a Model Context Protocol (MCP) server that allows interaction with Microsoft Word documents using COM Interop on Windows. It provides MCP tools to perform common Word processing tasks programmatically.
Last updated: N/A
What is MCP Office Interop Word Server?
The MCP Office Interop Word Server is an MCP server that wraps common Microsoft Word operations via COM Interop on Windows, exposing functionality as MCP tools. It enables programmatic interaction with Word documents using the Model Context Protocol.
How to use MCP Office Interop Word Server?
To use the server, first install Node.js and npm, then clone the repository and install dependencies using npm install
. Build the project with npm run build
. Run the server using either stdio
(default) or sse
transport, as described in the README. Connect your MCP client (e.g., MCP Inspector) using the appropriate method and endpoint.
Key features of MCP Office Interop Word Server
Wraps Microsoft Word operations via COM Interop (
winax
).Exposes functionality as MCP tools.
Supports both
stdio
andsse
transports for MCP communication.Built with TypeScript and uses the
@modelcontextprotocol/sdk
.Provides a wide range of tools for document, text, paragraph, table, image, header/footer, and page setup operations.
Use cases of MCP Office Interop Word Server
Automating document creation and modification.
Generating reports and letters programmatically.
Integrating Word processing capabilities into web applications.
Performing batch processing of Word documents.
FAQ from MCP Office Interop Word Server
What are the prerequisites for running this server?
What are the prerequisites for running this server?
Node.js (v18 or later recommended), npm, and Microsoft Word installed on a Windows machine.
How do I install the server?
How do I install the server?
Clone the repository, navigate to the project directory, and run npm install
.
How do I run the server?
How do I run the server?
You can run the server using either stdio
(default) or sse
transport. See the README for specific commands and configuration.
What is the default port for the SSE transport?
What is the default port for the SSE transport?
Typically port 3001, or the port specified by the PORT
environment variable.
Where can I find the Word object model constants?
Where can I find the Word object model constants?
Word object model constants (like WdSaveFormat
, WdUnits
, etc.) are represented by their numeric values in the tool arguments. You may need to refer to the Word VBA documentation for specific values.