WPS MCP logo

WPS MCP

Community
ELDment

🪄 让 AI 接管 WPS Office,自主编辑文档、处理表格和制作演示文稿

PublisherELDment
Repositorywps-mcp
LanguagePython
Forks
9
Stars
104
Available tools
0
Transport typestdio
Categories
LicenseAGPL-3.0
Links
  • Connect tools to AI workflows

    WPS MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    104 stars and 9 forks from the linked repository.

WPS MCP 为 AI 助手提供 Word 文档编辑、Excel 表格处理、PowerPoint(PPT)制作及 PDF 导出与预览能力,基于 WPS Office 运行,支持 Windows、Linux 和 macOS。

功能与平台对比

组件功能WindowsLinuxmacOS
通用环境检测、组件连接与启动✅✅✅
文档新建、模板与打开✅✅✅
文档保存、另存为与关闭✅✅✅
文档信息读取✅✅✅
PDF 导出与页面预览✅✅✅
接管用户已打开的 WPS 窗口✅❌✅
WPS 文字正文读写与查找替换✅✅✅
字体、段落与样式管理✅✅✅
表格与图片✅✅✅
页面、分节与页眉页脚✅✅✅
修订跟踪、批注与文档统计✅✅✅
书签与目录✅✅✅
脚注、尾注与交叉引用✅✅✅
本地 CSV 邮件合并✅✅✅
WPS 表格工作表管理✅✅✅
单元格读写、公式与重算✅✅✅
单元格格式、行列调整、合并与冻结✅✅✅
命名区域✅✅✅
查找、排序与筛选✅✅✅
结构化表格✅✅✅
图表与图表数据源更新✅✅✅
数据透视表✅✅✅
条件格式新增、读取与删除✅✅✅
条件格式修改✅✅部分¹
数据验证与下拉列表✅✅✅
WPS 演示文稿、模板与属性标签✅✅✅
幻灯片、分节与备注✅✅✅
主题应用✅✅✅
母版、版式与占位符✅✅✅
读取标题母版状态✅✅❌
主题配色修改✅✅部分²
幻灯片背景✅✅✅
文字与字体排版✅✅✅
Markdown 提取、排版检查与修复✅✅✅
形状、图层与样式✅✅✅
连接线:按数字连接点索引连接✅✅✅
连接线:按方向选择连接点✅✅❌
自由形状:直线段与闭合路径✅✅✅
自由形状:贝塞尔曲线✅✅❌
自由形状:节点读取与编辑✅✅❌
SmartArt 创建、布局、颜色与样式✅✅✅
SmartArt 节点文字、增删与格式✅✅❌
本地图片插入与裁剪✅✅✅
读取图片透明色✅✅❌
网络图片与图标✅³✅³✅³
音视频插入与播放设置✅✅✅
音视频裁剪✅⁴✅⁴✅⁴
表格编辑✅✅✅
图表创建、类型与格式✅⁵✅⁵✅⁵
图表数据读取✅✅⁶部分⁶
图表数据修改部分⁷❌❌
对象动画添加、修改与删除✅✅✅
动画信息读取✅✅部分⁸
幻灯片切换效果✅✅✅
批注、超链接与窗口视图✅✅✅
放映控制✅✅❌
撤销、重做与批量操作撤销分组✅✅✅
幻灯片图片与形状导出✅✅✅
复制图片到剪贴板✅✅⁹✅
  • 实际可用性以当前 WPS 版本为准。
  • ¹ macOS:替换规则时保留可读颜色,无法保留不可读取的主题绑定
  • ² macOS:颜色方案名称会变为 WPS MCP,未指定的颜色保留
  • ³ 需要联网。
  • ⁴ 需要当前 WPS 提供裁剪接口
  • ⁵ 含可编辑图表请保存为 .pptx
  • ⁶ Linux:可能打开图表数据编辑器;macOS:读取缓存数值,系列名称返回 null,新图表分类标签可能为空
  • ⁷ Windows:需保持现有分类数和系列数,数据源位于首张工作表,第一行为标题、A 列为分类、B 列起为系列数值
  • ⁸ macOS:方向信息返回 null,其他已支持的信息不受影响
  • ⁹ Linux:X11 需 xclip,Wayland 需 wl-copy

快速开始

1. 准备环境

先安装 WPS Office 和 uv,再配置 MCP 客户端。

平台PythonWPS 与桌面环境会话方式
Windows3.11+WPS 已注册 COM 接口可连接已有实例,或按需启动
Linux x86_64CPython 3.11WPS Linux、Qt5、已登录的 X11 或带 XWayland 的桌面使用 MCP 管理的实例,不接管已有桌面窗口
macOS3.11+WPS 桌面版,安装包包含内置自动化驱动连接本机 WPS,首次连接可启动编辑器

2. 配置 MCP 客户端

MCP 配置

Windows / macOS:

json
{
  "mcpServers": {
    "wps": {
      "command": "uvx",
      "args": ["wps-mcp@latest"]
    }
  }
}

Linux 必须指定 CPython 3.11:

json
{
  "mcpServers": {
    "wps": {
      "command": "uvx",
      "args": ["--no-config", "--python", "3.11", "wps-mcp@latest"]
    }
  }
}

使用预发布版本时,将对应配置中的 args 替换为:

sh
# Windows / macOS
"args": ["--prerelease", "allow", "wps-mcp@latest"]

# Linux
"args": ["--no-config", "--python", "3.11", "--prerelease", "allow", "wps-mcp@latest"]

环境配置与故障排查

通常无需配置。需要指定安装位置、模板或 WPS 实例时,只填写需要的变量,路径使用绝对路径。

变量何时设置
WPS_OFFICE_DIRLinux 找不到 WPS 时,填写包含 wps、et、wpp 的 office6 目录。
WPS_TEMPLATES_DIR使用自己的模板时,填写模板目录。
WPS_DRIVER_DIRmacOS 驱动目录不同于默认的 ~/Library/Containers/com.kingsoft.wpsoffice.mac/Data 时,填写实际目录。
WPS_DRIVER_SOCKETmacOS 需要指定 WPS 实例时,填写检测结果中的 socket 路径,见上方示例。

例如,Linux 指定 WPS 安装目录和模板目录(请替换为本机实际路径):

json
{
  "mcpServers": {
    "wps": {
      "command": "uvx",
      "args": ["--no-config", "--python", "3.11", "wps-mcp@latest"],
      "env": {
        "WPS_OFFICE_DIR": "/opt/kingsoft/wps-office/office6",
        "WPS_TEMPLATES_DIR": "/home/user/wps-templates"
      }
    }
  }
}

已有 env 时,将需要的变量合并到同一个 env 中。

从已登录的图形桌面启动 MCP 客户端。若出现 Run in a desktop session with DISPLAY and X authority,在该桌面的终端查询环境变量:

sh
env | grep -E '^(DISPLAY|XAUTHORITY|WAYLAND_DISPLAY|XDG_RUNTIME_DIR|DBUS_SESSION_BUS_ADDRESS)='

把查询结果填入下面的 env。值仅作示例,请替换为实际输出,未输出的项删掉:

json
{
  "mcpServers": {
    "wps": {
      "command": "uvx",
      "args": ["--no-config", "--python", "3.11", "wps-mcp@latest"],
      "env": {
        "DISPLAY": ":0",
        "XAUTHORITY": "/home/user/.Xauthority",
        "WAYLAND_DISPLAY": "wayland-0",
        "XDG_RUNTIME_DIR": "/run/user/1000",
        "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus"
      }
    }
  }
}
遇到的问题处理方法
找不到编辑器先用 WPS 打开一个文档,再重试连接。
无法访问文件在 WPS 的“打开”对话框中选择目标文件或目录,授予访问权限。
检测到多个 WPS 进程让 AI 调用 wps_components/detect,从返回的 editor_sockets 中选择目标路径,填入 WPS_DRIVER_SOCKET。

指定 WPS 实例的配置示例,将 socket 路径替换为检测结果中的实际路径:

json
{
  "mcpServers": {
    "wps": {
      "command": "uvx",
      "args": ["wps-mcp@latest"],
      "env": {
        "WPS_DRIVER_SOCKET": "/Users/user/Library/Containers/com.kingsoft.wpsoffice.mac/Data/wpsdriverlocal_wps_12345"
      }
    }
  }
}

同一 WPS 实例请避免同时连接多个 MCP 服务。

本地开发

sh
# Windows / macOS
uv sync --locked

# Linux
uv sync --locked --python 3.11

将下面的 项目目录 替换为项目根目录(包含 pyproject.toml 的目录),例如 d:/projects/wps-mcp 或 /home/user/projects/wps-mcp。

Windows / macOS:

json
{
  "mcpServers": {
    "wps": {
      "command": "uv",
      "args": ["--directory", "项目目录", "run", "wps-mcp"]
    }
  }
}

Linux:

json
{
  "mcpServers": {
    "wps": {
      "command": "uv",
      "args": ["--directory", "项目目录", "run", "--python", "3.11", "wps-mcp"]
    }
  }
}

Installation

TypingMind
{
  "mcpServers": {
    "wps-mcp": {
      "command": "uvx",
      "args": [
        "wps-mcp@latest"
      ]
    }
  }
}

Use WPS MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once WPS MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add WPS MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the WPS MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "wps-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the WPS MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the WPS MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use WPS MCP to help me with this task?
WPS MCP
Sure. I read it.
Here is what I found using WPS MCP.

Frequently asked questions

What is the WPS MCP MCP server used for?

WPS MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use WPS MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use WPS MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use WPS MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With WPS MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect WPS MCP MCP to TypingMind?

WPS MCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does WPS MCP MCP provide in TypingMind?

WPS MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use WPS MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If WPS MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇