MCP Hub
Back to servers

che-word-mcp

Swift-native MCP server for Word (.docx) manipulation with 105 tools

Registry
Updated
Feb 19, 2026

che-word-mcp

A Swift-native MCP (Model Context Protocol) server for Microsoft Word document (.docx) manipulation. This is the first Swift OOXML library that directly manipulates Office Open XML without any third-party Word dependencies.

中文說明

Features

  • Pure Swift Implementation: No Node.js, Python, or external runtime required
  • Direct OOXML Manipulation: Works directly with XML, no Microsoft Word installation needed
  • Single Binary: Just one executable file
  • 105 MCP Tools: Comprehensive document manipulation capabilities
  • Complete OOXML Support: Full support for tables, styles, images, headers/footers, comments, footnotes, and more
  • Cross-platform: Works on macOS (and potentially other platforms supporting Swift)

Version History

VersionDateChanges
v1.8.02026-02-03Remove hard diff limit, add max_results & heading_styles params to compare_documents
v1.7.02026-02-03Add compare_documents tool for server-side document diff (105 total)
v1.2.12026-01-16Fix MCP SDK compatibility (actor→class, add capabilities)
v1.2.02026-01-16Add 12 new tools (95 total): search, hyperlinks, bookmarks, footnotes, endnotes, revisions, properties
v1.1.02026-01-16Fix MCPB manifest.json format for Claude Desktop
v1.0.02026-01-16Initial release with 83 tools, refactored to use ooxml-swift

Installation

Option 1: Download from Release (Recommended)

Download the latest release from GitHub Releases:

  • CheWordMCP - Universal Binary (arm64 + x86_64)
  • che-word-mcp.mcpb - MCPB package
# Download and install
curl -L https://github.com/kiki830621/che-word-mcp/releases/latest/download/CheWordMCP -o ~/bin/CheWordMCP
chmod +x ~/bin/CheWordMCP

Option 2: Build from Source

Prerequisites

  • macOS 13.0+ (Ventura or later)
  • Swift 5.9+
git clone https://github.com/kiki830621/che-word-mcp.git
cd che-word-mcp
swift build -c release

The binary will be located at .build/release/CheWordMCP

Add to Claude Code

claude mcp add che-word-mcp /path/to/che-word-mcp/.build/release/CheWordMCP

Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "che-word-mcp": {
      "command": "/path/to/che-word-mcp/.build/release/CheWordMCP"
    }
  }
}

Usage with AI Agents

Just ask the agent

The simplest approach - just tell your agent to use it:

Use che-word-mcp to create a new Word document with title "Report" and save it to ~/Documents/report.docx

The agent will automatically use the MCP tools if che-word-mcp is configured.

AGENTS.md / CLAUDE.md

For more consistent results, add to your project or global instructions file:

## Word Document Manipulation

Use `che-word-mcp` for reading and writing Microsoft Word (.docx) files.

Core workflow:
1. `open_document` - Open an existing .docx file
2. `get_text` / `get_paragraphs` - Read document content
3. `insert_paragraph` / `format_text` - Modify content
4. `save_document` - Save changes

Creating new documents:
1. `create_document` - Create new document
2. Add content with `insert_paragraph`, `insert_table`, etc.
3. `save_document` - Save to .docx file

Export options:
- `export_text` - Export as plain text
- `export_markdown` - Export as Markdown

Claude Code Skill

For Claude Code, a skill provides richer context:

# Download the skill
mkdir -p .claude/skills/che-word-mcp
curl -o .claude/skills/che-word-mcp/SKILL.md \
  https://raw.githubusercontent.com/kiki830621/che-word-mcp/main/skills/che-word-mcp/SKILL.md

Or copy from the repository:

cp -r /path/to/che-word-mcp/skills/che-word-mcp .claude/skills/

Available Tools (83 Total)

Document Management (6 tools)

ToolDescription
create_documentCreate a new Word document
open_documentOpen an existing .docx file
save_documentSave document to .docx file
close_documentClose an open document
list_open_documentsList all open documents
get_document_infoGet document statistics

Content Operations (6 tools)

ToolDescription
get_textGet plain text content
get_paragraphsGet all paragraphs with formatting
insert_paragraphInsert a new paragraph
update_paragraphUpdate paragraph content
delete_paragraphDelete a paragraph
replace_textSearch and replace text

Formatting (3 tools)

ToolDescription
format_textApply text formatting (bold, italic, color, font)
set_paragraph_formatSet paragraph formatting (alignment, spacing)
apply_styleApply built-in or custom styles

Tables (6 tools)

ToolDescription
insert_tableInsert a table with optional data
get_tablesGet all tables information
update_cellUpdate cell content
delete_tableDelete a table
merge_cellsMerge cells horizontally or vertically
set_table_styleSet table borders and shading

Style Management (4 tools)

ToolDescription
list_stylesList all available styles
create_styleCreate custom style
update_styleUpdate style definition
delete_styleDelete custom style

Lists (3 tools)

ToolDescription
insert_bullet_listInsert bullet list
insert_numbered_listInsert numbered list
set_list_levelSet list indentation level

Page Setup (5 tools)

ToolDescription
set_page_sizeSet page size (A4, Letter, etc.)
set_page_marginsSet page margins
set_page_orientationSet portrait or landscape
insert_page_breakInsert page break
insert_section_breakInsert section break

Headers & Footers (5 tools)

ToolDescription
add_headerAdd header content
update_headerUpdate header content
add_footerAdd footer content
update_footerUpdate footer content
insert_page_numberInsert page number field

Images (6 tools)

ToolDescription
insert_imageInsert inline image (PNG, JPEG)
insert_floating_imageInsert floating image with text wrap
update_imageUpdate image properties
delete_imageDelete image
list_imagesList all images
set_image_styleSet image border and effects

Export (2 tools)

ToolDescription
export_textExport as plain text
export_markdownExport as Markdown

Hyperlinks & Bookmarks (6 tools)

ToolDescription
insert_hyperlinkInsert external hyperlink
insert_internal_linkInsert link to bookmark
update_hyperlinkUpdate hyperlink
delete_hyperlinkDelete hyperlink
insert_bookmarkInsert bookmark
delete_bookmarkDelete bookmark

Comments & Revisions (10 tools)

ToolDescription
insert_commentInsert comment
update_commentUpdate comment text
delete_commentDelete comment
list_commentsList all comments
reply_to_commentReply to existing comment
resolve_commentMark comment as resolved
enable_track_changesEnable track changes
disable_track_changesDisable track changes
accept_revisionAccept revision
reject_revisionReject revision

Footnotes & Endnotes (4 tools)

ToolDescription
insert_footnoteInsert footnote
delete_footnoteDelete footnote
insert_endnoteInsert endnote
delete_endnoteDelete endnote

Field Codes (7 tools)

ToolDescription
insert_if_fieldInsert IF conditional field
insert_calculation_fieldInsert calculation (SUM, AVERAGE, etc.)
insert_date_fieldInsert date/time field
insert_page_fieldInsert page number field
insert_merge_fieldInsert mail merge field
insert_sequence_fieldInsert auto-numbering sequence
insert_content_controlInsert SDT content control

Repeating Sections (1 tool)

ToolDescription
insert_repeating_sectionInsert repeating section (Word 2012+)

Advanced Features (9 tools)

ToolDescription
insert_tocInsert table of contents
insert_text_fieldInsert form text field
insert_checkboxInsert form checkbox
insert_dropdownInsert form dropdown
insert_equationInsert math equation
set_paragraph_borderSet paragraph border
set_paragraph_shadingSet paragraph background color
set_character_spacingSet character spacing
set_text_effectSet text animation effect

Usage Examples

Create a Document with Headings and Text

Create a new Word document called "report" with:
- Title: "Quarterly Report"
- Heading: "Introduction"
- A paragraph explaining the report purpose
Save it to ~/Documents/report.docx

Create a Document with Table and Images

Create a document with:
- A title "Product Catalog"
- Insert an image from ~/images/logo.png
- A 4x3 table with product information
- Apply borders to the table
Save it to ~/Documents/catalog.docx

Create a Professional Report

Create a document with:
- Custom page margins (1 inch all around)
- A header with company name
- A footer with page numbers
- Table of contents
- Multiple sections with headings
- Footnotes for references
Save it as ~/Documents/annual_report.docx

Technical Details

OOXML Structure

The server generates valid Office Open XML documents with complete structure:

document.docx (ZIP)
├── [Content_Types].xml
├── _rels/
│   └── .rels
├── word/
│   ├── document.xml      # Main content
│   ├── styles.xml        # Style definitions
│   ├── settings.xml      # Document settings
│   ├── fontTable.xml     # Font definitions
│   ├── numbering.xml     # List definitions
│   ├── comments.xml      # Comments
│   ├── footnotes.xml     # Footnotes
│   ├── endnotes.xml      # Endnotes
│   ├── header1.xml       # Header content
│   ├── footer1.xml       # Footer content
│   ├── media/            # Embedded images
│   │   └── image*.{png,jpeg}
│   └── _rels/
│       └── document.xml.rels
└── docProps/
    ├── core.xml          # Metadata
    └── app.xml           # Application info

Dependencies

Comparison with Other Solutions

FeatureAnthropic Word MCPpython-docxdocx npmche-word-mcp
LanguageNode.jsPythonNode.jsSwift
BackendAppleScriptOOXMLOOXMLOOXML
Requires WordYesNoNoNo
RuntimeNode.jsPythonNode.jsNone
Single BinaryNoNoNoYes
Tools Count~10N/AN/A83
ImagesLimitedYesYesYes
CommentsNoLimitedLimitedYes
Track ChangesNoNoNoYes
TOCNoLimitedNoYes
Form FieldsNoNoNoYes

Performance

Benchmarks on Apple Silicon (M4 Max, 128GB RAM):

Read Performance

File SizeTime
40 KB (thesis outline)72 ms
431 KB (complex document)31 ms

Write Performance

OperationContentTime
Basic writeCreate + 3 paragraphs + Save19 ms
Complex documentTitle + Paragraphs + Table + List21 ms
Bulk write50 paragraphs + Save28 ms

Why So Fast?

  • Native Swift binary - No interpreter startup overhead
  • Direct OOXML manipulation - No Microsoft Word process
  • Efficient ZIP handling - ZIPFoundation for compression
  • In-memory operations - Only writes to disk on save

Compared to python-docx (~200ms startup) or docx npm (~150ms startup), che-word-mcp is 10-20x faster.

License

MIT License

Author

Che Cheng (@kiki830621)

Related Projects

Reviews

No reviews yet

Sign in to write a review