psbcwm-mcp
v0.2.3
Published
中邮理财(psbc-wm.com)公开数据 STDIO MCP 服务,通过 npx 启动。
Maintainers
Readme
psbcwm-mcp
中邮理财(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/1100099C88attachment_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 在涉及"哪个理财好"或"能不能买"的问题时,应只展示客观字段(历史收益、风险等级、起购条件), 不给出主观投资建议。
