Microsoft Office

io.github.mindstone由 GitHub 账号 mindstone 发布v0.3.0更新于 Oct 24, 2026

Microsoft Office MCP server: read and edit Word documents, Excel workbooks, and PowerPoint files

发布方自己的服务:Microsoft Learn MCP

已验证STDIO仅桌面效率与工作流文件与存储

概览

AI 生成的概览

仅限桌面的 MCP 服务器,让助手读取和编辑已在 Microsoft 365 中打开的 Word 文档、Excel 工作簿和 PowerPoint 演示文稿。

可以做什么
读取 Word 文档正文、大纲、选区、表格、批注和修订记录,并插入、格式化、添加批注或接受/拒绝修订(破坏性)。读取和写入 Excel 区域、工作表、表格、公式、图表、格式、排序、筛选、数据验证和数据透视表。列出、新增、删除、重排和格式化 PowerPoint 幻灯片、形状、文本和演讲者备注。安装、修复或卸载 Office 加载项,并检查各应用的连接状态。
适用场景
当希望助手处理你已在 Mac 或 Windows 桌面上打开的 Office 文件时使用,例如在打开的工作簿中填充公式或修改 Word 草稿,而不是处理云端存储的文档。
运行要求
通过 npx 运行的本地进程,需要 Node.js 20+ 和 npm。macOS 或 Windows,并安装 Microsoft 365 Word、Excel 和/或 PowerPoint。必需的环境变量 MCP_OFFICE_SIDECAR_STATE 须指向可写的绝对路径,用于 sidecar 状态文件。Windows 上首次运行需管理员确认信任开发证书。
安装前请注意
许多工具被标记为破坏性:会写入、替换、格式化、删除工作表、行、幻灯片、形状或批注,并接受或拒绝打开文档中的修订。sidecar 状态文件保存服务器与本地助手通信所用的端口和令牌,请妥善保护该路径。它设计为由管理 sidecar 生命周期的宿主程序托管;直接运行需自行提供可写状态路径。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Microsoft Office,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@mindstone/mcp-server-office

[npm version] [License: FSL-1.1-MIT]

Read and edit Word documents, Excel workbooks, and PowerPoint presentations from desktop Microsoft 365 via an Office Add-in sidecar.

Desktop-only Office MCP. Edits the Word/Excel/PowerPoint documents the user already has open on macOS or Windows.

Status

Why this exists

At the time we built this, Microsoft did not ship an MCP server for the desktop Office apps, and the community options we found either targeted cloud-stored documents through Microsoft Graph or only worked on Windows. We needed something that could edit a Word document, Excel workbook, or PowerPoint deck the user already has open — on both macOS and Windows — with live access to selections, formulas, and tracked changes. This package bundles the MCP server, the small local helper that talks to Office, and the Office Add-in itself into a single npm install, so the three pieces always ship at the same version.

Example interaction

"In the Excel workbook I have open, fill column D with =B*C for each data row and bold the totals row."

Tools the host calls:

  1. rebel_office_excel_set_formula — writes =B<row>*C<row> into each cell in column D.
  2. rebel_office_excel_format_range — applies bold to the totals row range.

Response (trimmed):

json
{  "set_formula": {    "worksheet": "Sheet1",    "range": "D2:D24",    "formula": "=B2*C2",    "filled_rows": 23  },  "format_range": {    "worksheet": "Sheet1",    "range": "A25:D25",    "bold": true  }}

Requirements

  • Node.js 20+
  • npm
  • macOS or Windows with Microsoft 365 Word, Excel, and/or PowerPoint installed
  • First-run admin prompt on Windows to trust the dev certificate (one-time)

One-click install

[Add to Cursor] [Add to VS Code] [Add to VS Code Insiders]

After clicking the button, your host will prompt you to fill: MCP_OFFICE_SIDECAR_STATE.

Manual config for Claude Desktop / Claude Code / Goose / Continue.dev (Microsoft Office)
json
{  "mcpServers": {    "Microsoft Office": {      "command": "npx",      "args": [        "-y",        "@mindstone/mcp-server-office"      ],      "env": {        "MCP_OFFICE_SIDECAR_STATE": ""      }    }  }}

Quick Start

Install & build

bash
cd <path-to-repo>/connectors/officenpm installnpm run build

npx (once published)

bash
npx -y @mindstone/mcp-server-office

Local

bash
node dist/index.js

Configuration

Environment variables

Read by the stdio MCP server (dist/index.js):

  • MCP_OFFICE_SIDECAR_STATE — required. Absolute path to the sidecar state file (JSON). The MCP server reads port and token from this file to talk to the sidecar; the sidecar writes it on startup. The state file's parent directory doubles as the sidecar's state directory (certs, per-app manifests).
  • MCP_OFFICE_SIDECAR_DISABLE — optional kill-switch. When set (1), the MCP server refuses to talk to or spawn the sidecar.

Read by the sidecar (dist/sidecar/cli.js) — normally set by the MCP server when it lazy-spawns the sidecar, but documented here for hosts that manage the sidecar lifecycle directly:

  • MCP_OFFICE_SIDECAR_STATE_DIR — required by the sidecar. Directory for the state file, HTTPS certificates, and generated per-app manifests (manifest.word.xml, manifest.excel.xml, manifest.powerpoint.xml). The MCP server derives this from the parent directory of MCP_OFFICE_SIDECAR_STATE and passes it through automatically.
  • MCP_OFFICE_ADDIN_DIR — optional. Absolute path to the built add-in static files (the directory containing taskpane.html, taskpane.js, and assets/). The MCP server sets this to the package's dist/addin/ directory; hosts serving a custom add-in bundle can override it.

Host configuration examples

Claude Desktop / Cursor

The Office connector is designed to be managed by a host application (like Mindstone Rebel) that owns the sidecar lifecycle. Running it directly from Claude Desktop is possible but the host must provide a writable MCP_OFFICE_SIDECAR_STATE path.

json
{  "mcpServers": {    "Office": {      "command": "npx",      "args": ["-y", "@mindstone/mcp-server-office"],      "env": {        "MCP_OFFICE_SIDECAR_STATE": "/absolute/path/to/sidecar-state.json"      }    }  }}

Mindstone Rebel

json
"RebelOffice": {  "name": "RebelOffice",  "type": "stdio",  "command": "npx",  "args": ["-y", "@mindstone/[email protected]"],  "env": {    "MCP_OFFICE_SIDECAR_STATE": "~/Library/Application Support/mindstone-rebel/office-sidecar/sidecar-state.json"  },  "description": "Microsoft Office integration — Word, Excel, PowerPoint.",  "catalogId": "bundled-office"}

Tools (62)

Setup

  • rebel_office_setup — Install or repair (or uninstall) the Office add-in.
  • rebel_office_status — Check Office connection status for Word, Excel, PowerPoint.

Word (20)

  • rebel_office_word_read_document — Read the active Word document body, paginated by paragraph.
  • rebel_office_word_get_document_structure — Get the heading/section outline of the document.
  • rebel_office_word_get_selection — Get the currently selected text and location.
  • rebel_office_word_find_text — Search for text occurrences with surrounding context.
  • rebel_office_word_insert_text — Insert text at a location or replace the selection (destructive).
  • rebel_office_word_replace_text — Find-and-replace text in the document (destructive).
  • rebel_office_word_format_text — Apply font, color, highlight, or alignment formatting (destructive).
  • rebel_office_word_apply_style — Apply a named paragraph style (e.g. "Heading 1", "Quote") to existing paragraphs (destructive).
  • rebel_office_word_insert_table — Insert a table with headers and rows (destructive).
  • rebel_office_word_read_table — Read a table's cell values as a 2D array.
  • rebel_office_word_update_table_cell — Replace the text of a single table cell (destructive).
  • rebel_office_word_insert_image — Insert an image from a file path or base64 data (destructive).
  • rebel_office_word_insert_break — Insert a page or section break (destructive).
  • rebel_office_word_set_header_footer — Set header or footer text and alignment (destructive).
  • rebel_office_word_get_properties — Get document metadata (title, author, counts).
  • rebel_office_word_get_comments — Read comments and reply threads.
  • rebel_office_word_add_comment — Add a comment or threaded reply on selected text (destructive).
  • rebel_office_word_resolve_comment — Resolve or delete a comment by ID (destructive).
  • rebel_office_word_get_tracked_changes — Read tracked changes (revisions).
  • rebel_office_word_accept_reject_changes — Accept or reject tracked changes in bulk or by ID (destructive).

Excel (25)

  • rebel_office_excel_read_range — Read cell values from an A1 range or named range.
  • rebel_office_excel_write_range — Write a 2D array of values to a range (destructive).
  • rebel_office_excel_get_worksheets — List worksheets with positions and used ranges.
  • rebel_office_excel_add_worksheet — Add a new worksheet at a chosen position (destructive).
  • rebel_office_excel_delete_worksheet — Delete a worksheet and all its data (destructive).
  • rebel_office_excel_read_table — Read rows from a named Excel table.
  • rebel_office_excel_create_table — Convert a range into a named Excel table (destructive).
  • rebel_office_excel_set_formula — Set a formula in a cell, with optional fill-down (destructive).
  • rebel_office_excel_get_formulas — Read formula strings (not values) from a range.
  • rebel_office_excel_create_chart — Create an embedded chart from a data range (destructive).
  • rebel_office_excel_format_range — Apply font, fill, borders, and number formats (destructive).
  • rebel_office_excel_add_conditional_formatting — Add color scales, data bars, or rule-based formats (destructive).
  • rebel_office_excel_sort_range — Sort a range or table by one or more columns (destructive).
  • rebel_office_excel_filter_table — Apply or clear auto-filter on a table or range (destructive).
  • rebel_office_excel_get_named_ranges — List named ranges and tables in the workbook.
  • rebel_office_excel_insert_rows_columns — Insert rows or columns at a position (destructive).
  • rebel_office_excel_delete_rows_columns — Delete rows or columns and their data (destructive).
  • rebel_office_excel_merge_cells — Merge or unmerge cells in a range (destructive).
  • rebel_office_excel_auto_fit — Auto-fit column widths or row heights (destructive).
  • rebel_office_excel_add_data_validation — Add input validation rules to a range (destructive).
  • rebel_office_excel_get_comments — Read threaded cell comments.
  • rebel_office_excel_add_comment — Add a comment or reply on a cell (destructive).
  • rebel_office_excel_get_pivot_tables — List pivot tables and the worksheets they live on.
  • rebel_office_excel_create_pivot_table — Create a pivot table from a source range (destructive).
  • rebel_office_excel_refresh_pivot_table — Refresh one pivot table, or all of them.

PowerPoint (15)

  • rebel_office_powerpoint_get_slides — List slides with layout, title, and shape counts.
  • rebel_office_powerpoint_get_slide_content — Get all shapes and text on a specific slide.
  • rebel_office_powerpoint_add_slide — Add a new slide with a layout and optional content (destructive).
  • rebel_office_powerpoint_apply_layout — Change the layout of an existing slide (destructive).
  • rebel_office_powerpoint_delete_slide — Delete a slide by index (destructive).
  • rebel_office_powerpoint_reorder_slides — Move a slide to a new position (destructive).
  • rebel_office_powerpoint_add_text_box — Add a positioned text box to a slide (destructive).
  • rebel_office_powerpoint_add_image — Add an image to a slide from path or base64 (destructive).
  • rebel_office_powerpoint_add_shape — Add a geometric shape with optional text and fill (destructive).
  • rebel_office_powerpoint_delete_shape — Delete a shape from a slide by ID or name (destructive).
  • rebel_office_powerpoint_format_shape — Format a shape's fill, line, position, size, or name (destructive).
  • rebel_office_powerpoint_update_text — Update text in a shape or layout placeholder (destructive).
  • rebel_office_powerpoint_get_speaker_notes — Read speaker notes for one or all slides.
  • rebel_office_powerpoint_set_speaker_notes — Set or replace speaker notes for a slide (destructive).
  • rebel_office_powerpoint_get_presentation_properties — Get presentation metadata, dimensions, and layouts.

Smoke test

bash
MCP_OFFICE_SIDECAR_STATE=/tmp/rebel-office-smoke/sidecar-state.json \  node dist/index.js

Then send a listTools MCP request on stdin; you should get back the full tool manifest. The server does not need a live sidecar to respond to listTools.

Licence

FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on 2030-04-08.

Security

See SECURITY.md for this connector's security policy and the repository-level SECURITY.md for vulnerability reporting.

Architecture and drift-risk notes

Sidecar lifecycle, port allocation, manifest sideloading, and the byte-compatible code vendored from the Mindstone Rebel monorepo are documented in docs/connectors/office-architecture.md. That file is the canonical reference if you are debugging the sidecar handshake or planning a release that touches the vendored sidecar/appBridge or chat code.

来源:connectors/office/README.md,提交 22c4611

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Microsoft 集成