microsoft-wps-live
Real-time creation, inspection, and live editing of Microsoft Office (Word, Excel, PowerPoint) and WPS Office documents via official stdio MCP on Windows and macOS. Supports visible step-by-step progress, auto-save with integrity verification, and recovery copies.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/aaa111-sta--microsoft-wps-live-mcp)HTML
<a href="/listings/aaa111-sta--microsoft-wps-live-mcp"><img src="/api/listings/aaa111-sta--microsoft-wps-live-mcp/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Requires Windows or macOS, Python 3.11+, and desktop Microsoft Office or WPS Office. The source can be placed in any directory with write permissions. The native MCP server **does not require WSL, Docker, or ONLYOFFICE**.
Windows (PowerShell)
In the repository root, run:
powershell -NoProfile -File .\scripts\setup-mcp.ps1
Or install manually:
python -m venv .venv .\.venv\Scripts\python.exe -m pip install . .\.venv\Scripts\python.exe -m microsoft_wps_live_mcp --doctor .\.venv\Scripts\python.exe -m microsoft_wps_live_mcp --write-configs .\config\clients
macOS / Linux (Bash)
In the repository root, run:
chmod +x ./scripts/setup-mcp.sh ./scripts/setup-mcp.sh
Or install manually:
python3 -m venv .venv ./.venv/bin/python -m pip install . ./.venv/bin/python -m microsoft_wps_live_mcp --doctor ./.venv/bin/python -m microsoft_wps_live_mcp --write-configs ./config/clients
Standard `pip` or `uv` installation is also supported. Once installed, start the server with `microsoft-wps-live-mcp` or `python -m microsoft_wps_live_mcp`. It communicates via standard input/output (stdio) and does not listen on any network ports.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 40 lines
- ---
- name: microsoft-wps-live
- description: Real-time creation, inspection, and live editing of Microsoft Office (Word, Excel, PowerPoint) and WPS Office documents via official stdio MCP on Windows and macOS. Supports visible step-by-step progress, auto-save with integrity verification, and recovery copies.
- ---
- # microsoft-wps-live mcp 智能体入口
- 优先使用已配置的 `microsoft-wps-live` MCP。源码目录不会自动注册客户端;未连接时按 [README.md](README.md) 安装生成配置,不能假装已经取得工具访问能力。
- 连接后由智能体直接调用 MCP,用户在原有 Office/WPS 窗口观看和继续编辑,无需打开额外控制页或点击“让智能体操作”。原生编辑本身不依赖电脑接管、屏幕录制或浏览器预览。客户端自身的工具授权由客户端管理,服务不修改其审批设置。
- ## 执行流程
- 1. `office_status` 确认本机接口与文档。原生后端要求 Windows 桌面及 Office/WPS,其他系统不能声称已实时连接。
- 2. 按用户路径调用 `office_open_document` 或 `office_create_document`。选择 `microsoft` / `wps`,未指定则 `auto`;连接已打开原文档或载入未打开文件。
- 所有任务默认保持 `visible=true`,让用户看到真实编辑过程。只有用户明确要求后台操作时才使用 `visible=false`。
- 3. 先读内容与结构再改。`document` 可用 ID 或绝对路径;段落、工作表、幻灯片、形状为 1 起始,Word 字符偏移为原生 0 起始。
- 4. 常用操作用快捷工具,其他需求用 `office_api_describe`、`office_api_constants`、`office_api_batch`。科研、办公、学习只是场景,不按示例限制功能。
- 所有复杂任务都拆成短小、有意义的可见阶段,优先使用 `office_live_steps`;普通工具也用多个小步骤组织工作,不一次重建整个文件。使用 `office_show_document` 定位编辑中的段落、区域、幻灯片。说明阶段进展,允许用户在过程中调整要求,不逐步索要确认。
- 5. 修改后自动保存,检查 `disk_saved`、`autosave_state`;原生缓存不能当作落盘。恢复副本失败应单独报告。
- 6. 结束编辑前调用 `office_create_copy`,报告原文件、独立副本、恢复副本位置,不覆盖已有副本。
- 默认保留已完成文档的原生窗口供用户查看和继续编辑;未经要求不关闭窗口。
- ## 能力与结果
- 类型库声明、接口可调用、实际成功不同。某成员在类型库出现不代表当前版本实现它,不能把通用接口视为每项功能均已验收。参见 [对象模型说明](docs/OBJECT_MODEL.md) 与 [功能核对](docs/FEATURE_AUDIT.md)。
- 通过原生局部操作保留未修改内容、样式和动态域。不要直接重写已打开的 OOXML 文件,不要用整段重建代替局部格式调整。
- 批次不是事务。`partial_error` 保留已执行步骤并暂停自动覆盖,先检查再显式保存,不直接重放。`pending` 用 `office_operation_status` 查询。冲突、只读、保存错误时保留实时内容,不另起连接强行覆盖。
- 保存包含用户未保存的编辑。只操作用户指定的文档、组件和全局设置,不擅自退出应用或处理其他文件。未命名文档先指定保存路径;观察器仅在 MCP 运行期间自动保存已连接文档。
- 检查返回的 `live_view`。若显示失败或 `focus_error`,先解决视图问题,不能声称用户已经看到了正确位置。不关闭屏幕更新来加速,不把后台生成成品当成边做边看。详细行为见 [LIVE_EDITING.md](docs/LIVE_EDITING.md)。
- ## 安装与分发
- 原生 MCP 不依赖作者路径、WSL、Docker。见 [客户端接入](docs/CLIENTS.md)。不上传配置、文档、备份、运行环境、日志;使用 `scripts/export_source.py` 导出源码包。
- 可选旧网页模式见 [WEB_EDITOR.md](docs/WEB_EDITOR.md),接口和索引规范与原生 MCP 不同,不能把网页会话称为桌面实时连接。
README.md · README · 146 lines
- # microsoft-wps-live-mcp
- [English](README.md) | [中文说明](README_CN.md)
- 
- A universal, local Office Model Context Protocol (MCP) server that empowers AI agents to create, inspect, and interactively live-edit Word, Excel, and PowerPoint documents in **Microsoft Office and WPS Office**.
- If a document is already open, it seamlessly connects to the active desktop window; if closed, it opens the file directly in the native office suite. Built for professional work, academic research, data analysis, and daily productivity without arbitrary task or domain whitelists.
- **Dual-Platform Native Support: Windows & macOS**
- - **Windows**: Full COM automation directly driving desktop Microsoft Office and COM-enabled WPS Office.
- - **macOS**: Native AppleScript and application bridge supporting Microsoft Office (Word, Excel, PowerPoint) and WPS Office for macOS.
- ## Features
- - **Standard stdio MCP**: Built on the official Python MCP SDK, providing 37 specialized tools with both modern and legacy protocol negotiation.
- - **Visible, Step-by-Step Execution by Default**: Documents open in real desktop windows. The view actively tracks paragraphs, cell ranges, or slides as content takes shape in real time. Complex tasks run in named stages with progress reporting and automatic checkpoints.
- - **Zero-Takeover Native Editing**: The agent invokes standard MCP tools while you watch and continue editing in your familiar Office/WPS window. No screen capture, remote desktop takeover, or separate web preview portals required.
- - **Universal Object Model**: Inspect native type libraries, discover enums and constants, and batch compose get/set properties or invoke methods, returning reusable native object references.
- - **Comprehensive Word Tools**: Text insertion, search & replace, table generation, comments, tracked changes (revisions), footnotes, endnotes, bookmarks, fields, cross-references, math equations, images, and snapshot diffs.
- - **Excel & PowerPoint Capabilities**: Cell values and formulas, cell styling and formatting, worksheet management; PPT slides, text shapes, and layout formatting; comprehensive component inventory and direct vector PDF export across all three formats.
- - **Advanced Native Components**: Full access to native shapes, connectors, flowcharts, data charts, themes, masters, and tables. Includes working examples for editable flowcharts and live Excel charts.
- - **Auto-Save with Integrity Verification**: Automatically saves to disk upon successful modification with SHA256 checksum verification. An idle observer (~1s) detects and saves manual user edits during active MCP sessions.
- - **Isolated Recovery & Version Backups**: Keeps pre-edit version backups in `backups/`, updates independent crash-recovery copies in `recovery/` on each save, and generates clean sibling copies via `office_create_copy` without altering the original file path.
- - **Transparent Error Handling**: Clearly surfaces file conflicts, read-only locks, and partial failures without falsely claiming unsaved edits are saved.
- Detailed interface coverage and audit logs are documented in [COMPATIBILITY.md](docs/COMPATIBILITY.md) and [FEATURE_AUDIT.md](docs/FEATURE_AUDIT.md).
- ## Installation
- Requires Windows or macOS, Python 3.11+, and desktop Microsoft Office or WPS Office. The source can be placed in any directory with write permissions. The native MCP server **does not require WSL, Docker, or ONLYOFFICE**.
- ### Windows (PowerShell)
- In the repository root, run:
- ```powershell
- powershell -NoProfile -File .\scripts\setup-mcp.ps1
- ```
- Or install manually:
- ```powershell
- python -m venv .venv
- .\.venv\Scripts\python.exe -m pip install .
- .\.venv\Scripts\python.exe -m microsoft_wps_live_mcp --doctor
- .\.venv\Scripts\python.exe -m microsoft_wps_live_mcp --write-configs .\config\clients
- ```
- ### macOS / Linux (Bash)
- In the repository root, run:
- ```bash
- chmod +x ./scripts/setup-mcp.sh
- ./scripts/setup-mcp.sh
- ```
- Or install manually:
- ```bash
- python3 -m venv .venv
- ./.venv/bin/python -m pip install .
- ./.venv/bin/python -m microsoft_wps_live_mcp --doctor
- ./.venv/bin/python -m microsoft_wps_live_mcp --write-configs ./config/clients
- ```
- Standard `pip` or `uv` installation is also supported. Once installed, start the server with `microsoft-wps-live-mcp` or `python -m microsoft_wps_live_mcp`. It communicates via standard input/output (stdio) and does not listen on any network ports.
- ## Connecting to AI Agent Clients
- Configuration generators are provided for Codex, Claude Desktop / Claude Code, Google Gemini CLI / Antigravity, Kimi Code, ZCode, WorkBuddy, DeepSeek Harness, Trae, Qoder, and standard stdio MCP clients.
- ```powershell
- # Windows
- .\.venv\Scripts\python.exe -m microsoft_wps_live_mcp --config codex
- .\.venv\Scripts\python.exe -m microsoft_wps_live_mcp --config claude-code
- .\.venv\Scripts\python.exe -m microsoft_wps_live_mcp --config deepseek-harness
- # macOS
- ./.venv/bin/python -m microsoft_wps_live_mcp --config claude-code
- ```
- Merge the generated configuration block into your client's MCP configuration file, then start a new session. See [Client Setup Guide](docs/CLIENTS.md).
- ## Usage
- You can ask the AI agent to perform any suitable Office task, such as financial balance sheets, project flowcharts, academic charts, study notes, business reports, or document proofreading.
- 1. Call `office_status` to inspect registered desktop suites and open documents.
- 2. Use `office_open_document` or `office_create_document` to connect to a file. `engine` options: `microsoft`, `wps`, or `auto` (follows currently open app; for closed files, prefers Microsoft, then WPS).
- 3. The subsequent `document` argument accepts a document ID or an absolute file path. Paragraphs, worksheets, slides, and shapes use **1-based** indexing; Word character offsets use native **0-based** offsets.
- 4. `office_open_document` and `office_create_document` default to `visible=true`. Long text blocks in Word and row blocks in Excel are paced to update the native window smoothly. Only use `visible=false` if the user explicitly requests background work.
- 5. For complex tasks, use `office_live_steps` to divide work into stages (e.g. "Structure → Content → Components → Formatting"). Use `office_show_document` to highlight the current area. See [Live Editing Guide](docs/LIVE_EDITING.md).
- 6. For advanced features not covered by convenience tools, use `office_api_describe`, `office_api_constants`, and `office_api_batch` to explore and compose native operations. See [Object Model Guide](docs/OBJECT_MODEL.md) and [examples](examples/).
- ## Auto-Save & Recovery Architecture
- Only explicitly connected documents are managed; other open documents discovered in the background are never modified without instruction.
- The tools return `disk_saved`, SHA256 checksum, auto-save status, and recovery copy paths. The application's internal `saved` flag and disk verification are reported separately. External disk changes or partial execution errors pause auto-save; inspecting the state and explicitly saving resumes auto-saving.
- The default data directory is `%LOCALAPPDATA%\microsoft-wps-live-mcp` on Windows, and `~/Library/Application Support/microsoft-wps-live-mcp` on macOS. It can be customized via `MICROSOFT_WPS_LIVE_MCP_DATA` or the `--data-dir` flag.
- | Location | Purpose |
- | --- | --- |
- | `backups/` | Pre-edit disk versions; retains the initial version and the 49 most recent versions per document |
- | `recovery/` | Independent recovery copy updated immediately after every confirmed save |
- | `office_create_copy` output | Final completed copy generated beside the original file with a unique name without modifying the original path |
- Agents should call `office_create_copy` before concluding an editing task, providing both original and final copy locations to the user.
- ## Testing & Verification
- Automated offline unit tests (does not require Office installation):
- ```bash
- python -B -m unittest discover -s tests -v
- ```
- Interactive desktop tests with live Office/WPS applications (outputs to git-ignored `data/`):
- ```powershell
- python .\scripts\smoke_native.py --engine all
- python .\scripts\smoke_mcp.py --engine all
- python .\scripts\smoke_mcp.py --engine all --mode legacy
- python .\scripts\smoke_features.py --engine all
- python .\scripts\smoke_live.py --engine all
- ```
- GitHub Actions executes the offline test suite across Windows, macOS, and Linux runners.
- ## Source Export
- ```powershell
- python .\scripts\export_source.py
- ```
- Generates `dist/microsoft-wps-live-mcp-source.zip`, packaging only reviewed source code, documentation, examples, and tests while excluding runtime data, environments, credentials, and backups.
- ## Web Editor Mode (Optional)
- The legacy ONLYOFFICE web editor and preview bridge remains available as a separate entry point; it does not control desktop Microsoft Office or WPS Office. See [Web Editor Guide](docs/WEB_EDITOR.md).
- This repository does not distribute Microsoft Office, WPS Office, or ONLYOFFICE installers or licenses. All third-party software and dependencies are subject to their respective upstream licenses.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.