word-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@word-mcp-servercreate a new document and insert a table with 2 columns and 3 rows"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Word MCP Server
通过 COM 自动化让 Claude Agent 操控 Microsoft Word,实时可见。
简介
Word MCP Server 是一个基于 Python 的 MCP 服务器,通过 pywin32 COM 自动化连接 Microsoft Word。Agent 可以像人类一样操作 Word——打开文档、编辑文字、格式化表格、插入图片、设置页眉页脚——且 Word 窗口可见,用户实时看到每一步操作。
Related MCP server: Word Document MCP Server
系统要求
Windows 10 或更高
Microsoft Word 2016 或更高(桌面版)
Python 3.10+
安装
提供多种方式,任选其一。
方式一:pip 直接安装(推荐)
无需克隆仓库,一行命令安装:
pip install git+https://github.com/wpz666hhh/word-mcp-server.git安装后配置 Claude Code(见下方配置说明)即可使用。
方式二:uv 安装(更快)
如果你使用 uv:
uv pip install git+https://github.com/wpz666hhh/word-mcp-server.git方式三:克隆后安装
git clone https://github.com/wpz666hhh/word-mcp-server.git
cd word-mcp-server
pip install -e .开发模式,方便修改代码。
方式四:一键安装脚本
在 PowerShell 中运行以下命令自动完成安装 + 配置:
iex "& { $(curl -fsL https://raw.githubusercontent.com/wpz666hhh/word-mcp-server/main/scripts/install.ps1) }"安装脚本会自动:
检测 Python 环境
用 pip 从 GitHub 安装
写入 Claude Code 的
settings.local.json完成后提示重启 Claude Code
Claude Code 配置
安装后在 settings.local.json(位于 C:\Users\<你的用户名>\.claude\ 或项目目录下的 .claude\)中添加:
{
"mcpServers": {
"word": {
"command": "python",
"args": ["-m", "word_mcp"],
"type": "local"
}
}
}重启 Claude Code 即可生效。
提示: 本仓库自带
.mcp.json配置文件,克隆仓库后 Claude Code 会自动发现此 MCP 服务。详见 Claude Code MCP 文档。
可用工具
L1 — 文档生命周期
工具 | 说明 |
| 打开文档 |
| 新建文档 |
| 保存或另存 |
| 导出为 PDF |
| 关闭文档 |
| 获取文档信息(页数、字数等) |
| 列出所有打开的文档 |
| 切换到指定文档 |
L2 — 原子操作
工具 | 说明 |
| 插入文字 |
| 设置字体、大小、颜色等 |
| 设置对齐、行距、缩进 |
| 插入表格(可带数据) |
| 格式化表格(样式、字体、表头) |
| 插入图片 |
| 插入分页符 |
| 设置页面布局(边距、方向、纸张) |
| 设置页眉/页脚(多节、页码样式、对齐) |
| 查找替换 |
| 读取文档内容 |
| 获取用户选中文字 |
| 选中区域(可见高亮) |
| 应用内置样式 |
| 设置编号或项目符号 |
使用示例
告诉 Claude:"帮我创建一份简历,包含个人信息表和工作经历"——Agent 会自动组合以下工具完成:
1. word_create() → 新建文档
2. word_insert_text("张三的简历") → 标题
3. word_format_text(bold=true, size=22) → 标题加粗
4. word_insert_table(5, 2, [...]) → 个人信息表
5. word_format_table(header_row=true) → 表格样式
6. word_insert_text("工作经历") → 章节标题
7. word_apply_style("Heading 2") → 标题样式
8. word_save("简历.docx") → 保存整个过程 Word 窗口可见,用户可实时看到每一步变化。
关于 VBA
VBA 执行器需要 Word 信任中心手动启用「信任对 VBA 项目对象模型的访问」,出于安全考虑已默认移除。绝大部分功能已通过 L1 + L2 工具覆盖,如需 VBA 可自行恢复对应模块。
Made with ❤️ for Windows + Claude Code
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wpz666hhh/word-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server