
Paypay Mcp
io.github.mrslbt由 GitHub 帳號 mrslbt 發布v0.2.1更新於 Oct 24, 2026
PayPay QR payments for AI agents: QR codes, status, refunds, cancels. Bilingual JP/EN.
概覽
本機 MCP 伺服器,讓 AI 助理建立 PayPay QR 碼付款、查詢付款狀態,並可選擇退款或取消付款。
- 可以做什麼
- 建立動態 PayPay QR 碼,回傳付款連結、deeplink 與產生的 PNG 圖片,並可在付款前使 QR 碼失效。查詢付款詳情,並輪詢直到付款進入終止狀態。發起全額或部分退款,以及取消狀態不明的付款,兩者都需明確開啟。讀取內建參考資源,了解 PayPay OPA API、付款生命週期與目前非機密設定。使用內建提示完成單筆收款、退款上一筆付款與排查卡住的付款。
- 適用情境
- 適合已具備 PayPay Open Payment API 憑證的商家,讓助理在聊天或代理流程中受理 QR 碼付款、追蹤狀態或處理退款與取消。在接入真實付款前應先在沙盒環境測試。
- 執行需求
- 透過 npm 在本機執行(Node.js 20+,需 TLS 1.2+)。需要來自 PayPay 開發者後台的 PAYPAY_API_KEY、PAYPAY_API_SECRET 與 PAYPAY_MERCHANT_ID。PAYPAY_ENV 預設為 sandbox;正式環境需完成 PayPay 商家入駐。選用 HTTP 模式使用 MCP_TRANSPORT、MCP_HTTP_PORT、MCP_HTTP_HOST、MCP_AUTH_TOKEN 與 MCP_HTTP_ALLOWED_ORIGINS。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Paypay Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
paypay-mcp
[npm version] [npm downloads] [MCP Badge] [License: MIT]
Model Context Protocol server for the PayPay Open Payment API.
Works with Claude Desktop, Claude Code, Cursor, Windsurf, Zed, ChatGPT Apps SDK, and any other MCP-compatible client. Tool descriptions are provided in English and Japanese.
Status
v0.2.x — production-capable, not yet battle-tested at scale.
The server runs cleanly against PayPay's production Open Payment API once PAYPAY_ENV=production is set with approved merchant credentials. It has not yet processed meaningful real-world volume. If you are routing real payments through it, pin the version and review the source first.
Tools
Prompts
accept_single_payment, refund_last_payment, debug_stuck_payment.
Resources
Install
One-click:
[Install in Cursor] [Install in VS Code]
Or via npm:
Configuration
Credentials come from the PayPay Developer Dashboard.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Code
Cursor
Add to ~/.cursor/mcp.json with the same shape as Claude Desktop.
Remote hosting
Run in HTTP mode. Public binds require MCP_AUTH_TOKEN; the server refuses to start otherwise.
Endpoint: POST http(s)://<host>:3000/mcp (Streamable HTTP transport). Clients send Authorization: Bearer <MCP_AUTH_TOKEN>. CORS is closed by default.
For local testing the auth token can be omitted; the server binds to 127.0.0.1 and only accepts loopback connections.
Environments
Sandbox is the default. Production requires PayPay merchant onboarding (business verification and a contract) and must be enabled by explicitly setting PAYPAY_ENV=production.
Constraints
- Amounts are integer JPY.
- A payment can be canceled until 00:14:59 JST the day after the payment attempt. After that, use a refund.
- A single order can receive multiple partial refunds, each with a unique
merchantRefundId, up to the merchant-configured cap. - TLS 1.2+ required (Node 20+).
Development
Roadmap
v0.2: PreAuth + Capture, ContinuousPayments, DirectDebit, AccountLink QR, webhook signature verification, reconciliation tools.
v0.3: Native Payment (App Invoke + user JWT auth), Visa-partnership endpoints, OpenTelemetry tracing.
Safety
This server can move real money through the PayPay OPA API. Key safeguards:
- Refund and cancel tools are disabled by default.
refund_paymentandcancel_paymentare only registered whenPAYPAY_ENABLE_REFUNDS=trueorPAYPAY_ENABLE_CANCELS=true. Only enable them in trusted agent contexts where tool inputs cannot be influenced by untrusted content. - Sandbox is the default. Production requires an explicit
PAYPAY_ENV=production, plus completed PayPay merchant onboarding. Always test against sandbox first. - Unique merchantPaymentId and merchantRefundId per call. PayPay deduplicates by these IDs, so reusing one will either fail or target an older payment. Generate a fresh ID for each new payment or refund.
- Tools carry MCP safety annotations. Read-only tools (
get_payment_details,wait_for_payment) are flaggedreadOnlyHint; money-moving and destructive tools (refund_payment,cancel_payment,delete_qr_code) are flaggeddestructiveHintso compatible clients can warn you before the call. These are advisory hints — the real guard is the gating above.
Even with these gates on, review any money-moving request before approving the tool call. Treat tool inputs derived from model output as untrusted.
Disclaimer
This is an unofficial, community-built MCP server. Not affiliated with, endorsed by, or sponsored by PayPay Corporation. PayPay is a registered trademark of its respective owners. Use at your own risk. The author accepts no liability for funds lost through misuse, prompt injection, or bugs.
License
來源:README.md,提交 36eea75
工具
0版本歷史
1- v0.2.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分