io.github.krystiangw/zen

السجل الرسمي المالية والمدفوعات

Unofficial MCP server for the ZEN.com Payment Gateway: payment links, transactions, refunds.

ماذا يمكنك أن تفعل مع io.github.krystiangw/zen؟

  • List terminal payment methods and documented currencies.
  • Look up transactions, payment links, and payouts.
  • List payment links and request reconciliation reports.
  • Verify IPN webhook signatures locally.
  • Create hosted payment links and QR codes without handling card data.
  • Capture or cancel transactions and issue full or partial refunds.
  • Create payouts and customer records.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @krystiangw/zen-mcp
Claude Code
claude mcp add zen -e 'ZEN_API_KEY=<your zen_api_key>' -e 'ZEN_PAYWALL_SECRET=<your zen_paywall_secret>' -e 'ZEN_IPN_SECRET=<your zen_ipn_secret>' -e 'ZEN_ENV=<ZEN_ENV>' -- npx -y @krystiangw/zen-mcp@0.1.1
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "zen": {
            "command": "npx",
            "args": [
                "-y",
                "@krystiangw/zen-mcp@0.1.1"
            ],
            "env": {
                "ZEN_API_KEY": "<your zen_api_key>",
                "ZEN_PAYWALL_SECRET": "<your zen_paywall_secret>",
                "ZEN_IPN_SECRET": "<your zen_ipn_secret>",
                "ZEN_ENV": "<ZEN_ENV>"
            }
        }
    }
}

متغيرات البيئة

  • ZEN_API_KEY إلزامي سري ZEN Terminal API Key (Authorization header)
  • ZEN_PAYWALL_SECRET سري ZEN paywall secret for request signing (required for write ops)
  • ZEN_IPN_SECRET سري ZEN IPN secret for webhook verification
  • ZEN_ENV sandbox (default) or production

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. ZEN MCP
  2. What it does
  3. Disclaimer
  4. Install
  5. Configuration
  6. Tools
  7. Security
  8. Demo without an account
  9. Development
  10. Roadmap
  11. License

ZEN MCP

An MCP server that lets AI assistants work with the ZEN.com Payment Gateway: hosted payment links, transaction lookup, refunds, payouts, and reporting.

Project page

Unofficial. This project is not affiliated with, endorsed by, or maintained by ZEN.com.

What it does

Read-only tools:

  • List terminal payment methods and documented currencies.
  • Look up transactions, payment links, and payouts.
  • List payment links and request reconciliation reports.
  • Verify IPN webhook signatures locally.

Write tools:

  • Create hosted payment links and QR codes without handling card data.
  • Capture or cancel transactions and issue full or partial refunds.
  • Create payouts and customer records.

Disclaimer

This integration was built from public ZEN documentation without access to a live merchant account. Endpoint versions, request fields, response fields, signing details, and webhook behavior must be checked against ZEN's current OpenAPI or Postman collection before production use. Mock mode is included for evaluation without an account.

Install

Add the published package to Claude Code:

claude mcp add zen --env ZEN_API_KEY=your_terminal_api_key -- npx -y @krystiangw/zen-mcp

For Claude Desktop, add this entry to its MCP configuration:

{
  "mcpServers": {
    "zen": {
      "command": "npx",
      "args": ["-y", "@krystiangw/zen-mcp"],
      "env": {
        "ZEN_API_KEY": "your_terminal_api_key",
        "ZEN_PAYWALL_SECRET": "your_paywall_secret",
        "ZEN_IPN_SECRET": "your_ipn_secret",
        "ZEN_ENV": "sandbox"
      }
    }
  }
}

Configuration

VariableRequiredDescription
ZEN_API_KEYOutside mock modeTerminal API Key sent in Authorization without a Bearer prefix
ZEN_PAYWALL_SECRETWrite operationsCheckout/paywall secret used to sign request bodies
ZEN_IPN_SECRETWebhook verificationIPN secret used only by verify_webhook_signature
ZEN_ENVNosandbox (default) or production
ZEN_BASE_URLNoAPI base URL override; takes priority over ZEN_ENV
ZEN_MOCKNo1 or true enables deterministic offline responses
ZEN_HASH_ALGNosha224, sha256 (default), sha384, or sha512

In the ZEN merchant panel, go to my.zen.com → Shop settings → Terminal to find the Terminal API Key. Use sandbox first; the default API host is api.zen-test.com, although sandbox availability and onboarding requirements should be confirmed with ZEN.

No merchant account yet? You can open a ZEN business account. That is a referral link: it credits the author of this project if you sign up through it, and costs you nothing. Every other link in this README is a plain one.

Tools

NameTypeDescription
list_payment_methodsReadList payment methods for the terminal
get_transactionReadGet a transaction by ZEN or merchant ID
list_payment_linksReadList hosted payment links
get_payment_linkReadGet one hosted payment link
get_payoutReadGet a payout by ZEN ID
download_reportReadRequest a report download
list_supported_currenciesReadList documented supported currencies
verify_webhook_signatureReadVerify a ZEN IPN signature locally
create_payment_linkWriteCreate a hosted checkout link and QR code
refund_transactionWrite, destructiveIssue a full or partial refund
capture_transactionWrite, destructiveCapture an authorized transaction
cancel_transactionWrite, destructiveCancel a transaction
create_payoutWrite, destructiveSend an outbound payout
create_customerWriteCreate a customer record

Security

  • Tools are read-only by default; operations that move or reverse money are marked destructive for MCP clients.
  • Secrets are read only from environment variables and are never tool arguments.
  • Payment acceptance uses ZEN-hosted links, so this server does not collect or transmit card numbers.
  • The signing algorithm follows public ZEN documentation, but nested-object and array flattening are not fully specified publicly. Verify it against the live API.
  • Verify every IPN webhook signature with ZEN_IPN_SECRET before trusting its contents.
  • Use least-privilege terminal credentials and keep human confirmation enabled for write tools.

Demo without an account

Run the server with deterministic canned API responses:

ZEN_MOCK=1 ZEN_IPN_SECRET=demo npx -y @krystiangw/zen-mcp

verify_webhook_signature does real cryptography instead of calling the API, so it needs a secret even in mock mode. Any value works for a demo.

From a development checkout:

npm install
npm run build
ZEN_MOCK=1 ZEN_IPN_SECRET=demo npm run inspect

Development

Requires Node.js 18 or newer.

npm install
npm run typecheck
npm run build
npm test
ZEN_MOCK=1 ZEN_IPN_SECRET=demo npm run inspect

Roadmap

  • Raw card charges only after a deliberate PCI/security design; they are excluded from the MVP.
  • Recurring and one-click payments after the tokenization flow is verified.
  • Consumer ZEN features such as cashback and personal cards if ZEN publishes a supported API.
  • Remote Streamable HTTP transport and OAuth after the stdio MVP.

License

MIT

الأسئلة الشائعة

ما هو io.github.krystiangw/zen؟

Unofficial MCP server for the ZEN.com Payment Gateway: payment links, transactions, refunds.

كيف أثبّت io.github.krystiangw/zen؟

يعمل على جهازك. في Claude Code: claude mcp add zen -e 'ZEN_API_KEY=<your zen_api_key>' -e 'ZEN_PAYWALL_SECRET=<your zen_paywall_secret>' -e 'ZEN_IPN_SECRET=<your zen_ipn_secret>' -e 'ZEN_ENV=<ZEN_ENV>' -- npx -y @krystiangw/zen-mcp@0.1.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.krystiangw/zen إلى مفتاح API؟

نعم. يتطلب ZEN_API_KEY, ZEN_PAYWALL_SECRET, ZEN_IPN_SECRET، وتضبطها في إعداداته.

هل io.github.krystiangw/zen مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.krystiangw/zen؟

ينشره krystiangw. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.