MCP Server Office

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Allows reading, writing, and editing Microsoft Word (docx) files, including parsing tables and images, making text replacements in specific paragraphs, and inserting new paragraphs at specified positions.

MCP 服务器办公室

模型上下文协议 (MCP) 服务器提供读取/写入 Microsoft Word (docx) 文件的工具。

用法

使用 pip 安装:

pip install mcp-server-office

然后,启动 MCP 服务器:

mcp-server-office

或者使用 uv,只需:

uvx mcp-server-office

可用工具

  1. read_docx :读取 docx 文件的完整内容,包括表格和图像。
    • 输入: path (字符串)-目标文件的绝对路径
    • 注意:图像将转换为 [图像] 占位符,并且不会显示修订记录
  2. write_docx :创建一个具有给定内容的新 docx 文件。
    • 输入:
      • path (字符串)- 目标文件的绝对路径
      • content (字符串)- 写入文件的内容
    • 注意:新段落使用双行换行,[Table] 标签使用 |表格分隔符
  3. edit_docx_paragraph :在 docx 文件的指定段落中进行文本替换。
    • 输入:
      • path (字符串) - 要编辑的文件的绝对路径
      • edits (数组) - 包含搜索/替换文本和段落索引的字典列表
        • paragraph_index (数字) - 要编辑的段落的从 0 开始的索引
        • search (字符串) - 在指定段落中查找的文本
        • replace (字符串)-要替换的文本
    • 注意:每个搜索字符串必须在指定段落内匹配一次
  4. edit_docx_insert :将新段落插入 docx 文件。
    • 输入:
      • path (字符串) - 要编辑的文件的绝对路径
      • inserts (数组) - 包含文本和可选段落索引的字典列表
        • text (字符串) - 作为新段落插入的文本
        • paragraph_index (数字,可选) - 插入段落的基于 0 的索引。如果没有指定,则插入到末尾。

要求

  • Python >= 3.12
  • 依赖项:
    • mcp[cli] >= 1.2.0
    • python-docx >= 1.1.2

MCP 服务器办公室(日语)

提供读取和写入 Microsoft Word (docx) 文件的模型上下文协议 (MCP) 服务器。

如何使用

使用 pip 安装:

pip install mcp-server-office

启动 MCP 服务器:

mcp-server-office

或者,使用 uv:

uvx mcp-server-office

可用工具

  1. read_docx :读取 docx 文件的完整内容,包括表格和图像。
    • 输入: path (字符串)-目标文件的绝对路径
    • 注意:图像将转换为名为 [图像] 的占位符,并且不会显示修订历史记录。
  2. write_docx :创建具有指定内容的新 docx 文件。
    • 输入:
      • path (字符串) - 要创建的文件的绝对路径。
      • content (字符串) - 要写入文件的内容
    • 注意:段落之间用两个换行符分隔,表格使用[Table]标签和|分隔符
  3. edit_docx_paragraph :替换 docx 文件中指定段落的文本。
    • 输入:
      • path (字符串) - 要编辑的文件的绝对路径。
      • edits (数组) - 包含搜索/替换文本和段落索引的字典列表
        • paragraph_index (数字)——要编辑的段落的从 0 开始的索引。
        • search (字符串)– 在指定段落中搜索的文本。
        • replace (字符串)——替换文本。
    • 注意:每个搜索字符串在给定的段落中必须匹配一次。
  4. edit_docx_insert :在 docx 文件中插入新段落。
    • 输入:
      • path (字符串) - 要编辑的文件的绝对路径。
      • inserts (数组) - 包含文本和可选段落索引的字典列表。
        • text (字符串) – 作为新段落插入的文本
        • paragraph_index (数字,可选) - 要插入的段落的从 0 开始的索引。如果没有指定,它将被插入到最后。

要求

  • Python >= 3.12
  • 依赖包:
    • mcp[cli] >= 1.2.0
    • python-docx >= 1.1.2

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

通过模型上下文协议提供读取、写入和编辑 Microsoft Word(docx)文件的工具的服务器,允许执行完整文档读取、内容创建、段落目标编辑和文本插入等操作。

  1. Usage
    1. Available Tools
  2. Requirements
    1. MCP Server Office (日本語)
      1. 使用方法
      2. 動作要件
    ID: 67m983dlq9