Python-based MCP server to create and edit Word documents via API using FastMCP.
Configuration
View docs{
"mcpServers": {
"word_mcp_server": {
"command": "/path/to/word-mcp-server/.venv/bin/python3",
"args": [
"/path/to/word-mcp-server/server.py"
]
}
}
}Word MCP Server is a Python-based MCP server that lets you create and edit Microsoft Word documents (.docx) through a clean API. It exposes a set of tools to generate content, format text, insert images and tables, and manage resources and prompts, all powered by FastMCP for seamless integration with your MCP client workflows.
You will run Word MCP Server locally and connect to it from your MCP client. Start the server in a stdio configuration, then send high-level commands to create, modify, or format Word documents. You can initiate a new document, open existing files, add headings and paragraphs, insert images, and build tables. The server interprets your natural prompts or scripted instructions and performs the corresponding Word operations.
Prerequisites install steps are as follows.
# Create and activate a Python virtual environment
uv venv
source venv/bin/activate
# Install the Word MCP Server package into the virtual environment
uv pip install .Configuration for running the server with an MCP client is provided in a JSON-like structure. The server is launched using a Python interpreter from your virtual environment and a path to the server script.
{
"mcpServers": {
"word-mcp-server": {
"command": "/path/to/word-mcp-server/.venv/bin/python3",
"args": ["/path/to/word-mcp-server/server.py"]
}
}
}Create a new Word document in memory and prepare it for subsequent edits.
Open an existing Word document from a given file path and load it for editing.
Add a heading to the document with a specified level to structure content.
Insert a plain paragraph of text, with optional styling such as font size, bold, italic, and alignment.
Append a run of text within an existing paragraph, enabling boldness, color, or highlighting.
Insert an image from a file path or a NumPy array directly into the document with an adjustable width.
Create a table with a given number of rows and columns, and fill cells as needed.
Save the current document to a specified file path on disk.