PayZuPayZu Docs

MCP server

MCP 是一个开放协议,让 AI 助手通过 JSON-RPC 调用外部工具。payzu-mcp-pix 暴露了 Pix Processamento API 的 29 个精选 tools,具备可读性强的命名(pix.createaccount.balance 等)、类型校验和一致的错误处理。

何时用 MCP、SKILL.md 还是 SDK

场景使用
AI 在你的 PayZu 账户上执行真实调用(创建 Pix、查看余额等)MCP
AI 生成代码后你粘贴到自己的应用SKILL.md
你的生产应用与 PayZu 通信SDK(npm install payzu-pix)

安装

Claude Desktop

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

{
  "mcpServers": {
    "payzu-pix": {
      "command": "npx",
      "args": ["-y", "payzu-mcp-pix"],
      "env": {
        "PAYZU_TOKEN": "<你的-dashboard-token>"
      }
    }
  }
}

重启 Claude Desktop。问一句"我的 PayZu 余额是多少?"试试,Claude 会自动调用 account.balance

Cursor

项目里的 .cursor/mcp.json(或全局 ~/.cursor/mcp.json):

{
  "mcpServers": {
    "payzu-pix": {
      "command": "npx",
      "args": ["-y", "payzu-mcp-pix"],
      "env": { "PAYZU_TOKEN": "..." }
    }
  }
}

Continue、Codeium 及其他

配置一致(都遵循 MCP 标准)。详见包的 README

配置

Env var必填默认值说明
PAYZU_TOKEN,来自 abrirconta.payzu.com.br 的 Bearer token
PAYZU_API_URLhttps://api.payzu.processamento.com/v1whitelabel 场景下覆盖

tools 清单(29 个)

所有名称采用 snake_case,按域名空间分组。每个 tool 的 description 包含直达文档对应 endpoint 页面的链接。

Pix 收款(4)

ToolHTTP
pix.createPOST /pix
pix.getGET /pix
pix.qr_codeGET /pix/qr-code/{id}
pix.proofGET /proof/{id}

提现(6)

ToolHTTP
withdraw.createPOST /withdraw
withdraw.getGET /withdraw
withdraw.by_qrPOST /withdraw/qrcode
withdraw.read_qrPOST /pix/qrcode/read
withdraw.dictGET /pix-key/{key}
withdraw.proofGET /withdraw/proof/{id}

内部转账(2)

ToolHTTP
internal_transfer.createPOST /internal-transfer
internal_transfer.getGET /internal-transfer

账户(2)

ToolHTTP
account.profileGET /user
account.balanceGET /user/balance

报表(6)

ToolHTTP
reports.list_transactionsGET /user/transactions
reports.get_transactionGET /user/transactions/{id}
reports.create_csvPOST /user/report
reports.list_jobsGET /user/reports
reports.get_jobGET /user/report/{id}
reports.downloadGET /user/report/{id}/download

callbacks(4)

ToolHTTP
callbacks.listGET /user/callbacks
callbacks.getGET /user/callback/{id}
callbacks.resendPOST /user/callback/{id}/resend
callbacks.resend_bulkPOST /user/callbacks/resend

MED 违规(5)

ToolHTTP
infractions.listGET /infractions
infractions.getGET /infractions/{id}
infractions.create_defensePOST /infractions/{id}/defense
infractions.list_defensesGET /infractions/{id}/defenses
infractions.get_defenseGET /infractions/{id}/defense/{defenseId}

默认约定

  • 金额以雷亚尔小数形式传入,tool 拒绝分单位(9990 会触发校验错误;必须是 99.90)。
  • 创建类调用必须传 clientReference(idempotência)。
  • 创建类调用必须传 callbackUrl(否则没人通知你状态)。
  • 自动重试 5xx/429,采用指数退避 + jitter(最多 3 次)。
  • 错误信息包含 requestId,如需协助直接复制给支持团队。
  • 零 admin endpoints,仅暴露公开/客户端层面。

使用示例(Claude Desktop)

配置完成后,可以这样对话:

"创建一个 R$ 50 的 PayZu 收款,reference 为 order-abc"

Claude 会选择 pix.create,校验参数并调用 API。在 chat 里返回 idqrCodeTextqrCodeUrl

"我有多少余额?"

Claude 调用 account.balance 并返回数字。

"列出最近 10 条已取消的交易"

Claude 调用 reports.list_transactions,传入 status: CANCELED, limit: 10

支持

On this page