xiatian-pay-mcp
Provides tools for Alipay payment integration, including RSA2 signing of request parameters, precreate orders for QR code payments, building PC/mobile website payment URLs, and verifying asynchronous payment notifications.
Provides tools for WeChat Pay V3 integration, including generating Authorization signature headers, creating Native and JSAPI orders, verifying callback signatures, and decrypting AES-256-GCM encrypted notification resources.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xiatian-pay-mcp生成支付宝当面付二维码,订单 A001,金额 9.9 元"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
夏天pay全球通 MCP Server · xiatian-pay-mcp
让 AI 助手(Trae / Cursor / Claude Desktop / Dify / Coze 等任何 MCP 客户端)一句话完成微信支付 V3与支付宝的签名、下单、回调验签。零依赖、纯本地运行、不触碰任何资金。
合规定位:本工具是开发者技术工具,只生成签名/请求与校验回调;资金始终在商户自己的微信/支付宝商户号内结算,本工具不参与资金清算(无「二清」)。
能力(11 个工具)
工具 | 作用 | 是否联网 |
| 离线生成微信 V3 Authorization 签名头 | 否 |
| Native 扫码下单,返回 | execute=true 时联网 |
| JSAPI/小程序下单,返回 wx.invoke 调起参数 | execute=true 时联网 |
| 微信异步通知 RSA-SHA256 验签 | 否 |
| 回调 resource AES-256-GCM 解密 | 否 |
| 支付宝 RSA2 参数签名 | 否 |
| 当面付预下单,返回 | execute=true 时联网 |
| 电脑网站/手机网站支付跳转链接 | 否 |
| 支付宝异步通知验签 | 否 |
| 托管平台免凭证建单(可选 SaaS) | 是 |
| 托管平台查单 | 是 |
Related MCP server: Antom MCP Server
安装与接入
要求 Node.js ≥ 18。
npm install -g xiatian-pay-mcp # 发布后;当前可直接用源码目录MCP 客户端配置(Trae / Claude Desktop 等的 mcp.json):
{
"mcpServers": {
"xiatian-pay": {
"command": "npx",
"args": ["-y", "xiatian-pay-mcp"],
"env": {
"XIATIAN_WX_MCHID": "1900000001",
"XIATIAN_WX_APPID": "wxxxxxxxx",
"XIATIAN_WX_CERT_SERIAL": "证书序列号",
"XIATIAN_WX_PRIVATE_KEY_PATH": "C:/certs/apiclient_key.pem",
"XIATIAN_WX_PLATFORM_CERT_PATH": "C:/certs/wx_platform_cert.pem",
"XIATIAN_WX_APIV3_KEY": "32位APIv3密钥",
"XIATIAN_ALIPAY_APPID": "2021000000000001",
"XIATIAN_ALIPAY_PRIVATE_KEY_PATH": "C:/certs/alipay_app_private.pem",
"XIATIAN_ALIPAY_PUBLIC_KEY_PATH": "C:/certs/alipay_public.pem",
"XIATIAN_PLATFORM_URL": "https://pay.your-domain.com",
"XIATIAN_API_KEY": "托管平台API密钥(可选)"
}
}
}
}所有环境变量均可省略,改为调用工具时在
cred参数内传入(PEM 全文或 .pem 文件路径均可)。建议生产环境用环境变量/文件路径,避免密钥出现在对话上下文中。
使用示例(对 AI 说的话)
「帮我生成微信 Native 扫码下单请求,订单号 T1001,金额 199.00 元,商品‘降噪耳机’,回调 https://example.com/cb」
「这是微信回调的 headers 和原始 body,帮我验签并解密 resource」
「用支付宝当面付给订单 A20260916001(9.9 元)生成二维码链接,沙箱环境」
「生成支付宝电脑网站支付跳转链接,return_url 是 https://example.com/ok」
「校验这段支付宝异步通知的签名是不是真的」
测试
node test/run-tests.js内置 32 项协议级测试:MCP 握手/工具清单/真实 RSA 签名验签/篡改检测/AES-GCM 加解密闭环/离线下单构造/错误处理,全部离线可跑。
凭证准备指引
微信支付:pay.weixin.qq.com → 账户中心 → API 安全 → 设置 APIv3 密钥、申请 API 证书(apiclient_key.pem + 证书序列号);平台证书通过
/v3/certificates获取;另需已开通 Native/JSAPI 产品与 AppID。支付宝:open.alipay.com → 创建网页/移动应用 → 用密钥工具生成 RSA2 密钥对,上传应用公钥,保存支付宝公钥;签约当面付/电脑网站/手机网站支付;沙箱网关自动支持。
安全与边界
本项目不存储、不上传任何商户密钥;除显式下单工具外全部离线计算。
不提供资金代收、代付、清算能力;不持有支付牌照,不做「二清」。
商户需自行承担微信/支付宝平台资质、ICP、税务合规义务。
License
MIT
Available Tools
11 toolsalipay_build_pay_urlA
支付宝生成支付跳转链接(离线,不发起请求):product=page 电脑网站 alipay.trade.page.pay;wap 手机网站 alipay.trade.wap.pay。
| Name | Required | Description | Default |
|---|---|---|---|
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| order | Yes | ||
| product | Yes | ||
| quitUrl | No | ||
| sandbox | No | ||
| notifyUrl | No | ||
| returnUrl | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full transparency burden. It explicitly discloses that the tool is offline and does not initiate a request, and it reveals the internal mapping of the product parameter to Alipay trade methods. However, it does not disclose credential requirements, signing behavior, or error handling, so it is not fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense sentence that front-loads the tool's purpose and offline behavior before enumerating the product-to-API mapping. Every phrase earns its place; there is no repetition or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has moderate complexity with nested order and cred objects, seven parameters, and no output schema, yet the description says nothing about the return value, how to consume the generated URL, sandbox behavior, or failure cases beyond the product mapping. The offline note helps, but the overall context is too thin for an agent to invoke the tool confidently without further assumptions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 14%, so the description must compensate. It adds crucial semantics for the product enum by linking each value to a specific Alipay API, and clarifies cred omission via environment variables. But it does not explain order fields (outTradeNo, amountYuan, subject) or URL-related parameters like notifyUrl, returnUrl, quitUrl, and sandbox, leaving a significant portion of the schema unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names the specific verb (生成/generate) and resource (支付宝支付跳转链接/Alipay payment redirect URL), and adds the key qualifier '离线,不发起请求' (offline, no request), which separates it from network-issuing payment tools. It even maps product values to the exact Alipay APIs (page → alipay.trade.page.pay, wap → alipay.trade.wap.pay), making the purpose unmistakable even among sibling Alipay tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: when you need an offline Alipay payment redirect URL. It does not explicitly name alternatives or state when not to use it, such as when an actual Alipay request or order creation is required, so the guidance is present but only implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
alipay_precreateA
支付宝当面付预下单:execute=false 仅返回已签名请求规格;true 真实调用返回 qr_code 二维码链接。
| Name | Required | Description | Default |
|---|---|---|---|
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| order | Yes | ||
| execute | No | ||
| sandbox | No | 是否沙箱环境 | |
| notifyUrl | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It does disclose the split between dry-run and actual invocation, which is valuable. However, it does not explain side effects of the real call, authentication/credential expectations, error behavior, or reversibility, leaving gaps for a tool that can perform a real external API call.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single compact sentence that front-loads the tool's purpose and immediately clarifies the critical execute behavior. Every clause adds useful information and there is no padding or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given moderate complexity with nested objects, no output schema, and no annotations, the description is adequate but not complete. It explains the main modes and the QR code output, but leaves parameter details, authentication fallbacks, and broader behavioral expectations to the schema or agent inference.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 40%, so the description needs to compensate for undocumented parameters. It only adds meaning for the execute parameter; the order object fields, cred, sandbox, and notifyUrl are not explained in the description. Some schema descriptions exist, but the description does not add enough value to cover the low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as Alipay Face-to-Face Payment pre-ordering with a specific resource and output (qr_code). It does not explicitly distinguish itself from sibling tools like alipay_sign_params or alipay_build_pay_url, but the verb and resource are specific enough that the core purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on the execute flag: execute=false returns a signed request spec, while execute=true performs a real call and returns a QR code. This gives clear context for the two main usage modes, though it does not mention when to prefer this tool over sibling tools or any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
alipay_sign_paramsA
支付宝:对业务参数做 RSA2 签名,返回带 sign 的完整参数(可直接 POST 到网关)。
| Name | Required | Description | Default |
|---|---|---|---|
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| extra | No | 其他公共参数,如 notify_url | |
| method | Yes | 如 alipay.trade.precreate | |
| timestamp | No | ||
| bizContent | Yes | biz_content 业务参数对象 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden. It discloses the core behavior—RSA2 signing and returning a complete signed parameter set—but it does not mention credential requirements, default timestamp generation, or error behavior. This is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. It states the action, algorithm, output, and intended downstream use in very few words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description plus schema is enough for a basic invocation: method and bizContent are required, cred is optional, and the output is a signed parameter set. However, with no output schema and no mention of credential fallback details or usage boundaries, some gaps remain for an agent navigating among many sibling payment tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 80%, so the baseline is 3. The description adds no additional parameter-level meaning, leaving timestamp undocumented, but the schema already explains most parameter purposes.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific operation: signing Alipay business parameters with RSA2 and returning the complete parameters including sign. It does not name sibling tools, so it misses explicit differentiation, but the verb and resource are specific enough for an agent to understand the tool's role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the description: use this when you need to sign Alipay parameters before POSTing to the gateway. However, it does not provide explicit when-to-use or when-not-to-use guidance, nor does it distinguish itself from sibling tools like alipay_precreate or alipay_build_pay_url.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
alipay_verify_notifyA
支付宝异步通知验签:传入全部回调参数(含 sign),用支付宝公钥校验。返回 {valid:boolean}。
| Name | Required | Description | Default |
|---|---|---|---|
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| params | Yes | 回调的全部表单参数 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It does disclose the verification method (Alipay public key), the required input scope, and the return contract. However, it does not state behavior on verification failure (returns false vs throws), whether the tool is side-effect free, or any other runtime behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single compact sentence that front-loads the action and resource, states required inputs, and gives the return shape. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity verification tool with a rich credential schema and an explicit return contract, the description is nearly complete. The main gaps are explicit failure semantics and a note that this is a pure verification operation with no side effects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds meaningful semantics beyond the schema by specifying that all callback parameters must be passed and must include sign, and that verification uses the Alipay public key — which clarifies which credential field matters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses a specific verb (验签/verify signature), a specific resource (支付宝异步通知/Alipay async notification), and states the return shape {valid:boolean}. This clearly differentiates it from the sibling wechat_verify_callback by platform and notification context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes the intended use case clear: verify Alipay async callback notifications by passing all callback parameters including sign. It does not explicitly name alternatives or state when not to use it, but the Alipay-vs-WeChat platform context is unambiguous from the description and sibling set.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
platform_create_orderA
夏天pay托管平台:免商户凭证建单(需要环境变量 XIATIAN_PLATFORM_URL + XIATIAN_API_KEY)。返回订单号与收银台链接。
| Name | Required | Description | Default |
|---|---|---|---|
| mchNo | No | ||
| scene | No | ||
| channel | No | 首选通道,如 wechat/alipay | |
| subject | Yes | ||
| amountYuan | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose key behavior: no merchant credentials needed, required environment variables, and return values. It does not mention side effects, error conditions, or idempotency, but the core behavioral profile is reasonably transparent for an order-creation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single compact sentence that front-loads the platform name and key advantage, then states prerequisites and return values. Every piece of information earns its place with no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential purpose, prerequisites, and return values, which is enough for a basic call. However, with no annotations, no output schema, and weak parameter documentation, it leaves scene/channel/mchNo semantics under-specified, so an agent may still be uncertain when constructing a full request.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 20% (only 'channel' has a description), and the tool description does not explain any parameters. The phrase '免商户凭证' weakly implies mchNo is not needed, but subject, amountYuan, scene, and channel semantics are left entirely to the schema, which mostly lacks descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool creates an order on the 夏天pay hosting platform and returns an order number and cashier link. It distinguishes itself from the direct WeChat/Alipay sibling tools by emphasizing '免商户凭证' (no merchant credentials), though it never names an alternative explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives clear context for when this tool is appropriate: when using the hosted platform without merchant credentials. It also states the required environment variables as prerequisites. However, it does not explicitly say when not to use it or name alternative sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
platform_query_orderA
夏天pay托管平台:按订单号查询实时支付状态(pending/success/failed/expired/refunded)。
| Name | Required | Description | Default |
|---|---|---|---|
| orderNo | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It adds useful behavioral detail about real-time status valueschers, but it does not explicitly state that the operation is read-only, whether authentication is required, or what happens for unknown/expired order numbers. The 'query' wording implies non-mutating behavior, but more disclosure would be helpful.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the key action and resource. No extraneous details are included, and the status enum adds useful information without bloating the text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter query tool without an output schema, the description gives enough context to select and invoke it: it names the lookup key, the operation, and the expected status values. It could be more complete by mentioning not-found/error behavior, but the low complexity makes the current description nearly sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema only defines orderNo as a required string with no description, and coverage is 0%. The description does clarify that the parameter is the order number used for lookup, which adds some meaning. However, it provides no format, source, or additional constraints beyond what the property name already suggests.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies a specific verb and resource: '按订单号查询实时支付状态' (query real-time payment status by order number). It also enumerates the possible status values (pending/success/failed/expired/refunded), which further clarifies the tool's scope and distinguishes it from sibling creation/verification tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this tool is for checking payment status by order number, but it does not explicitly state when to use it versus the sibling creation or verification tools. There is no mention of exclusions, prerequisites, or typical workflow context such as 'use after creating an order'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_build_authorizationA
微信支付V3:离线构造 Authorization 请求头(RSA-SHA256 签名),不发起网络请求。用于自建 HTTP 调用。
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | 接口路径(不含域名),如 /v3/pay/transactions/native | |
| body | No | 请求体原文(GET 传空串) | |
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| nonce | No | ||
| method | Yes | HTTP 方法,如 GET/POST | |
| timestamp | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral disclosure burden. It clearly discloses the offline behavior and signature algorithm, which is valuable. However, it does not mention what happens for omitted nonce/timestamp, whether credentials are required, or error behavior, leaving some important traits unspecified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no filler. It front-loads the core purpose, then adds the key safety distinction and intended use.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema and no annotations, so the description needs to explain the return value and usage details. It omits what the constructed header looks like, how to attach it to a request, and how optional parameters behave. For a tool with six parameters and a nested cred object, this is insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers url, body, cred, and method, but nonce and timestamp have no descriptions. The description adds no parameter-level meaning beyond mentioning RSA-SHA256 signing, and with 67% schema coverage it should compensate for the uncovered parameters but does not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: it constructs an offline WeChat Pay V3 Authorization header using RSA-SHA256 signing. It explicitly says no network request is made, which differentiates it clearly from network-calling siblings like wechat_create_native_order and wechat_verify_callback.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It tells the agent this is for self-built HTTP calls, giving a clear context for when to use it. It does not name alternatives or provide explicit when-not-to-use guidance, but the offline/no-network statement separates it from sibling network tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_create_jsapi_orderB
微信支付V3 JSAPI 下单(微信内/小程序):返回 prepay_id 与 wx.invoke("getBrandWCPayRequest") 调起参数。
| Name | Required | Description | Default |
|---|---|---|---|
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| order | Yes | ||
| openid | Yes | ||
| execute | No | ||
| notifyUrl | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions it 'returns prepay_id' and 'invoke parameters', but does not disclose that it actually initiates a payment order with WeChat, which has side effects (e.g., creating an unpaid order, potential charges). It doesn't mention authentication requirements, the need for valid credentials, or the fact that the tool makes a network call. The description lacks behavioral transparency for a mutation-like operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is concise and front-loads the core action (WeChat Pay V3 JSAPI order) and key output (prepay_id and invoke parameters). It is not verbose, but it lacks additional structured information that would be helpful, like usage examples or key parameter clarifications. It is appropriately sized but could be improved with more details without becoming wordy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (5 parameters, nested objects, no output schema, no annotations), the description is incomplete. It does not explain the purpose of each parameter, the required format of the 'order' object (e.g., amountFen in fen), or the meaning of 'execute' (whether it actually sends the request). It does not describe the return structure or error handling. The description leaves significant gaps that an agent would need to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is only 20%, meaning the schema itself does not describe most parameters. The description mentions returning prepay_id and invoke parameters, but does not explain the meaning of 'order', 'openid', 'notifyUrl', or the optional 'execute' flag. It does not clarify that 'openid' is the user's WeChat OpenID required for JSAPI, or the role of 'notifyUrl'. The description adds minimal value beyond the schema's field names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the tool's purpose: creating a JSAPI order for WeChat Pay V3, targeting WeChat in-app or mini-program environments, and returning both prepay_id and the parameters for wx.invoke('getBrandWCPayRequest'). This is specific with verb and resource, and it distinguishes itself from siblings like wechat_create_native_order (which is for Native payments) and alipay_precreate (Alipay).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context (WeChat in-app/mini-program) but does not explicitly state when to use this tool versus alternatives like wechat_create_native_order, which is for QR code payments. It does not mention that this requires an openid (user authorization) or that it is not for Alipay. The usage guidance is implied but not fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_create_native_orderA
微信支付V3 Native 扫码下单:execute=false 仅返回已签名的请求规格;true 真实调用微信 API 返回 code_url(二维码内容)。
| Name | Required | Description | Default |
|---|---|---|---|
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| order | Yes | ||
| execute | No | true=真实请求微信;false=仅构造(默认 true) | |
| notifyUrl | Yes | 微信异步回调 HTTPS 地址 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral disclosure burdenpa. It clearly explains that execute=false returns a signed request spec while execute=true calls the WeChat API and returns a code_url, giving the agent a concrete mental model of the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, dense sentence front-loads the core purpose and then explains both execution modes without wasted words. Every clause contributes essential routing or behavioral information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description compensates by specifying return expectations for both execute modes. Credential and order parameter details live in the input schema, and the description covers the remaining ambiguity around what each mode returns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already covers 75% of parameter descriptions, so the baseline is 3. The main description adds meaningful semantics for the execute parameter by stating the actual outputs for each value, which goes beyond the schema's 'true=真实请求微信;false=仅构造' wording.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb and resource: creating a WeChat Pay V3 Native scan-code order. It also distinguishes the two execution modes, which separates it clearly from sibling tools like wechat_create_jsapi_order and alipay_precreate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'Native 扫码下单' makes the intended use case clear, and the execute flag explains when to sign-only versus actually call WeChat. However, it does not explicitly state when not to use this tool or name alternatives, so it stops short of full exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_decrypt_callbackB
微信支付V3 回调 resource 解密:AES-256-GCM,密钥为 APIv3。返回交易明文 JSON。
| Name | Required | Description | Default |
|---|---|---|---|
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| nonce | Yes | ||
| ciphertext | Yes | ||
| associatedData | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. The description states the algorithm (AES-256-GCM), the key (APIv3), and the output (transaction plaintext JSON), which is useful. However, it does not disclose potential failure modes (e.g., what happens if decryption fails, invalid key, wrong nonce), whether the tool validates the callback signature, or any side effects. For a decryption tool, the behavior is mostly deterministic, but the lack of error-handling context is a gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence that packs in the purpose, algorithm, key, and output format. It is front-loaded with the core purpose and uses technical shorthand efficiently. It could be slightly more structured (e.g., separating the output statement), but it is appropriately concise for a technical tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (AES-GCM decryption with multiple parameters, nested cred object, no output schema), the description is somewhat thin. It covers the algorithm and key, but does not explain the relationship between ciphertext, nonce, and associatedData, nor the expected format of the input (e.g., base64-encoded ciphertext). It also doesn't mention that the output is the decrypted transaction JSON, which is stated, but not the structure of that JSON. The cred object's flexibility (env vars vs direct fields) is in the schema, so that's covered. Overall, the description is adequate for a simple decryption tool but lacks detail on input formats and error cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 25%, so the description must compensate. The description mentions the key (APIv3) and the algorithm, which relates to the 'apiV3Key' field in the cred object, but it does not explain the meaning of ciphertext, nonce, associatedData, or the cred object structure beyond what the schema provides. The schema has a description for cred (credentials can be omitted, use env vars, PEM fields accept full text or file path), but the other parameters (nonce, ciphertext, associatedData) have no descriptions. The tool description adds context about the algorithm but does not explain the parameters' roles in the decryption process. This is a moderate gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: decrypting WeChat Pay V3 callback resource data using AES-256-GCM with the APIv3 key, and returning the transaction plaintext JSON. It identifies the specific operation (decrypt), the resource (WeChat Pay V3 callback resource), and the algorithm/key. However, it doesn't explicitly distinguish it from the sibling wechat_verify_callback, which is a related but different operation (verification vs decryption).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context: it is for decrypting the 'resource' field in WeChat Pay V3 callbacks. It mentions the algorithm and key, which tells the agent when this tool is applicable (when dealing with encrypted callback resources). However, it does not explicitly state when to use this tool versus wechat_verify_callback or other siblings, nor does it provide exclusions or alternative routing. The context is clear enough for a knowledgeable agent but lacks explicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_verify_callbackA
微信支付V3 异步通知验签:用微信支付平台证书校验 Wechatpay-Signature。返回 {valid:boolean}。
| Name | Required | Description | Default |
|---|---|---|---|
| cred | No | 凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径) | |
| nonce | Yes | 请求头 Wechatpay-Nonce | |
| rawBody | Yes | 请求体原始字符串(不可格式化) | |
| signature | Yes | 请求头 Wechatpay-Signature | |
| timestamp | Yes | 请求头 Wechatpay-Timestamp |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description is the only behavioral contract. It clearly says verification is done with the WeChat Pay platform certificate and that the result is {valid:boolean}. However, it doesn't describe failure behavior (e.g., invalid signature or certificate), credential sourcing, or whether any network/state effects occur; these details are left to the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single two-part sentence: it states the use case first, then the action and return value. No filler words or repeated schema content; it is well front-loaded for quick scanning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a verification tool with no annotations and no output schema, the description covers the key selection cue (WeChat Pay V3 callback), the verification mechanism (platform certificate), and the return type (valid boolean). It could be more complete by stating error/edge-case behavior, but the schema covers all parameters completely and the essential invocation contract is present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%; timestamp, nonce, signature, rawBody, and cred all have explanatory descriptions, including the instruction that rawBody must not be formatted. The description itself does not add parameter-level detail beyond naming Wechatpay-Signature, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names the exact operation ('验签' / verify signature) on a specific resource ('微信支付V3 异步通知' / WeChat Pay V3 callback notification) and states the return shape. It clearly separates this tool from siblings like wechat_decrypt_callback, which handles decryption rather than verification.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It identifies the triggering context (WeChat Pay V3 asynchronous notification) and the core task (verifying the Wechatpay-Signature with the platform certificate). It does not explicitly mention when not to use it or name alternatives such as wechat_decrypt_callback or alipay_verify_notify, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v1.0.0- First observed
alipay_build_pay_url - First observed
alipay_precreate - First observed
alipay_sign_params - First observed
alipay_verify_notify - First observed
platform_create_order - First observed
platform_query_order - First observed
wechat_build_authorization - First observed
wechat_create_jsapi_order - First observed
wechat_create_native_order - First observed
wechat_decrypt_callback - First observed
wechat_verify_callback
TDQS
Scored across 11 tools
Provider prefixes (wechat_, alipay_, platform_) cleanly separate the three domains, and each tool has a distinct action. Minor ambiguity exists because wechat_create_native_order and alipay_precreate both have an execute=false mode that returns signed request specs, overlapping somewhat with the dedicated signing utilities.
Names generally follow a provider_verb_noun snake_case pattern, such as platform_create_order, wechat_decrypt_callback, and alipay_verify_notify. The pattern is slightly weakened by alipay_precreate (verb only) and the mix of verbs like build, sign, create, and precreate, but the names remain readable and predictable.
11 tools is well-scoped for a multi-provider payment server, covering WeChat Pay, Alipay, and the hosted platform with no obvious redundancy. Each tool earns its place and the count supports practical agent workflows without overwhelming selection.
The server covers order creation, querying, signing, and callback verification well, but lacks refund or close/cancel operations for both WeChat Pay and Alipay. This leaves a notable gap in the common payment lifecycle, forcing agents to handle refunds outside the MCP server.
Maintenance
Related MCP Connectors
Hong Kong payments for AI agents — Alipay / WeChat Pay via Stripe. Never holds funds.
Taiwan payments (ECPay 綠界 + NewebPay 藍新) & e-invoices for AI agents. Stateless, never holds funds.
Vietnam payments for AI agents — MoMo wallet QR, ATM, cards. Zero-setup sandbox. Never holds funds.
Pakistan payments for AI agents — Safepay checkout via Safepay. Never holds funds.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to interact with multiple payment providers (Stripe, Paystack) through a unified API. Supports payment initialization, verification, refunds, customer management, and invoicing without requiring knowledge of specific provider implementations.2-

Antom MCP Serverofficial
AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) compatible server that integrates Ant International's Antom payment APIs, enabling AI assistants to handle payment and refund operations seamlessly.57MIT
AlipayPlus MCP Serverofficial
AlicenseAqualityDmaintenanceIntegrates Ant International's AlipayPlus payment APIs, enabling AI assistants to handle payment and refund operations seamlessly.68MIT- AlicenseAqualityBmaintenanceAn MCP server that exposes Alipay AI Pay capabilities to AI agents, enabling skill discovery, payment integration guides, and merchant onboarding workflows via Alipay's payment APIs.4114 npmMIT