MCP server for the PayPay Open Payment API. Create QR codes, check payments, refunds, and cancellations. Tools documented in English and Japanese.
claude mcp add paypay-mcp -- npx -y paypay-mcp{
"mcpServers": {
"paypay-mcp": {
"command": "npx",
"args": ["-y", "paypay-mcp"],
"env": {
"PAYPAY_API_KEY": "<paypay_api_key>",
"PAYPAY_API_SECRET": "<paypay_api_secret>",
"MCP_HTTP_HOST": "<mcp_http_host>"
}
}
}
}PAYPAY_API_KEYPAYPAY_API_SECRETMCP_HTTP_HOSTResumen de MCP Servers
# paypay-mcp
[](https://www.npmjs.com/package/paypay-mcp)
[](https://www.npmjs.com/package/paypay-mcp)
[](https://lobehub.com/mcp/mrslbt-paypay-mcp)
[](LICENSE)
Model Context Protocol server for the [PayPay Open Payment API](https://www.paypay.ne.jp/opa/doc/v1.0/).
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
| Tool | Description |
|---|---|
| `create_qr_code` | Create a dynamic PayPay QR code. Returns the payment URL, deeplink, and a rendered PNG. |
| `get_payment_details` | Fetch the current status of a payment. |
| `wait_for_payment` | Poll until a payment reaches a terminal state. |
| `delete_qr_code` | Invalidate a QR code before payment. |
| `refund_payment` | Full or partial refund. **Disabled unless `PAYPAY_ENABLE_REFUNDS=true`.** |
| `cancel_payment` | Cancel a payment when its state is unclear (timeout or error). **Disabled unless `PAYPAY_ENABLE_CANCELS=true`.** |
## Prompts
`accept_single_payment`, `refund_last_payment`, `debug_stuck_payment`.
## Resources
| URI | Description |
|---|---|
| `paypay://docs/opa-reference` | Endpoint map, auth scheme, and status vocabulary for the PayPay OPA API. |
| `paypay://docs/payment-states` | Payment lifecycle and the cancel-vs-refund decision rule. |
| `paypay://config/current` | Non-secret view of the active config (env, merchantId, baseUrl, transport). |
## Install
One-click:
[](cursor://anysphere.cursor-deeplink/mcp/install?name=paypay&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInBheXBheS1tY3AiXX0=)
[](https://insiders.vscode.dev/redirect/mcp/install?name=paypay&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22paypay-mcp%22%5D%7D)
Or via npm:
```bash
npm install -g paypay-mcp
```
## Configuration
Credentials come from the [PayPay Developer Dashboard](https://developer.paypay.ne.jp/).
| Variable | Required | Description |
|---|---|---|
| `PAYPAY_API_KEY` | yes | OPA API Key ID |
| `PAYPAY_API_SECRET` | yes | OPA API Key Secret |
| `PAYPAY_MERCHANT_ID` | yes | Merchant ID |
| `PAYPAY_ENV` | no | `sandbox` (default) or `production` |
| `PAYPAY_ENABLE_REFUNDS` | no | Set to `true` to expose `refund_payment`. Disabled by default. |
| `PAYPAY_ENABLE_CANCELS` | no | Set to `true` to expose `cancel_payment`. Disabled by default. |
| `MCP_TRANSPORT` | no | `stdio` (default) or `http` |
| `MCP_HTTP_PORT` | no | Port when `MCP_TRANSPORT=http`. Default `3000`. |
| `MCP_HTTP_HOST` | no | Bind address. Default `127.0.0.1`. Public binds require `MCP_AUTH_TOKEN`. |
| `MCP_AUTH_TOKEN` | no | Bearer token required on inbound HTTP requests when set. Mandatory for non-loopback binds. |
| `MCP_HTTP_ALLOWED_ORIGINS` | no | Comma-separated CORS allowlist. Default: none. |
### Claude Desktop
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"paypay": {
"command": "npx",
"args": ["-y", "paypay-mcp"],
"env": {
"PAYPAY_API_KEY": "a_...",
"PAYPAY_API_SECRET": "...",
"PAYPAY_MERCHANT_ID": "...",
"PAYPAY_ENV": "sandbox"
}
}
}
}
```
### Claude Code
```bash
claude mcp add paypay -e PAYPAY_API_KEY=... -e PAYPAY_API_SECRET=... -e PAYPAY_MERCHANT_ID=... -- npx -y paypay-mcp
```
### 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.
```bash
MCP_TRANSPORT=http \
MCP_HTTP_HOST=0.0.0.0 \
MCP_AUTH_TOKEN="$(openssl rand -hex 32)" \
MCP_HTTP_ALLOWED_ORIGINS="https://claude.ai,https://your-app.example.com" \
PAYPAY_ENV=sandbox \
PAYPAY_API_KEY=... PAYPAY_API_SECRET=... PAYPAY_MERCHANT_ID=... \
npx paypay-mcp
```
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
```bash
git clone https://github.com/mrslbt/paypay-mcp.git
cd paypay-mcp
npm install
cp .env.example .env
npm run dev
npm test
npm run smoke
npm run build
```
## 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_payment` and `cancel_payment` are only registered when `PAYPAY_ENABLE_REFUNDS=true` or `PAYPAY_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 flagged `readOnlyHint`; money-moving and destructive tools (`refund_payment`, `cancel_payment`, `delete_qr_code`) are flagged `destructiveHint` so 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
[MIT](LICENSE)
Lo que la gente pregunta sobre paypay-mcp
¿Qué es mrslbt/paypay-mcp?
+
mrslbt/paypay-mcp es mcp servers para el ecosistema de Claude AI. MCP server for the PayPay Open Payment API. Create QR codes, check payments, refunds, and cancellations. Tools documented in English and Japanese. Tiene 0 estrellas en GitHub y se actualizó por última vez 24d ago.
¿Cómo se instala paypay-mcp?
+
Puedes instalar paypay-mcp clonando el repositorio (https://github.com/mrslbt/paypay-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar mrslbt/paypay-mcp?
+
mrslbt/paypay-mcp aún no ha sido auditado por nuestro agente de seguridad. Revisa el repositorio original en GitHub antes de usarlo en producción.
¿Quién mantiene mrslbt/paypay-mcp?
+
mrslbt/paypay-mcp es mantenido por mrslbt. La última actividad registrada en GitHub es de 24d ago, con 0 issues abiertos.
¿Hay alternativas a paypay-mcp?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega paypay-mcp en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/mrslbt-paypay-mcp)<a href="https://claudewave.com/repo/mrslbt-paypay-mcp"><img src="https://claudewave.com/api/badge/mrslbt-paypay-mcp" alt="Featured on ClaudeWave: mrslbt/paypay-mcp" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!