
Paypay Mcp
io.github.mrslbtPublished by GitHub account mrslbtv0.2.1Updated Oct 24, 2026
PayPay QR payments for AI agents: QR codes, status, refunds, cancels. Bilingual JP/EN.
Overview
Local MCP server that lets an AI assistant create PayPay QR payments, check payment status, and optionally refund or cancel payments.
- What you can do
- Create dynamic PayPay QR codes and return the payment URL, deeplink and a rendered PNG image, plus invalidate a QR code before payment is made. Fetch payment details and poll until a payment reaches a terminal state. Issue full or partial refunds and cancel payments whose state is unclear, both only when explicitly enabled. Read bundled reference resources on the PayPay OPA API, payment lifecycle and the active non-secret configuration. Use built-in prompts for accepting a single payment, refunding the last payment and debugging a stuck payment.
- When to use it
- Useful when a merchant with PayPay Open Payment API credentials wants an assistant to take QR payments, monitor their status, or handle refunds and cancellations from a chat or agent workflow. Test against the sandbox first before routing real payments.
- Requirements
- Runs locally via npm (Node.js 20+ with TLS 1.2+). Requires PAYPAY_API_KEY, PAYPAY_API_SECRET and PAYPAY_MERCHANT_ID from the PayPay Developer Dashboard. PAYPAY_ENV defaults to sandbox; production needs completed PayPay merchant onboarding. Optional HTTP mode uses MCP_TRANSPORT, MCP_HTTP_PORT, MCP_HTTP_HOST, MCP_AUTH_TOKEN and MCP_HTTP_ALLOWED_ORIGINS.
Installation
In SourceWeft
- Open Paypay Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit 36eea75
Tools
0Version history
1- v0.2.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts