JazzCashMCP logo

JazzCashMCP

Community
TehreemArbab

Open-source Model Context Protocol (MCP) server for JazzCash — Pakistan's largest mobile-money platform. Hosted Checkout, Mobile Wallet charges, inquiries, and refunds for AI agents.

PublisherTehreemArbab
RepositoryJazzCashMCP
LanguageTypeScript
Forks
15
Stars
74
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    JazzCashMCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    74 stars and 15 forks from the linked repository.

mcp-jazzcash

npm version License: MIT Node MCP Status

An open-source Model Context Protocol server for JazzCash — Pakistan's largest mobile-money platform. Plug it into Claude Desktop, Cursor, Cline, or any MCP-aware agent and let it create checkouts, charge mobile wallets, look up transactions, and issue refunds against the JazzCash REST API.

Sandbox-by-default. Bring your own merchant credentials. No secrets bundled.


Table of contents


Why this exists

The Pakistani payments stack is fragmented and English-language documentation for AI agents is thin. This MCP gives any agent a stable, typed interface to JazzCash so you don't have to teach it the signature scheme, field names, and gotchas every time. Prompt your agent in plain English; let the server do the cryptography and HTTP.

Tools

ToolPurpose
jazzcash_create_hosted_checkoutBuilds a signed Hosted Checkout (Page Redirection) form. Returns the action URL, hidden fields, and a ready-to-use HTML snippet your app can serve.
jazzcash_charge_mobile_walletServer-to-server MWALLET charge. Customer authorizes via MPIN on their phone.
jazzcash_inquire_transactionStatus lookup by pp_TxnRefNo.
jazzcash_refund_transactionFull or partial refund (requires merchant role).
jazzcash_environment_infoReports active environment, endpoint URLs, and which credentials are present. Never returns secrets.

All amounts are passed as PKR paisa (rupees × 100) to avoid float rounding.

Quick start

bash
git clone https://github.com/TehreemArbab/JazzCashMCP.git
cd JazzCashMCP
npm install
cp .env.example .env       # then edit .env with your sandbox credentials
npm run build
npm start

The server speaks MCP over stdio, so npm start is most useful when launched by an MCP client (see below). To verify the build alone:

bash
npm run typecheck

Configuration

Copy .env.example to .env and fill in credentials from your JazzCash merchant portal:

bash
JAZZCASH_MERCHANT_ID=MC...
JAZZCASH_PASSWORD=...
JAZZCASH_INTEGRITY_SALT=...
JAZZCASH_ENV=sandbox
JAZZCASH_RETURN_URL=https://yourapp.example.com/jazzcash/callback

Sandbox credentials are issued at https://sandbox.jazzcash.com.pk. To go live, switch JAZZCASH_ENV=production and swap in your live merchant credentials — no code changes required.

VariableRequiredNotes
JAZZCASH_MERCHANT_IDyesFrom the merchant portal.
JAZZCASH_PASSWORDyesAPI password, not your portal login.
JAZZCASH_INTEGRITY_SALTyesHMAC key for pp_SecureHash.
JAZZCASH_ENVyessandbox or production.
JAZZCASH_RETURN_URLonly for hosted checkoutWhere JazzCash redirects the customer post-payment.
JAZZCASH_LANGUAGEnoDefault EN.
JAZZCASH_CURRENCYnoDefault PKR.
JAZZCASH_VERSIONnoDefault 1.1.
JAZZCASH_*_URLnoPer-endpoint URL override; see Endpoint overrides.

Wire it into Claude Desktop

Add this to claude_desktop_config.json:

json
{
  "mcpServers": {
    "jazzcash": {
      "command": "node",
      "args": ["C:/path/to/mcp-jazzcash/dist/index.js"],
      "env": {
        "JAZZCASH_MERCHANT_ID": "MC...",
        "JAZZCASH_PASSWORD": "...",
        "JAZZCASH_INTEGRITY_SALT": "...",
        "JAZZCASH_ENV": "sandbox",
        "JAZZCASH_RETURN_URL": "https://yourapp.example.com/jazzcash/callback"
      }
    }
  }
}

Restart Claude Desktop, then try:

"Using the JazzCash MCP, create a hosted checkout for PKR 1500 with description 'Order #1023' and bill reference 'INV1023'."

Claude will call jazzcash_create_hosted_checkout and hand back the form HTML.

Use it from any MCP client

The server uses stdio transport, so it works with anything that speaks MCP — Cursor, Cline, Continue, Zed, and custom agents built on the MCP TypeScript SDK. Point the client at node /path/to/dist/index.js and pass the same env vars shown above.

How the signature works

JazzCash uses HMAC-SHA256 over alphabetically sorted, non-empty pp_* fields, joined with &, with the merchant's Integrity Salt as both the HMAC key and a prepended salt:

text
message = integritySalt + "&" + sortedField1Value + "&" + sortedField2Value + ...
hash    = hex(HMAC_SHA256(key=integritySalt, message))

pp_SecureHash itself is excluded from the message. Empty values are skipped. The implementation lives in src/signature.ts — small enough to audit in 30 seconds.

Endpoint overrides

Default endpoint URLs ship for both sandbox and production. If JazzCash rotates a path, override the relevant variable without changing code:

bash
JAZZCASH_HOSTED_CHECKOUT_URL=https://sandbox.jazzcash.com.pk/.../HostedCheckout
JAZZCASH_MOBILE_WALLET_URL=https://sandbox.jazzcash.com.pk/.../DoMWalletTransaction
JAZZCASH_INQUIRY_URL=https://sandbox.jazzcash.com.pk/.../StatusInquiry
JAZZCASH_REFUND_URL=https://sandbox.jazzcash.com.pk/.../DoRefundTransaction

Security model

  • No bundled secrets. Credentials are read from environment variables only.
  • No secrets in tool output. jazzcash_environment_info returns only booleans for which credentials are configured.
  • Sandbox is the default. Production requires explicitly setting JAZZCASH_ENV=production.
  • Stdio transport. The server has no network listener; it talks only to the parent MCP client process.
  • Audit-friendly. Signature logic is isolated in one short file. No vendored crypto.

If you find a security issue, please open a private advisory on GitHub rather than a public issue.

Roadmap

  • Card / Tokenization tools (Authorize, Capture, Retrieve/Delete Token)
  • IPN webhook signature-verification helper
  • Voucher / OTC payment flow
  • CLI (mcp-jazzcash inspect) for hash debugging
  • Published npm package + automated releases

Contributing

Issues and PRs welcome. A few ground rules:

  • Don't paste real merchant credentials into bug reports — use the placeholder JAZZCASH_* names.
  • Keep new tools framework-agnostic; the server should remain usable from any MCP client.
  • Run npm run typecheck before opening a PR.

License

MIT. Not affiliated with or endorsed by JazzCash, Mobilink Microfinance Bank, or VEON.

Use JazzCashMCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once JazzCashMCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add JazzCashMCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the JazzCashMCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "jazzcashmcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the JazzCashMCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the JazzCashMCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use JazzCashMCP to help me with this task?
JazzCashMCP
Sure. I read it.
Here is what I found using JazzCashMCP.

Frequently asked questions

What is the JazzCashMCP MCP server used for?

JazzCashMCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use JazzCashMCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use JazzCashMCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use JazzCashMCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With JazzCashMCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect JazzCashMCP MCP to TypingMind?

JazzCashMCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does JazzCashMCP MCP provide in TypingMind?

JazzCashMCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use JazzCashMCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If JazzCashMCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇