create_new_documentLABSCO SUMMARY
Run-level styling is what separates this from a Markdown exporter.
Being able to add a differently-styled run inside an existing paragraph — one phrase bold and red, the next highlighted yellow — is the difference between generating a document and generating a document someone will accept. The image path taking a numpy array as well as a file path is a small but telling detail: a chart rendered in memory can go straight into the report without a temp file.
What it is
A FastMCP server that creates and edits Microsoft Word documents through python-docx. It covers the document-assembly path: open or create, add headings and paragraphs, style individual runs inside a paragraph, insert images and tables, then save.
What you get
create_new_documentandopen_documentto start from scratch or from an existing.docxadd_headingwith a level, andadd_paragraphwith style, font size, bold, italic and alignmentadd_run_to_paragraph, which styles part of a paragraph differently — bold, coloured, or highlighted — rather than forcing one style per blockadd_picturefrom a file path with a width, or straight from a numpy array read through OpenCVadd_tablewith rows, columns and a table style, then cell-by-cell text- A fixed colour vocabulary for text and highlights: black, blue, green, dark blue, dark red, dark yellow, dark green, pink, red, white, teal, yellow, violet, gray25 and gray50
save_documentto write the result out
Requirements
Python 3.12+ with python-docx, opencv-python, numpy and FastMCP. Install with uv pip install . inside a virtual environment, then point the client at server.py using that environment's Python interpreter — the README's config uses the absolute path into .venv. The project is word-mcp-server (version 0.1.1). Documentation is in Vietnamese. Resources and prompts live in the resources and prompts folders.
Setup effort
Build from source
USE CASES
Producing a report someone will actually open
Assemble title, sections, body text, an illustration and a data table, then save it as a .docx rather than pasting Markdown into Word.
Emphasising part of a sentence
Add the paragraph, then append a styled run for the phrase that needs to stand out — bold, coloured, or highlighted.
Dropping a generated image into a document
Pass the image straight from an OpenCV-read array at the width you want, without writing it to disk first.
Adding a section to an existing document
Open the .docx that already exists, append the new heading and content, and save over it.
8 tools
Listed in project docs. Your client may show a different list.
open_documentadd_headingadd_paragraphadd_run_to_paragraphadd_pictureadd_tablesave_documentBEFORE YOU INSTALL
What to know first
Tools you get
8 tools named in the project's documentation.
Requires
- uv
- Python 3.12 or later
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
{
"mcpServers": {
"word-mcp-server": {
"command": "<YOUR_PATH_TO_WORD_MCP_SERVER>/.venv/bin/python3",
"args": [
"<YOUR_PATH_TO_WORD_MCP_SERVER>/server.py"
]
}
}
}