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

psbcwm-mcp

v0.2.3

Published

中邮理财(psbc-wm.com)公开数据 STDIO MCP 服务,通过 npx 启动。

Readme

psbcwm-mcp

npm node license

中邮理财(psbc-wm.com)公开数据的 STDIO MCP 服务, 通过 Model Context Protocol 把产品列表、净值历史、 阶段/年度收益、公告披露等接口暴露给 AI Agent。

安装即用:

npx -y psbcwm-mcp

工具列表

| 工具 | 必填 | 主要可选 | 用途 | |---|---|---|---| | psbcwm_get_hot_products | — | — | 首页 8 个热销产品 | | psbcwm_search_products | — | keywords, prd_template_code, base_days, min_subs_amount_by_indi, sale_object_indi, sale_object_inst, ishot, page_size, page_num, sort, order | 多条件筛选 | | psbcwm_get_product_detail | wp_code | — | 单产品详情 + 业绩比较基准 + 说明书 URL | | psbcwm_get_product_nav_history | wp_code | page_size (8), page_num (1) | 净值历史 | | psbcwm_get_product_yield | wp_code | base_days | 阶段收益 + 历年年度收益 | | psbcwm_list_announcements | attachment_type | wp_code, page_size (10), page_num (1) | 公告 / 报告列表 | | psbcwm_get_announcement | attachment_url | return_base64 (false) | 公告原文(HTML 去标签 / PDF base64) |

关键参数枚举

  • prd_template_code:1300 开放式净值 / 1309 定开净值 / 1311 持有期 / 1303 封闭式 / 1310 客户周期 / 1702 现金管理
  • base_days:30 / 31-180 / 181-365 / 365+
  • attachment_type:XS 销售文件 / PEN 发行公告 / MSN 到期公告 / NVN 净值公告 / CAN 定期公告 / QT 临时公告 / ZSG 重大事项公告
  • wp_code 示例:2201JB0058 / 1801LB0001 / 1100099C88
  • attachment_url 形态:/upload/report/...htm 或 /upload/pdf/...pdf

返回值约定

  • 响应包在 JSON-RPC result.content[0].text 里,是 JSON 字符串,需要先 JSON.parse 再使用
  • 产品对象自动带中文辅助字段(直接给用户看,不要忽略):
    • _risk_text — 低 / 中低 / 中 / 中高 / 高
    • _currency_text — 人民币 / 美元 / 欧元 / 英镑 / 日元
    • _dividend_text — 现金分红 / 红利再投
    • _nav_str / _accumulative_nav_str — 净值 / 累计净值的字符串表示
  • 收益区间 _interval_text — 成立以来 / 近7日 / 近1月 / 近3月 / 近6月 / 近1年 / 近2年 / 近3年 / 近5年
  • 公告类型 attachment_type_text — 销售文件 / 发行公告 / 到期公告 / 净值公告 / 定期公告 / 临时公告 / 重大事项公告
  • 调用失败时 result.isError=true,text 里是错误描述

客户端配置

Codex CLI

~/.codex/config.toml:

[mcp_servers.psbcwm]
command = "npx"
args    = ["-y", "psbcwm-mcp"]

Claude Desktop

claude_desktop_config.json:

{
  "mcpServers": {
    "psbcwm": {
      "command": "npx",
      "args": ["-y", "psbcwm-mcp"]
    }
  }
}

WorkBuddy / 其他兼容 MCP 客户端

同 Claude Desktop 配置。

命令行

psbcwm-mcp              # 启动 STDIO MCP 服务(默认)
psbcwm-mcp -v|--version # 打印版本号并退出
psbcwm-mcp -h|--help    # 打印帮助并退出

系统要求

  • Node.js >= 18(使用原生 fetch / AbortController / ESM)
  • 网络可达 https://www.psbc-wm.com(WAF 需要 Referer / User-Agent,已内置)
  • 可选:HTTPS_PROXY 环境变量走公司代理

开发

git clone <repo>
cd psbcwm-mcp
npm install
npm run build          # 编译 TS → dist/
node dist/index.js     # 本地起 STDIO 服务
node scripts/smoke.mjs # 冒烟测试:7 个工具能否被列出

发布到 npm

npm login              # 首次需要登录官方 registry
npm run build          # prepublishOnly 已自动执行
npm publish            # 推送到 https://registry.npmjs.org/

发布成功后,全球任何机器都能通过 npx -y psbcwm-mcp 拉起服务,无需事先安装。 详情见 PUBLISH.md。

版本兼容

  • 0.2.x:当前大版本。Node.js 实现,依赖官方 @modelcontextprotocol/sdk。
  • 0.1.x:旧 Go 单文件二进制版本(已归档到 legacy-go/),仅作历史参考,不再维护。

工具名、入参 schema、返回结构在 0.1.x → 0.2.x 完全保持兼容,老的 WorkBuddy 连接器 把 command 从 bin/psbcwm-mcp.exe 改为 npx -y psbcwm-mcp 即可升级。

风险提示

理财非存款,产品有风险,投资需谨慎。

本连接器仅提供中邮理财官网(psbc-wm.com)的历史客观数据(产品列表、净值、收益、公告披露), 不构成任何投资建议。AI 在涉及"哪个理财好"或"能不能买"的问题时,应只展示客观字段(历史收益、风险等级、起购条件), 不给出主观投资建议。

License

MIT