Word MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Word MCP Server
A fully-featured Model Context Protocol (MCP) server for creating and manipulating Microsoft Word (.docx) files directly from Claude Code or any MCP-compatible AI assistant.
Author: Renato Tadeu de Figueiredo License: MIT
Features
Category | Capabilities |
Document lifecycle | Create, open, save, save-as, close, duplicate, auto-backup |
Reading | Full content (paragraphs + tables), outline, section content, text search, headers/footers |
Text editing | Replace text, replace paragraphs, replace/delete sections, insert/delete paragraphs, move sections |
Formatting | Paragraph styles, alignment, spacing, indentation, line spacing, keep-together; character formatting (bold, italic, underline, strikethrough, font, size, color, all-caps, small-caps) |
Headers & Footers | Set text, add page numbers (Page X / Page X of Y), insert logo images, clear, even/first-page variants |
Images | Insert images in body or header, resize, align, add captions |
Tables | Create, read, edit cells, add/delete rows, delete tables, merge cells (H/V), column widths, cell background & border formatting, header row |
Lists | Bullet and numbered lists, multi-level |
Page layout | Margins, orientation (portrait/landscape), page size (A4, A3, A5, Letter, Legal, custom), section breaks, page breaks, multi-column layout |
Styles | List all styles, create/update custom paragraph styles |
Table of Contents | Insert TOC field (auto-updated by Word) |
Hyperlinks | Add clickable links to paragraphs |
Comments | Add native Word comments (visible in review pane) |
Bookmarks | Add named bookmarks |
Document properties | Title, author, subject, keywords, description, category |
Advanced XML | Direct OOXML patch for complex formatting |
Batch builder | Create a complete document in one call from a JSON spec |
Related MCP server: Word Document MCP Server
Installation
Prerequisites
Python 3.11 or higher
piporuv
1. Clone the repository
git clone https://github.com/RenatoTadeuFigueiredo/word-mcp-server.git
cd word-mcp-server2. Install dependencies
pip install -r requirements.txtOr with uv:
uv pip install -r requirements.txtConfiguration
Claude Code (CLI)
Add the server to your Claude Code MCP configuration. Run this command from the project folder:
claude mcp add word -- python /absolute/path/to/word-mcp-server/word_mcp_server.pyOr edit ~/.claude/mcp_servers.json manually:
{
"mcpServers": {
"word": {
"command": "python",
"args": ["/absolute/path/to/word-mcp-server/word_mcp_server.py"]
}
}
}Restart Claude Code after editing the configuration.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent path on Windows/Linux:
{
"mcpServers": {
"word": {
"command": "python",
"args": ["/absolute/path/to/word-mcp-server/word_mcp_server.py"]
}
}
}Usage Examples
The examples below show natural-language prompts you can give Claude once the MCP server is connected.
1. Create a complete company document in one call
Create a document at /Documents/company-report.docx with:
- Default font "Calibri", size 11
- Page margins: 2.5 cm all sides
- Title "Q1 2026 Business Report", author "Renato Figueiredo"
- Header: "Acme Corp — Confidential" (right-aligned)
- Footer: page numbers in "Page X of Y" format, centered
- Heading 1: "Executive Summary"
- A paragraph summarizing the quarter results
- Heading 1: "Financial Results"
- A table with columns: Quarter, Revenue, Expenses, Profit
and three rows of data
- Heading 1: "Next Steps"
- A bullet list with three action itemsClaude will use build_document to produce the full document in a single call.
2. Open and edit an existing document
Open /Documents/contract.docx, replace every occurrence of
"ACME Corp" with "Globex Corporation", and save.Open /Documents/proposal.docx and change the font of all
paragraphs under the "Introduction" heading to
"Times New Roman" 12pt, justified alignment.3. Add a company logo to the header
Open /Documents/report.docx, insert the image at
/images/logo.png into the header (width 4 cm, left-aligned),
and add a right-aligned footer with "Page X of Y".4. Work with tables
Open /Documents/budget.docx and add a new row to the first table
with values: "Q4 2026", "$120,000", "$95,000", "$25,000".In the open document, merge cells in table 0,
row 0, from column 0 to column 3 (full-width header row),
set its background color to "2E74B5" and text color to white.5. Reorganize sections
In the open document, move the section "Appendix A"
to appear after the "Conclusion" section.Delete the "Draft Notes" section entirely from the document.6. Insert a Table of Contents
Open /Documents/manual.docx, insert a Table of Contents
at the beginning (after the title page) with the heading
"Contents", including up to level 3 headings.After opening the file in Word, press Ctrl+A then F9 to render the page numbers.
7. Add comments for review
Open /Documents/draft.docx and add a comment from author
"Renato" to the paragraph containing "payment terms" with
the text: "Please confirm this clause with legal team."8. Page layout adjustments
Open /Documents/brochure.docx, set the page to A4 landscape,
set 2 columns with 1.5 cm spacing between them.Set page margins of the open document to:
top 3 cm, bottom 2.5 cm, left 2.5 cm, right 2 cm.9. Create a custom style and apply it
In the open document, create a paragraph style called
"Highlight Box" based on "Normal", with bold text,
font size 11, color "2E74B5", and 6 pt spacing before and after.
Then apply it to all paragraphs containing the word "IMPORTANT".10. Add hyperlinks
In the open document, find the paragraph containing
"visit our website" and add a hyperlink with text
"our website" pointing to https://example.com.Available Tools (41 total)
Document Lifecycle
Tool | Description |
| Open an existing |
| Create a new blank document (optional template) |
| Save (creates |
| Save to a new path |
| Close without saving |
| Copy to a new path |
Reading & Inspection
Tool | Description |
| Metadata, word/char count, section count |
| Full structured JSON (paragraphs + tables) |
| Heading hierarchy |
| Content under a specific heading |
| Search paragraphs and table cells |
| Read one or all tables |
| List available styles |
| Raw OOXML of paragraph or body |
| Read all headers/footers |
Text Editing
Tool | Description |
| Find & replace (preserves formatting, searches tables too) |
| Replace a full paragraph's text |
| Replace all content under a heading |
| Insert at position (after_text, after_heading, index, end) |
| Delete by index or text match |
| Delete heading + all its content |
| Move a section before/after another |
| Add a heading at any level |
Formatting
Tool | Description |
| Style, alignment, spacing, indentation, line spacing |
| Bold, italic, underline, font, color, caps, strikethrough |
| Create/update a custom paragraph style |
Headers & Footers
Tool | Description |
| Set header text with formatting |
| Set footer text + optional page numbers |
| Insert logo/image into header |
| Remove header content |
| Remove footer content |
| Read header/footer content |
Images
Tool | Description |
| Insert image in body with optional caption |
Tables
Tool | Description |
| Create table with data and styling |
| Read table content |
| Edit cell text and formatting |
| Append a row |
| Delete a row |
| Delete entire table |
| Merge cells horizontally or vertically |
| Set cell background and borders |
Page Layout
Tool | Description |
| Set margins in cm |
| Portrait or landscape |
| A4, A3, A5, Letter, Legal, or custom |
| Insert hard page break |
| New page, continuous, even/odd page |
| Multi-column layout |
Advanced
Tool | Description |
| Insert Table of Contents field |
| Add clickable link to a paragraph |
| Add native Word comment |
| Add named bookmark |
| Title, author, subject, keywords, etc. |
| Direct OOXML replacement |
| Create full document from JSON spec |
Auto-backup
Every save_document call creates a .bak file next to the original by default. To disable:
Save the document without creating a backup.Notes
Table of Contents
TOC fields are inserted as Word field codes. Open the file in Microsoft Word or LibreOffice Writer and press Ctrl+A → F9 to render the actual page numbers.
Comments
Native Word comments are injected into the word/comments.xml part. They appear in the Word review pane. If the comments part is inaccessible, a plain inline text fallback is used.
Page Numbers
PAGE and NUMPAGES fields render correctly in Word and LibreOffice Writer.
Dependencies
Package | Version | Purpose |
| ≥ 1.1.2 | Core |
| ≥ 5.2.0 | XML processing |
| ≥ 1.0.0 | MCP server protocol |
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
MIT — Copyright (c) 2026 Renato Tadeu de Figueiredo
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Create Word .docx files from sections or markdown, fill templates, and read text from a .docx.
An agent-first office suite Claude & ChatGPT read and write over one MCP URL.
Use your own Word templates to convert Markdown → DOCX/PDF/HTML from any MCP-compatible AI.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceEnables AI assistants to create, read, and manipulate Microsoft Word documents with comprehensive formatting, table creation, content management, and document protection capabilities. Supports advanced operations like merging documents, PDF conversion, and rich text formatting through a standardized interface.32MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to create and manipulate Microsoft Word documents programmatically with support for rich text formatting, tables, lists, headings, and find-and-replace operations.1013 npmMIT
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to create, edit, and extract data from Microsoft Word documents programmatically, supporting document creation, content editing, table manipulation, parameter extraction, and template generation.1MIT
- AlicenseBqualityBmaintenanceEnables reading, creating, and editing Microsoft Word .docx documents through natural language, including text and table manipulation, cell merging, shading, borders, and table layout controls, plus font, paragraph, and list formatting. Supports extracting paragraph text and tables, appending headings and paragraphs, find-and-replace, and row, column, and table restructuring.40MIT