npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jim-wps-mcp-server

v1.3.0

Published

MCP Server for WPS Webhook Integration - 让 AI 应用直接查询 WPS 文档数据

Downloads

430

Readme

Jim WPS MCP Server

一个用于 WPS Webhook 集成的 MCP (Model Context Protocol) 服务器,让 AI 应用直接查询 WPS 文档数据。

功能

| 工具名称 | 描述 | |---------|------| | list_configs | 获取所有可用的 WPS 配置名称和描述 | | get_table_list | 获取所有表/工作表信息 | | search | 多条件 AND 搜索 | | batch_search | 批量搜索 | | get_image_urls | 获取图片 URL |

快速使用 (npx)

无需安装,直接使用 npx 运行:

# stdio 模式 (本地 AI 应用)
npx jim-wps-mcp-server

# HTTP 模式 (局域网访问)
npx jim-wps-mcp-http

需要设置环境变量:

export WPS_WEBHOOK_URL="https://airscript.wps.cn/your-webhook-path"
export WPS_TOKEN="your-airscript-token"

MCP 客户端配置

stdio 模式 (推荐)

在 Claude Desktop 或其他 MCP 客户端的配置中添加:

{
  "mcpServers": {
    "wps": {
      "command": "npx",
      "args": ["-y", "jim-wps-mcp-server@latest"],
      "env": {
        "WPS_WEBHOOK_URL": "https://airscript.wps.cn/your-webhook-path",
        "WPS_TOKEN": "your-airscript-token"
      }
    }
  }
}

多 Webhook 配置 (可选)

如果你需要连接多个 WPS 表格,可以使用 WPS_CONFIG 环境变量传入 JSON 数组:

{
  "mcpServers": {
    "wps": {
      "command": "npx",
      "args": ["-y", "jim-wps-mcp-server@latest"],
      "env": {
        "WPS_CONFIG": "[{\"name\":\"main\",\"description\":\"主数据表\",\"webhookUrl\":\"...\",\"token\":\"...\"},{\"name\":\"backup\",\"description\":\"备份数据\",\"webhookUrl\":\"...\",\"token\":\"...\"}]"
      }
    }
  }
}

每个配置项支持以下字段:

  • name (必填): 配置名称,用于 tokenName 参数
  • webhookUrl (必填): WPS Webhook URL
  • token (必填): AirScript Token
  • description (可选): 配置描述,便于 AI 理解该配置的用途

配置完成后,可以通过 list_configs 工具查看所有可用配置,通过 tokenName 参数指定使用哪个配置(默认为第一个)。

HTTP/SSE 模式 (局域网访问)

先启动 HTTP 服务器:

WPS_WEBHOOK_URL="..." WPS_TOKEN="..." npx jim-wps-mcp-http

或者使用多配置:

WPS_CONFIG='[{"name":"main","description":"主数据表","webhookUrl":"...","token":"..."}]' npx jim-wps-mcp-http

然后配置客户端:

{
  "mcpServers": {
    "wps": {
      "url": "http://192.168.1.100:3001/sse"
    }
  }
}

本地开发

安装依赖

npm install

配置环境变量

复制环境变量模板并编辑:

cp .env.example .env

编辑 .env

WPS_WEBHOOK_URL=https://airscript.wps.cn/your-webhook-path
WPS_TOKEN=your-airscript-token
HTTP_PORT=3001      # SSE 模式的端口
HTTP_HOST=0.0.0.0   # SSE 模式的监听地址

启动方式

本项目支持两种传输模式,请根据你的使用场景选择:

| 模式 | 命令 | 使用场景 | |------|------|----------| | stdio | npm start | 本地 AI 应用(如 Claude Desktop)通过标准输入/输出通信 | | SSE/HTTP | npm run start:http | 局域网访问,通过 HTTP SSE 协议通信 |

stdio 模式(本地使用)

# 生产模式
npm start

# 开发模式(支持热重载)
npm run dev

适用于:Claude Desktop 等本地 MCP 客户端,通过 command 配置启动。

SSE/HTTP 模式(网络访问)

# 生产模式
npm run start:http

# 开发模式(支持热重载)
npm run dev:http

启动后会输出:

WPS MCP Server (SSE) 已启动
  地址: http://0.0.0.0:3001
  SSE 端点: http://0.0.0.0:3001/sse
  健康检查: http://0.0.0.0:3001/health

适用于:需要通过网络访问的场景,MCP 客户端使用 url 配置连接。

构建

npm run build

通过 npm 安装使用

npm install jim-wps-mcp-server

工具示例

list_configs

{}

get_table_list

{
  "tokenName": "main"
}

search

{
  "sheetName": "零件表",
  "criteria": [
    { "columnName": "件号", "searchValue": "ABC123", "op": "Contains" }
  ],
  "returnColumns": ["件号", "名称", "价格"]
}

batch_search

{
  "sheetName": "零件表",
  "batchCriteria": [
    { "id": "Q1", "criteria": [{ "columnName": "件号", "searchValue": "ABC", "op": "Contains" }] },
    { "id": "Q2", "criteria": [{ "columnName": "件号", "searchValue": "XYZ", "op": "Equals" }] }
  ]
}

get_image_urls

{
  "sheetName": "零件表",
  "cells": ["D5", "D6", "D7"]
}

License

MIT