MCP Server Office
MCP 服务器办公室
模型上下文协议 (MCP) 服务器提供读取/写入 Microsoft Word (docx) 文件的工具。
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Server Office:
npx -y @smithery/cli install @famano/mcp-server-office --client claude用法
使用 pip 安装:
pip install mcp-server-office然后,启动 MCP 服务器:
mcp-server-office或者使用 uv,只需:
uvx mcp-server-office可用工具
read_docx:读取 docx 文件的完整内容,包括表格和图像。输入:
path(字符串)-目标文件的绝对路径注意:图像将转换为 [图像] 占位符,并且不会显示修订记录
write_docx:创建一个具有给定内容的新 docx 文件。输入:
path(字符串)- 目标文件的绝对路径content(字符串)- 写入文件的内容
注意:新段落使用双行换行,[Table] 标签使用 |表格分隔符
edit_docx_paragraph:在 docx 文件的指定段落中进行文本替换。输入:
path(字符串) - 要编辑的文件的绝对路径edits(数组) - 包含搜索/替换文本和段落索引的字典列表paragraph_index(数字) - 要编辑的段落的从 0 开始的索引search(字符串) - 在指定段落中查找的文本replace(字符串)-要替换的文本
注意:每个搜索字符串必须在指定段落内匹配一次
edit_docx_insert:将新段落插入 docx 文件。输入:
path(字符串) - 要编辑的文件的绝对路径inserts(数组) - 包含文本和可选段落索引的字典列表text(字符串) - 作为新段落插入的文本paragraph_index(数字,可选) - 插入段落的基于 0 的索引。如果没有指定,则插入到末尾。
Related MCP server: DOCX MCP Server
要求
Python >= 3.12
依赖项:
mcp[cli] >= 1.2.0
python-docx >= 1.1.2
MCP 服务器办公室(日语)
提供读取和写入 Microsoft Word (docx) 文件的模型上下文协议 (MCP) 服务器。
Smithery 安装
要通过Smithery在 Claude Desktop 上自动安装 Server Office:
npx -y @smithery/cli install @famano/mcp-server-office --client claude如何使用
使用 pip 安装:
pip install mcp-server-office启动 MCP 服务器:
mcp-server-office或者,使用 uv:
uvx mcp-server-office可用工具
read_docx:读取 docx 文件的完整内容,包括表格和图像。输入:
path(字符串)-目标文件的绝对路径注意:图像将转换为名为 [图像] 的占位符,并且不会显示修订历史记录。
write_docx:创建具有指定内容的新 docx 文件。输入:
path(字符串) - 要创建的文件的绝对路径。content(字符串) - 要写入文件的内容
注意:段落之间用两个换行符分隔,表格使用[Table]标签和|分隔符
edit_docx_paragraph:替换 docx 文件中指定段落的文本。输入:
path(字符串) - 要编辑的文件的绝对路径。edits(数组) - 包含搜索/替换文本和段落索引的字典列表paragraph_index(数字)——要编辑的段落的从 0 开始的索引。search(字符串)– 在指定段落中搜索的文本。replace(字符串)——替换文本。
注意:每个搜索字符串在给定的段落中必须匹配一次。
edit_docx_insert:在 docx 文件中插入新段落。输入:
path(字符串) - 要编辑的文件的绝对路径。inserts(数组) - 包含文本和可选段落索引的字典列表。text(字符串) – 作为新段落插入的文本paragraph_index(数字,可选) - 要插入的段落的从 0 开始的索引。如果没有指定,它将被插入到最后。
要求
Python >= 3.12
依赖包:
mcp[cli] >= 1.2.0
python-docx >= 1.1.2
Available Tools
4 toolsedit_docx_insertA
Insert new paragraphs into a docx file. Accepts a list of inserts with text and optional paragraph index. Each insert creates a new paragraph at the specified position. If paragraph_index is not specified, the paragraph is added at the end. When multiple inserts target the same paragraph_index, they are inserted in order. Returns a git-style diff showing the changes made.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to file to edit. It should be under your current working directory. | |
| inserts | Yes | Sequence of paragraphs to insert. |
edit_docx_paragraphA
Make text replacements in specified paragraphs of a docx file. Accepts a list of edits with paragraph index and search/replace pairs. Each edit operates on a single paragraph and preserves the formatting of the first run. Returns a git-style diff showing the changes made. Only works within allowed directories.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to file to edit. It should be under your current working directory. | |
| edits | Yes | Sequence of edits to apply to specific paragraphs. |
read_docxA
Read complete contents of a docx file including tables and images.Use this tool when you want to read file endswith '.docx'.Paragraphs are separated with two line breaks.This tool convert images into placeholder [Image].'--- Paragraph [number] ---' is indicator of each paragraph.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to target file |
write_docxA
Create a new docx file with given content.Editing exisiting docx file with this tool is not recomended.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to target file. It should be under your current working directory. | |
| content | Yes | Content to write to the file. Two line breaks in content represent new paragraph.Table should starts with [Table], and separated with '|'.Escape line break when you input multiple lines. |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- Added
edit_docx_insert - Added
edit_docx_paragraph - Added
read_docx - Added
write_docx
TDQS
Scored across 4 tools
The tools are mostly distinct: read_docx for reading, write_docx for creation, and two edit tools for modifications. However, edit_docx_insert and edit_docx_paragraph could be confused as both handle docx editing with paragraph indices, though their specific purposes (inserting vs. replacing text) are clarified in descriptions.
All tool names follow a consistent verb_noun pattern with underscores, using clear verbs like read, write, and edit. The naming is predictable and uniform across all four tools, making them easy to distinguish and use.
With 4 tools, this server is well-scoped for basic docx file operations, covering reading, writing, and editing. Each tool has a clear purpose, and the count is appropriate for the domain without being too sparse or bloated.
The tool set provides good coverage for docx file handling, including read, write, and edit functions. A minor gap exists in editing tables or images, as the tools focus on text paragraphs, but core workflows are adequately supported for typical document tasks.
Maintenance
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Document editing, AI writing, saved documents, DOCX downloads, PDF, STT, TTS and watermarking
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Create Word .docx files from sections or markdown, fill templates, and read text from a .docx.
Related MCP Servers
- AlicenseCqualityFmaintenanceA Model Context Protocol server that enables AI assistants to create, read, edit, and format Microsoft Word documents through standardized tools and resources.5418,096 PyPI2,108MIT
- FlicenseAqualityDmaintenanceA comprehensive Model Context Protocol server that processes Microsoft Word documents with full formatting support, enabling text extraction, HTML/Markdown conversion, structure analysis, and image extraction.52-
- -licenseNot gradedqualityNot gradedmaintenanceA Python server implementing Model Context Protocol for advanced Microsoft Word document manipulation, enabling programmatic automation of complex document processing tasks.-
- AlicenseBqualityDmaintenanceAn MCP server for reading, editing, and validating Microsoft Word documents with specialized support for track changes, comments, and footnotes. It enables structural auditing, heading extraction, and precise OOXML-level document manipulation through natural language tools.101001,113 PyPI67MIT