Provides tools for exporting Microsoft Word (.docx) documents to Markdown format, enabling high-quality content conversion and documentation workflows.
Directly manipulates Office Open XML (OOXML) structures to enable comprehensive document operations including text editing, table management, and style application without external dependencies.
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
146 MCP Tools: Comprehensive document manipulation capabilities
Dual-Mode Access: Direct Mode (read-only, one step) and Session Mode (full lifecycle)
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
Version | Date | Changes |
v1.17.0 | 2026-03-11 | Session state management: dirty tracking, autosave, |
v1.16.0 | 2026-03-10 | Dual-Mode: 15 read-only tools now support |
v1.15.2 | 2026-03-07 | Improve |
v1.15.1 | 2026-03-01 | Fix heading heuristic style fallback (resolve fontSize from style inheritance chain) |
v1.15.0 | 2026-03-01 | Practical Mode: EMF→PNG auto-conversion + heading heuristic for style-less documents |
v1.14.0 | 2026-03-01 | Embed |
v1.13.0 | 2026-03-01 | Upgrade ooxml-swift to v0.5.0: parallel multi-core parsing (~0.64s for large docs) |
v1.12.1 | 2026-03-01 | Upgrade ooxml-swift to v0.4.0: large document performance fix (>30s → ~2.3s) |
v1.12.0 | 2026-02-28 |
|
v1.11.1 | 2026-02-28 | Fix |
v1.11.0 | 2026-02-28 |
|
v1.9.0 | 2026-02-28 |
|
v1.8.0 | 2026-02-03 | Remove hard diff limit, add |
v1.7.0 | 2026-02-03 | Add |
v1.2.1 | 2026-01-16 | Fix MCP SDK compatibility (actor→class, add capabilities) |
v1.2.0 | 2026-01-16 | Add 12 new tools (95 total): search, hyperlinks, bookmarks, footnotes, endnotes, revisions, properties |
v1.1.0 | 2026-01-16 | Fix MCPB manifest.json format for Claude Desktop |
v1.0.0 | 2026-01-16 | Initial 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/PsychQuant/che-word-mcp/releases/latest/download/CheWordMCP -o ~/bin/CheWordMCP
chmod +x ~/bin/CheWordMCPOption 2: Build from Source
Prerequisites
macOS 13.0+ (Ventura or later)
Swift 5.9+
git clone https://github.com/PsychQuant/che-word-mcp.git
cd che-word-mcp
swift build -c releaseThe 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/CheWordMCPAdd 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"
}
}
}Two Modes of Operation
Direct Mode (source_path) — Read-only, no state
Pass a file path directly. No need to call open_document first. Best for quick inspection.
# Just pass source_path — one step
list_images: { "source_path": "/path/to/file.docx" }
search_text: { "source_path": "/path/to/file.docx", "query": "keyword" }
get_document_info: { "source_path": "/path/to/file.docx" }18 tools support Direct Mode:
Category | Tools |
Read content |
|
List elements |
|
Properties |
|
Export |
|
Session Mode (doc_id) — Full read/write lifecycle
Call open_document first, then use doc_id for all subsequent operations. Required for editing.
open_document: { "path": "/path/to/file.docx", "doc_id": "mydoc" }
insert_paragraph: { "doc_id": "mydoc", "text": "Hello World" }
save_document: { "doc_id": "mydoc", "path": "/path/to/output.docx" }
close_document: { "doc_id": "mydoc" }Dual-mode tools accept both
source_pathanddoc_id. If you already have a document open, usedoc_idto avoid re-reading from disk.
Usage with AI Agents
Just ask the agent
Use che-word-mcp to read all images from ~/Documents/report.docxThe agent will automatically use Direct Mode (no need to open/close).
AGENTS.md / CLAUDE.md
## Word Document Manipulation
Use `che-word-mcp` for reading and writing Microsoft Word (.docx) files.
**Read-only** (Direct Mode — one step):
- `get_document_text` / `get_paragraphs` — read content
- `list_images` / `search_text` — inspect elements
- `export_markdown` — convert to Markdown
**Edit** (Session Mode — open→edit→save):
1. `open_document` → get doc_id
2. `insert_paragraph` / `replace_text` / `format_text` — modify
3. `save_document` → write to disk
4. `close_document` → release memoryClaude Code Skill
mkdir -p .claude/skills/che-word-mcp
curl -o .claude/skills/che-word-mcp/SKILL.md \
https://raw.githubusercontent.com/PsychQuant/che-word-mcp/main/skills/che-word-mcp/SKILL.mdAvailable Tools (83 Total)
Document Management (6 tools)
Tool | Description |
| Create a new Word document |
| Open an existing .docx file |
| Save document to .docx file |
| Close an open document |
| List all open documents |
| Get document statistics |
Content Operations (6 tools)
Tool | Description |
| Get plain text content |
| Get all paragraphs with formatting |
| Insert a new paragraph |
| Update paragraph content |
| Delete a paragraph |
| Search and replace text |
Formatting (3 tools)
Tool | Description |
| Apply text formatting (bold, italic, color, font) |
| Set paragraph formatting (alignment, spacing) |
| Apply built-in or custom styles |
Tables (6 tools)
Tool | Description |
| Insert a table with optional data |
| Get all tables information |
| Update cell content |
| Delete a table |
| Merge cells horizontally or vertically |
| Set table borders and shading |
Style Management (4 tools)
Tool | Description |
| List all available styles |
| Create custom style |
| Update style definition |
| Delete custom style |
Lists (3 tools)
Tool | Description |
| Insert bullet list |
| Insert numbered list |
| Set list indentation level |
Page Setup (5 tools)
Tool | Description |
| Set page size (A4, Letter, etc.) |
| Set page margins |
| Set portrait or landscape |
| Insert page break |
| Insert section break |
Headers & Footers (5 tools)
Tool | Description |
| Add header content |
| Update header content |
| Add footer content |
| Update footer content |
| Insert page number field |
Images (6 tools)
Tool | Description |
| Insert inline image (PNG, JPEG) |
| Insert floating image with text wrap |
| Update image properties |
| Delete image |
| List all images |
| Set image border and effects |
Export (2 tools)
Tool | Description |
| Export as plain text |
| Export as Markdown |
Hyperlinks & Bookmarks (6 tools)
Tool | Description |
| Insert external hyperlink |
| Insert link to bookmark |
| Update hyperlink |
| Delete hyperlink |
| Insert bookmark |
| Delete bookmark |
Comments & Revisions (10 tools)
Tool | Description |
| Insert comment |
| Update comment text |
| Delete comment |
| List all comments |
| Reply to existing comment |
| Mark comment as resolved |
| Enable track changes |
| Disable track changes |
| Accept revision |
| Reject revision |
Footnotes & Endnotes (4 tools)
Tool | Description |
| Insert footnote |
| Delete footnote |
| Insert endnote |
| Delete endnote |
Field Codes (7 tools)
Tool | Description |
| Insert IF conditional field |
| Insert calculation (SUM, AVERAGE, etc.) |
| Insert date/time field |
| Insert page number field |
| Insert mail merge field |
| Insert auto-numbering sequence |
| Insert SDT content control |
Repeating Sections (1 tool)
Tool | Description |
| Insert repeating section (Word 2012+) |
Advanced Features (9 tools)
Tool | Description |
| Insert table of contents |
| Insert form text field |
| Insert form checkbox |
| Insert form dropdown |
| Insert math equation |
| Set paragraph border |
| Set paragraph background color |
| Set character spacing |
| Set 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.docxCreate 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.docxCreate 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.docxTechnical 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 infoDependencies
MCP Swift SDK (v0.10.2+) - Model Context Protocol implementation
ooxml-swift (v0.2.0+) - OOXML parsing
word-to-md-swift (v0.1.0+) - Word to Markdown conversion
Comparison with Other Solutions
Feature | Anthropic Word MCP | python-docx | docx npm | che-word-mcp |
Language | Node.js | Python | Node.js | Swift |
Backend | AppleScript | OOXML | OOXML | OOXML |
Requires Word | Yes | No | No | No |
Runtime | Node.js | Python | Node.js | None |
Single Binary | No | No | No | Yes |
Tools Count | ~10 | N/A | N/A | 146 |
Images | Limited | Yes | Yes | Yes |
Comments | No | Limited | Limited | Yes |
Track Changes | No | No | No | Yes |
TOC | No | Limited | No | Yes |
Form Fields | No | No | No | Yes |
Performance
Benchmarks on Apple Silicon (M4 Max, 128GB RAM):
Read Performance
File Size | Time |
40 KB (thesis outline) | 72 ms |
431 KB (complex document) | 31 ms |
Write Performance
Operation | Content | Time |
Basic write | Create + 3 paragraphs + Save | 19 ms |
Complex document | Title + Paragraphs + Table + List | 21 ms |
Bulk write | 50 paragraphs + Save | 28 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
che-apple-mail-mcp - Apple Mail MCP server
che-ical-mcp - macOS Calendar MCP server
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.