jazzcash-mcp
This server lets an AI assistant create and manage JazzCash payments in Pakistan, including wallet payments, CNIC-enabled mobile account payments, OTC vouchers, status checks, and refunds.
Create a mobile wallet payment (
create_payment) — send money to a JazzCash mobile wallet using the recipient's 03XXXXXXXXX number.Create a CNIC-enabled mobile account payment (
create_mobile_account_payment) — pay to a JazzCash Mobile Account using the customer's mobile number and last 6 CNIC digits.Create an OTC voucher (
create_voucher) — generate a voucher the customer redeems offline at a JazzCash outlet (no redeem API exists).Check payment status (
check_payment_status) — query a transaction's current status using its reference number.Refund a payment (
refund_payment) — reverse a transaction (irreversible; per JazzCash typically applies to card transactions).All payment amounts are specified in PKR rupees and automatically converted to paisa for the JazzCash API.
Transaction references can be auto-generated if omitted; optional bill references can be provided for reconciliation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jazzcash-mcp Check wallet balance for 03001234567"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JazzCash MCP — accept Pakistani mobile wallet payments from an AI assistant
If you were looking for a way to take JazzCash payments from Claude or another AI assistant, charge a CNIC-enabled Mobile Account, issue an over-the-counter voucher or refund a transaction without writing gateway code, this is it. 5 tools cover Mobile Wallet payments, Mobile Account payments, OTC vouchers, status inquiry and refunds. Requests are signed with the JazzCash HMAC-SHA256 secure hash, and responses are hash-verified.
Tools (5)
Tool | Type | Description |
| write | Mobile Wallet (MWALLET) payment |
| write | CNIC-enabled Mobile Account payment (MWALLET) |
| write | Over-The-Counter (OTC) voucher — returns a voucher number redeemed offline at an outlet |
| read | Transaction status inquiry ( |
| write, destructive | Refund a transaction ( |
Related MCP server: paymongo-mcp
Quick Start
{
"mcpServers": {
"jazzcash": {
"command": "npx",
"args": ["-y", "@theyahia/jazzcash-mcp"],
"env": {
"JAZZCASH_MERCHANT_ID": "<YOUR_MERCHANT_ID>",
"JAZZCASH_PASSWORD": "<YOUR_PASSWORD>",
"JAZZCASH_INTEGRITY_SALT": "<YOUR_SALT>",
"JAZZCASH_ENV": "sandbox"
}
}
}
}Environment Variables
Variable | Required | Default | Description |
| Yes | — | Merchant ID from the JazzCash portal |
| Yes | — | Merchant password |
| Yes | — | HMAC integrity salt (shared secret) |
| No |
|
|
| No | — | Full base URL override (e.g. for staging); takes precedence over |
The server fails fast at startup if the three required credentials are missing.
Amounts
All amount parameters are in PKR rupees (e.g. 5000 = 5000 PKR). The server converts to paisa
(amount × 100, no decimal point) before signing, because JazzCash's pp_Amount is expressed in the
lowest denomination. So 5000 is sent to JazzCash as pp_Amount=500000.
Sandbox vs Production
Environment | Host |
sandbox (default) |
|
production |
|
The default is sandbox for safety. Set JAZZCASH_ENV=production (or a full JAZZCASH_BASE_URL) to go live.
Verify endpoints against your merchant portal. JazzCash exposes the same operation under slightly different path/version conventions depending on the merchant-account generation, and the modern token-wallet endpoint differs from the documented Payment API. The endpoint paths in
src/config.tsare best-evidence canonical values cross-checked against the official docs and multiple integrations; confirm the exact paths and whetherpp_Versionis expected against the per-merchant API URLs shown in your JazzCash merchant portal before transacting real money.
Security
Request signing — every request carries an HMAC-SHA256
pp_SecureHash(integrity salt as both the prepended prefix and the HMAC key; empty fields excluded; lowercase hex). Verified against the official worked test vector in the test suite.Response verification — responses that include a
pp_SecureHashare recomputed and compared (constant-time); a mismatch raises an error rather than returning unverified data.No secret leakage —
pp_Password/pp_SecureHashare stripped from tool output, and upstream error bodies are never echoed back to the model (only redacted to stderr).
Demo Prompts
"Create a JazzCash payment of 5000 PKR to 03001234567"
"Check the status of transaction TXN-001"
"Refund 3000 PKR for transaction TXN-001"
"Create an OTC voucher for 2000 PKR for 03001234567 (CNIC 123456)"
Removed in 2.0 (and why)
2.0.0 removed three tools that targeted JazzCash endpoints which do not exist, verified against the
official documentation and multiple independent integrations:
get_balance— JazzCash has no balance-inquiry API.redeem_voucher— voucher redemption happens offline at a JazzCash outlet, not via a merchant API.inquire_transaction— duplicatedcheck_payment_status; both now use the canonicalPaymentInquiry/Inquire.
Other breaking changes: create_mobile_account_payment now uses the real MWALLET transaction type (there
is no MA type), create_voucher now issues an OTC voucher, amounts are in rupees (auto-converted to
paisa), and txn_ref is optional (auto-generated when omitted). See CHANGELOG.md.
Development
npm install
npm run build # tsc → dist/
npm test # vitest (schema, hash test-vector, response verification, fetch mocking)
npm run dev # run from source via tsxLicense
MIT
Telegram: @vhodvai
Available Tools
5 toolscheck_payment_statusARead-only
Look up the status of a JazzCash transaction by its reference (PaymentInquiry/Inquire). Read-only; returns the current pp_ResponseCode/pp_ResponseMessage for the queried transaction.
Inputs: txn_ref (required).
create_mobile_account_paymentA
Create a CNIC-enabled JazzCash Mobile Account payment (MWALLET with the last 6 CNIC digits). amount is in PKR rupees. Returns pp_ResponseCode/pp_ResponseMessage. Money-moving and non-idempotent.
Inputs: cnic (required), amount (required), mobile_number (required), txn_ref, +2 more.
create_paymentA
Create a JazzCash Mobile Wallet (MWALLET) payment. amount is in PKR rupees (converted to paisa). txn_ref is auto-generated when omitted. Returns the JazzCash pp_ResponseCode/pp_ResponseMessage. Money-moving and non-idempotent — do not retry blindly.
Inputs: amount (required), description (required), mobile_number (required), txn_ref, +1 more.
create_voucherA
Create a JazzCash Over-The-Counter (OTC) voucher payment. amount is in PKR rupees. The response carries a voucher number the customer redeems offline at a JazzCash outlet (there is no redeem API). Money-moving and non-idempotent.
Inputs: cnic (required), amount (required), mobile_number (required), txn_ref, +2 more.
refund_paymentADestructive
Refund a JazzCash transaction (authorize/Refund). amount is in PKR rupees. IRREVERSIBLE — moves money back to the customer. Per JazzCash, refunds apply to card transactions; verify applicability for wallet/OTC.
Inputs: amount (required), txn_ref (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct operation: status inquiry, wallet payment, CNIC-based payment, OTC voucher creation, and refund. Descriptions clearly differentiate them, with no functional overlap.
All tool names follow a consistent verb_noun snake_case pattern (e.g., check_payment_status, create_payment), making it predictable for agents.
With 5 tools covering creation, status, and refunds, the set is well-scoped for a payment MCP. No unnecessary tools and no obvious missing critical operations.
Covers core payment lifecycle: create (3 types), status, refund. Minor gaps like a tool to list all transactions or cancel a pending payment are absent, but the domain is sufficiently addressed.
Maintenance
Related MCP Connectors
MCP server for Modern Treasury — payment orders, transactions, counterparties and ledgers.
Authenticated MCP access to WebMoney wallets, transactions, messages and invoices.
MCP Server for agents to onboard, pay, and provision services autonomously with InFlow
South African MCP server for airtime, data, SMS, VAS, electricity, balance, and network lookup.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server for VNPay payment gateway (Vietnam). Supports payment URL generation, transaction queries, refunds, tokenized payments, and IPN verification with HMAC-SHA512 signing.810 npmMIT
- AlicenseAqualityCmaintenanceMCP server for PayMongo payment gateway (Philippines). Supports payment intents, sources, payments, refunds, and checkout sessions via Basic Auth.2422 npm2MIT
- AlicenseAqualityDmaintenanceMCP server for MAIB e-commerce payments (Moldova). Supports payments, refunds, recurring billing, one-click payments, and transaction status via OAuth 2.0.813 npmMIT
- AlicenseBqualityFmaintenanceMCP server for Payme payment system (Uzbekistan). Supports transactions, statements, payment links, and balance queries via JSON-RPC 2.0.8MIT