BeClaude

wps-office-skills

306Community RegistryGeneralby lc2panda

Complete WPS Office automation skills including Excel formula generation, Word formatting, PPT beautification, and cross-app operations

First seen 4/17/2026

Summary

This skill enables AI assistants to control WPS Office (Excel, Word, PPT) through 243 MCP tools, automating tasks like formula generation, document formatting, and cross-app operations.

  • It streamlines office workflows by allowing developers to manipulate spreadsheets, documents, and presentations via natural language commands.

Overview

此项目的任何功能、架构更新,必须在结束后同步更新相关文档。这是我们契约的一部分。

AI编程助手通过自然语言操控WPS Office的MCP工具集。

项目定位

本项目是MCP Server + Skills框架,让AI助手(Claude Code/Cursor/Augment等)能操控WPS Office。

  • 231个MCP专业工具 + 12个内置工具 = 243个
  • 支持Excel(82工具) / Word(28工具) / PPT(112工具) / 通用(9工具)
  • 支持macOS、Windows、Linux

前提条件

  • 已安装 WPS Office(https://www.wps.cn/ 或 https://www.wps.com/)
  • Node.js >= 18.0.0
  • Git

自动安装(AI执行)

以下步骤由AI助手自动执行。需要人类交互的步骤标注 ⚠️。

步骤1: 克隆项目

bash
git clone https://github.com/lc2panda/wps-skills.git
cd wps-skills

如果项目已存在,跳过此步。

步骤2: 安装依赖并编译

bash
cd wps-office-mcp
npm install
npm run build
cd ..

步骤3: 配置MCP Server

根据使用的AI工具,将以下配置写入对应文件。注意将路径替换为实际的项目绝对路径。

Claude Code — 写入 ~/.claude/settings.json

json
{
  "mcpServers": {
    "wps-office": {
      "command": "node",
      "args": ["/你的路径/wps-skills/wps-office-mcp/dist/index.js"]
    }
  }
}

Cursor — 写入项目根目录 .cursor/mcp.json

json
{
  "mcpServers": {
    "wps-office": {
      "command": "node",
      "args": ["/你的路径/wps-skills/wps-office-mcp/dist/index.js"]
    }
  }
}

OpenAI Codex CLI — 写入 ~/.codex/config.toml

toml
[mcp_servers.wps-office]
command = "node"
args = ["/你的路径/wps-skills/wps-office-mcp/dist/index.js"]

或命令行注册:codex mcp add wps-office -- node /你的路径/wps-skills/wps-office-mcp/dist/index.js

Augment / 其他MCP兼容IDE — 参考各IDE的MCP Server配置文档,使用相同的command和args。本项目 MCP Server 为标准 stdio 实现(spec 2025-11-25),与所有 MCP 一等客户端(Claude Code / Cursor / Codex CLI / GitHub Copilot CLI / Windsurf 等)兼容。

步骤4: 安装WPS加载项

⚠️ 需要人工操作(AI无法直接操作WPS应用):

bash
# macOS
bash scripts/auto-install-mac.sh

# Windows (PowerShell)
powershell scripts/install.ps1

# Linux
bash scripts/install.sh

⚠️ 安装后必须重启WPS Office才能生效。

步骤5: 安装Skills(仅Claude Code需要)

bash
# 创建skills目录(如不存在)
mkdir -p ~/.claude/skills

# 创建符号链接
ln -sf "$(pwd)/skills/wps-excel" ~/.claude/skills/wps-excel
ln -sf "$(pwd)/skills/wps-word" ~/.claude/skills/wps-word
ln -sf "$(pwd)/skills/wps-ppt" ~/.claude/skills/wps-ppt
ln -sf "$(pwd)/skills/wps-office" ~/.claude/skills/wps-office

步骤6: 验证安装

bash
# 验证MCP Server可启动
node wps-office-mcp/dist/index.js &
# 应看到 "MCP Server started successfully" 日志
kill %1 2>/dev/null

架构

code
Skills层(SKILL.md自然语言指导)
  ↓ Claude Code调用
MCP Server层(239个工具)
  ↓ wpsClient.executeMethod()
执行层
  ├── macOS: wps-claude-assistant (227 action, HTTP轮询)
  └── Windows: wps-com.ps1 (231 action, COM接口)

工具清单

应用工具数主要能力
Excel82公式/数据/图表/透视表/工作表/格式/工作簿/行列/批注保护/图片导出
Word28格式/内容/文档管理/页眉页脚/批注/模板填写/段落结构
PPT112幻灯片/形状/图片/表格/美化/动画/图表/3D/数据可视化/图片导出
通用9保存/连接检测/文本选取/格式转换
内置12连接检查/万能方法调用/数据缓存

故障排除

问题解决方案
MCP连接失败确认 npm install && npm run build 已执行,检查dist/index.js存在
WPS未响应重启WPS Office,确认加载项已安装
"arguments error"重新运行安装脚本,重启WPS
Linux找不到插件查看INSTALL.md中的Linux专用指南
工具调用返回null确认WPS中已打开对应类型的文档

许可证

MIT

Install & Usage

1
Create the agents directory
mkdir -p .claude/agents
2
Save the agent file

Add the configuration to .claude/agents/wps-office-skills.md

3
Invoke with @agent-name
@wps-office-skills

Use Cases

Generate complex Excel formulas or macros by describing the desired calculation in plain English.
Automate formatting of Word documents, including styles, headers, and tables, with a single command.
Beautify PowerPoint presentations by applying consistent themes, layouts, and animations across slides.
Perform cross-app operations like exporting Excel data to a Word report or embedding charts into PPT.
Batch process multiple files, such as applying the same formatting to all sheets in a workbook.
Integrate WPS Office tasks into CI/CD pipelines or automated workflows using MCP tools.

Usage Examples

1

/wps-office-skills create an Excel formula that calculates the average of column B if column A contains 'Sales'

2

/wps-office-skills format the Word document 'report.docx' with heading styles and a table of contents

3

/wps-office-skills apply a modern theme to all slides in 'presentation.pptx' and add transition effects

View source on GitHub

Security Audits

LicenseUnknownSourceWarnRepositoryPass

Frequently Asked Questions

What is wps-office-skills?

This skill enables AI assistants to control WPS Office (Excel, Word, PPT) through 243 MCP tools, automating tasks like formula generation, document formatting, and cross-app operations. It streamlines office workflows by allowing developers to manipulate spreadsheets, documents, and presentations via natural language commands.

How to install wps-office-skills?

To install wps-office-skills: create the agents directory (mkdir -p .claude/agents), then add the config to .claude/agents/wps-office-skills.md. Finally, @wps-office-skills in Claude Code.

What is wps-office-skills best for?

wps-office-skills is a agent categorized under General. Created by lc2panda.

What can I use wps-office-skills for?

wps-office-skills is useful for: Generate complex Excel formulas or macros by describing the desired calculation in plain English.; Automate formatting of Word documents, including styles, headers, and tables, with a single command.; Beautify PowerPoint presentations by applying consistent themes, layouts, and animations across slides.; Perform cross-app operations like exporting Excel data to a Word report or embedding charts into PPT.; Batch process multiple files, such as applying the same formatting to all sheets in a workbook.; Integrate WPS Office tasks into CI/CD pipelines or automated workflows using MCP tools..