Skip to main content
Glama

wop-mcp

万联易达开放平台(WOP)MCP Server —— 让 AI 助手安全、正确地完成 WOP 对接

Python 3.10+ License: MIT MCP Coverage ≥95%

简介

wop-mcp 是万联易达开放平台(WOP)的 Model Context Protocol Server, 帮助开发者通过 AI 助手(Claude Desktop、Cursor、Claude Code 等)完成 WOP 对接:

  • 📚 文档获取:接入指南、API 索引、接口详情(自动穿透文档 URL 的时间戳后缀)

  • 🔐 密钥对生成:RSA2048 / SM2,公钥按分发契约编码返回,可直接上报平台

  • 🛡️ 安全纪律:私钥只写入本地 0600 文件,永不回显进 AI 对话(对齐 wop-skills SECURITY 纪律)

  • 🔌 即插即用:stdio transport,uvx wop-mcp(PyPI 发布后)一行接入

Related MCP server: doc-hub-mcp

工具总览

工具

说明

wop_overview()

接入指南(三步流程、securityReq 组合、公钥编码、SDK 列表)+ 实时 llms.txt API 索引

wop_api_detail(api)

API 详情;入参支持 API 路径(如 /staffing/open/v1/invoice/apply,可带 POST 前缀、支持省略业务域前缀的后缀匹配)、接口中文名(如 转账提交)、完整 .md URL

wop_link_detail(url)

文档中心任意子页 / 外链内容(相对路径自动拼接基址,如 llms-full.txt)

wop_gen_key_pair(algorithm)

RSA2048(别名 RSA)或 SM2;返回 publicKey(契约编码)+ privateKeyFile(0600 路径)

快速开始

方式一:uvx 直接运行(PyPI 发布后)

uvx wop-mcp

方式二:源码运行

git clone https://github.com/wop-platform/wop-mcp.git
cd wop-mcp
uv sync
uv run wop-mcp

在 AI 工具中配置

Cursor

{
  "mcpServers": {
    "wop-mcp": {
      "command": "uvx",
      "args": ["wop-mcp"],
      "timeout": 600,
      "autoApprove": ["wop_overview", "wop_api_detail", "wop_link_detail"]
    }
  }
}

Claude Desktop

macOS:~/Library/Application Support/Claude/claude_desktop_config.json Windows:%APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "wop-mcp": {
      "command": "uvx",
      "args": ["wop-mcp"]
    }
  }
}

源码方式将 command/args 替换为:

{
  "command": "uv",
  "args": ["--directory", "/path/to/wop-mcp", "run", "wop-mcp"]
}

wop_gen_key_pair 写本地私钥文件,建议保留人工确认(未列入 autoApprove)。

环境变量

变量

默认值

说明

WOP_DOC_BASE_URL

https://assets.wanlianyida.com/gtsp/platformResource/wop/doc-center

文档中心基址

WOP_KEYS_DIR

./keys

私钥落盘目录(0600 文件)

WOP_INDEX_CACHE_TTL

300

llms.txt 索引进程内缓存秒数(0 关闭)

WOP_HTTP_TIMEOUT

15

HTTP 超时秒数

安全纪律

  • 私钥只落盘不回显:wop_gen_key_pair 返回值不含任何私钥材料;私钥以 0600 权限独占创建于 WOP_KEYS_DIR。

  • 公钥即上报格式:RSA = X.509 SPKI DER 的 Base64;SM2 = 未压缩点 04‖X‖Y(65 字节)的 Base64(crypto-strategy-spec §3.4,D10/D12)。

  • 契约自检:每次生成后经 wop-python-sdk 官方加载器回读(含 SM2 曲线校验),编码不合约即报错。

  • keys/ 目录已入 .gitignore,严禁将私钥文件提交入库或粘贴进对话。

算法说明(与 spec 的差异)

本工具密钥生成支持 RSA2048 / SM2。crypto-strategy-spec v0.4 草案的 securityReq 国际族档位为 RSA3072/RSA4096;平台实际接受的 RSA 档位以商户中心审核为准。 国密族与国际族禁止跨族组合。

开发

uv sync                          # 安装依赖(含 dev 组)
uv run pytest --cov=wop_mcp --cov-fail-under=95   # 测试 + 覆盖率门禁
npm i -g lefthook && lefthook install             # 激活 git 钩子(commitlint + 覆盖率门禁)
  • 提交信息遵循 Conventional Commits(commitlint 校验)

  • CI:GitHub Actions,Python 3.10–3.13 矩阵,覆盖率红线 95%

许可证

MIT © 2026 wop-platform

Available Tools

4 tools
wop_api_detailA

获取万联易达开放平台(WOP)指定 API 接口的详细定义。

支持三种入参形态(按优先级):
1. API 路径:如 /staffing/open/v1/invoice/apply(可带 POST/GET 前缀,
   支持省略业务域前缀的后缀匹配)
2. 接口中文名:如 转账提交
3. 完整 .md URL:直通下载

匹配到多个接口时返回候选列表,请用更精确的路径或 URL 重试。

Args:
    api: str - API 路径、接口中文名或完整 .md URL

Returns:
    str: API 接口详情(markdown 格式:基本信息、请求参数、响应参数、示例等)
NameRequiredDescriptionDefault
apiYes

Output Schema

NameRequiredDescription
resultYes
wop_gen_key_pairA

生成 WOP 对接所需的非对称密钥对(RSA2048 / SM2)。

安全纪律:私钥只写入本地 0600 文件,不会出现在返回值或对话中;
返回的 publicKey 为分发契约编码(RSA:SPKI DER Base64;
SM2:未压缩点 04‖X‖Y Base64),可直接上报平台。

Args:
    algorithm: str - "RSA2048"(别名 "RSA")或 "SM2",默认 "RSA2048"

Returns:
    Dict 包含 algorithm / publicKey / privateKeyFile(路径) / message
NameRequiredDescriptionDefault
algorithmNoRSA2048

Output Schema

NameRequiredDescription
resultYes
wop_overviewA

获取万联易达开放平台(WOP)的接入指南与全部 API 索引。

内容包含:三步接入流程、securityReq 算法组合、公钥分发编码、官方 SDK 与
工具列表,以及实时拉取的 llms.txt API 索引(按业务域分组)。
索引中的 API 可用 wop_api_detail 进一步获取详情,链接可用 wop_link_detail 获取。

Returns:
    str: 接入指南 + API 索引(markdown 格式)
NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedwop_api_detail
    • First observedwop_gen_key_pair
    • First observedwop_link_detail
    • First observedwop_overview

TDQS

A4.1/5.0

Scored across 4 tools

Disambiguation4/5

wop_overview and wop_gen_key_pair are clearly distinct, and wop_api_detail targets API definitions while wop_link_detail targets documentation pages. However, both detail tools accept URLs, so an agent could confuse which one to use for a given link despite the descriptions clarifying intent.

Naming Consistency4/5

All tools use a consistent wop_ prefix and snake_case, which makes the set predictable. The only minor deviation is that wop_gen_key_pair uses a verb phrase while the other three are noun-oriented, but the pattern remains readable.

Tool Count5/5

Four tools are well-scoped for a WOP integration server: one provides onboarding/index, two retrieve specific docs or API details, and one generates required key pairs. Each tool earns its place without redundancy or excessive surface area.

Completeness4/5

The server covers the core WOP integration lifecycle: overview/index, API detail lookup, documentation link retrieval, and key generation. Minor gaps exist, such as no standalone search across APIs or direct SDK download tool, but the overview and link tools provide workarounds.

Maintenance

ActivitySlowing
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to fetch, index, and perform semantic RAG-based searches on API documentation from various sources. It provides tools for hybrid search and collection management, allowing users to access up-to-date documentation from projects like Gemini and FastMCP.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides retrieval of WeChat Work and Feishu developer documentation, enabling AI assistants to query API references without switching browsers.
    20 npm
    19
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides MCP tools to list and search OpenAI Agents SDK documentation, enabling LLMs to retrieve documentation topics and content via natural language queries.
    61 PyPI
    MIT