Word MCP Server
MCP server for real-time Microsoft Word document manipulation via COM automation. Word runs in a visible window — every change appears instantly.
README
Word MCP Server
MCP server for real-time Microsoft Word document manipulation via COM automation. Word runs in a visible window — every change appears instantly.
Requires a valid Microsoft Word license. Does not include, crack, or distribute Office software.
Features
- 110+ MCP tools — document lifecycle, content, formatting, tables, charts, media, structure, clipboard, Manager API, semantic navigation, variable replacement
- Real-time visible — Word opens in foreground, all changes immediately visible
- Ctrl+Z friendly — everything uses COM API, undo stack works normally
- Disconnect-safe — MCP disconnect keeps Word open, no lost edits
- Auto backup —
.bakcreated before every save - Chart data isolation — child process + 15s timeout prevents Excel COM freeze
Quick Start
git clone https://github.com/HelloWorld-Open/word-mcp-server.git
cd word-mcp-server
npm install && npm run build
Add to your MCP client config:
{
"mcpServers": {
"word": {
"command": "node",
"args": ["C:\\path\\to\\word-mcp-server\\build\\parent.js"]
}
}
}
npm installrequires MSVC Build Tools to compile the winax native addon. If it fails, install Visual Studio 2022 Build Tools with the "Desktop development with C++" workload.
Usage
Write formatted content with Markdown
# Section Title
Some **bold** and *italic* text with `inline code`, ~~strikethrough~~, and [a link](https://example.com).
- Top level item
- Nested item with **bold**
- Another top item
1. First step
2. Second step
code block with pre-formatted text
| Name | Value |
|------|-------|
| Alpha | 100 |
| Beta | 200 |
> Notable quote here
---
Batch mode for speed
word_batch_start // 3-10x faster
// ... multiple operations ...
word_batch_end // refresh window
High-level Manager API
word_mgr_create_document // auto close + page setup
word_mgr_write_content // auto cursor + ScreenUpdating
word_mgr_insert_table // auto paragraph separator
word_mgr_add_bookmark // auto deep cursor reset
word_mgr_save // save + optional PDF
Tool Reference
See TOOLS.md — 110+ tools across 12 modules.
Architecture
Communication Flow
MCP Client (Claude Desktop, etc.)
│ JSON-RPC over stdio
▼
build/parent.js (Watchdog — 30s timeout, auto-restart)
│ spawn + pipe stdin/stdout
▼
build/child.js (McpServer)
│ winax COM Automation (native)
├─ Main thread: 110+ tools
└─ Child process: chart data setting (fork + 15s timeout)
│
▼
WINWORD.EXE (visible window)
Code Layout
src/
├── index.ts # Entry point
├── parent.ts # Watchdog process
├── child.ts # MCP server
├── manager/ # High-level API (document builder pattern)
├── word/ # COM adapter layer via winax
├── security/ # 4-layer defense (path, macro, validation, redaction)
└── server/ # MCP protocol layer (110+ tools, prompts)
Security
- Path traversal detection (7 attack vectors:
.., ADS, network paths, cross-drive, system dirs, device paths, whitelist) - Macros forcibly disabled via
AutomationSecurity = 3 - Input validation via Zod (all tool parameters at runtime)
- Rate limiting (sliding window, configurable)
- Error message sanitization (no internal paths/COM details leaked)
Tests
116 tests, all passing ✅ — 9 unit + 1 integration.
Unit tests mock the winax layer (no real Word needed). Coverage: markdown parser (33), position map (21), text editor (16), session (13), security (30).
npm test
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。