
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
partner-mcp-server-test
Advanced tools
@tenpay/partner-mcp-server
是微信支付官方的 MCP Server(服务商模式),让你可以轻松将微信支付的下单、查单、退款等能力集成到你的 LLM 应用或智能工具中,快速实现具备支付能力的智能体。
要使用微信支付 MCP Server,你需要具备微信支付服务商身份,并获取相关密钥和参数。
在项目根目录的 .cursor/mcp.json
文件中加入如下配置:
{
"mcpServers": {
"wxpay-mcp": {
"command": "npx",
"args": ["-y", "partner-mcp-server"],
"env": {
"WECHATPAY_APP_ID": "wxdxxxxxxebe76",
"WECHATPAY_MCHID": "24xxxxxx01",
"WECHATPAY_SUB_MCHID": "24xxxxxx33",
"WECHATPAY_MCH_SERIAL_NUMBER": "1B1DF2B3xxxxxB953F8",
"WECHATPAY_PRIVATE_KEY": "xxxxxxx",
"WECHATPAY_NOTIFY_CALLBACK_URL": "https://pay.weixin.qq.com/xxxxxxxxxxx"
}
}
}
}
在 cline_mcp_settings.json
文件中加入:
{
"mcpServers": {
"wxpay-mcp": {
"command": "npx",
"args": ["-y", "partner-mcp-server"],
"env": {
"WECHATPAY_APP_ID": "wxdxxxxxxebe76",
"WECHATPAY_MCHID": "24xxxxxx01",
"WECHATPAY_SUB_MCHID": "24xxxxxx33",
"WECHATPAY_MCH_SERIAL_NUMBER": "1B1DF2B3xxxxxB953F8",
"WECHATPAY_PRIVATE_KEY": "xxxxxxx",
"WECHATPAY_NOTIFY_CALLBACK_URL": "https://pay.weixin.qq.com/xxxxxxxxxxx"
},
"disable": false,
"autoApprove": []
}
}
}
只需合理配置 Server 启动命令 npx -y partner-mcp-server
,并设置上述环境变量即可。
npm run build
,然后在 MCP Client 中用 node <path-to-dist/index.js>
启动。npm run start:http
,环境变量放在根目录 .env
文件中,自动读取。微信支付 MCP Server 通过环境变量接收参数,主要包括:
变量名 | 说明 | 是否必需 |
---|---|---|
WECHATPAY_APP_ID | 微信开放平台 AppID | 必需 |
WECHATPAY_MCHID | 服务商商户号 | 必需 |
WECHATPAY_SUB_MCHID | 子商户号 | 必需 |
WECHATPAY_MCH_SERIAL_NUMBER | 商户API证书序列号 | 必需 |
WECHATPAY_PRIVATE_KEY | 商户API私钥 | 必需 |
WECHATPAY_NOTIFY_CALLBACK_URL | 支付/退款结果通知回调地址 | 必需 |
其他参数 | 详见微信支付官方文档 | 视场景而定 |
工具名称 | 描述 | 输入参数 | 输出 |
---|---|---|---|
create-native-payment | 创建微信 Native 支付订单,返回二维码链接,适合 PC/移动扫码支付 | - description: 商品描述 - out_trade_no: 商户订单号 - amount: 金额(分) | - code_url: 支付二维码链接 |
create-jsapi-payment | 创建微信 JSAPI 支付订单,返回支付链接,适合公众号/小程序内支付 | - description: 商品描述 - out_trade_no: 商户订单号 - sub_openid: 用户openid - amount: 金额(分) | - mweb_url: 支付跳转链接 |
query-order-by-out-trade-no | 查询订单支付状态 | - out_trade_no: 商户订单号 | - 订单状态、金额等 |
create-native-payment
):适合桌面端/移动端扫码支付场景。推荐在 PC 网站、H5 页面等场景下使用。create-jsapi-payment
):适合在微信内(公众号、小程序)直接调起支付的场景。建议在 Prompt 或产品文档中明确你的应用场景,帮助 LLM 智能体自动选择合适的支付方式。
export
设置,或放入 .env
文件中自动加载。本工具基于微信支付开放平台能力,使用时请遵守微信支付开发者协议及相关法律法规。
如需进一步帮助或有建议,欢迎提交 issue 或参与社区讨论。
FAQs
微信支付服务商MCP Server
The npm package partner-mcp-server-test receives a total of 8 weekly downloads. As such, partner-mcp-server-test popularity was classified as not popular.
We found that partner-mcp-server-test demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.