Home / MCP / Word MCP Server

Word MCP Server

Python-based MCP server to create and edit Word documents via API using FastMCP.

python
Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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 .

Additional configuration and usage notes

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"]
    }
  }
}

Available tools

create_new_document

Create a new Word document in memory and prepare it for subsequent edits.

open_document

Open an existing Word document from a given file path and load it for editing.

add_heading

Add a heading to the document with a specified level to structure content.

add_paragraph

Insert a plain paragraph of text, with optional styling such as font size, bold, italic, and alignment.

add_run_to_paragraph

Append a run of text within an existing paragraph, enabling boldness, color, or highlighting.

add_picture

Insert an image from a file path or a NumPy array directly into the document with an adjustable width.

add_table

Create a table with a given number of rows and columns, and fill cells as needed.

save_document

Save the current document to a specified file path on disk.