io.github.jpbester/payfast

Official registry Finance and payments

MCP server for PayFast — AI assistants interact with South Africa's payment gateway

What can you do with io.github.jpbester/payfast?

  • Transaction management — fetch transaction details, query history, process tokenized charges
  • Subscription management — fetch, pause, unpause, cancel, update, and ad-hoc charge subscriptions
  • Refund processing — create refunds (full or partial) and query refund status
  • Credit card queries — look up credit card transaction details
  • Sandbox support — defaults to sandbox mode for safe testing
  • Secure by design — credentials via environment variables only, sensitive data never logged

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package payfast-mcp
Claude Code
claude mcp add payfast -e 'PAYFAST_MERCHANT_ID=<PAYFAST_MERCHANT_ID>' -e 'PAYFAST_MERCHANT_KEY=<your payfast_merchant_key>' -e 'PAYFAST_PASSPHRASE=<your payfast_passphrase>' -e 'PAYFAST_ENVIRONMENT=<PAYFAST_ENVIRONMENT>' -- npx -y payfast-mcp@1.0.1
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "payfast": {
            "command": "npx",
            "args": [
                "-y",
                "payfast-mcp@1.0.1"
            ],
            "env": {
                "PAYFAST_MERCHANT_ID": "<PAYFAST_MERCHANT_ID>",
                "PAYFAST_MERCHANT_KEY": "<your payfast_merchant_key>",
                "PAYFAST_PASSPHRASE": "<your payfast_passphrase>",
                "PAYFAST_ENVIRONMENT": "<PAYFAST_ENVIRONMENT>"
            }
        }
    }
}

Environment variables

  • PAYFAST_MERCHANT_ID required Your PayFast merchant ID
  • PAYFAST_MERCHANT_KEY required secret Your PayFast merchant key
  • PAYFAST_PASSPHRASE required secret Your PayFast API passphrase
  • PAYFAST_ENVIRONMENT PayFast environment: 'sandbox' or 'production' (defaults to sandbox)

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. payfast-mcp
  2. Features
  3. Available Tools
  4. Quick Start
  5. Development
  6. License

payfast-mcp

A Model Context Protocol (MCP) server for PayFast, South Africa's leading payment gateway. Enables AI assistants like Claude to securely interact with your PayFast merchant account.

Features

  • Transaction management — fetch transaction details, query history, process tokenized charges
  • Subscription management — fetch, pause, unpause, cancel, update, and ad-hoc charge subscriptions
  • Refund processing — create refunds (full or partial) and query refund status
  • Credit card queries — look up credit card transaction details
  • Sandbox support — defaults to sandbox mode for safe testing
  • Secure by design — credentials via environment variables only, sensitive data never logged

Available Tools

ToolDescriptionRisk
pingTest API connectivityLow
transaction_fetchGet transaction by IDLow
transaction_historyQuery transaction historyLow
transaction_chargeCharge a stored tokenMedium
subscription_fetchGet subscription detailsLow
subscription_pausePause a subscriptionHigh
subscription_unpauseResume a subscriptionMedium
subscription_cancelCancel a subscriptionHigh
subscription_updateUpdate subscription termsHigh
subscription_adhocAd-hoc subscription chargeHigh
refund_createProcess a refundHigh
refund_fetchGet refund detailsLow
creditcard_fetchQuery card transactionLow

High-risk operations require human approval before execution.

Quick Start

Prerequisites
Installation
npm install -g payfast-mcp

Or run directly with npx:

npx payfast-mcp
Configuration

Set the following environment variables:

VariableRequiredDescription
PAYFAST_MERCHANT_IDYesYour PayFast Merchant ID
PAYFAST_MERCHANT_KEYYesYour PayFast Merchant Key
PAYFAST_PASSPHRASEYesYour PayFast API Passphrase
PAYFAST_ENVIRONMENTNosandbox (default) or production

You can also create a .env file in your working directory.

Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "payfast": {
      "command": "npx",
      "args": ["-y", "payfast-mcp"],
      "env": {
        "PAYFAST_MERCHANT_ID": "your-merchant-id",
        "PAYFAST_MERCHANT_KEY": "your-merchant-key",
        "PAYFAST_PASSPHRASE": "your-passphrase",
        "PAYFAST_ENVIRONMENT": "sandbox"
      }
    }
  }
}
Claude Code

Add to your Claude Code settings:

claude mcp add payfast \
  -e PAYFAST_MERCHANT_ID=your-merchant-id \
  -e PAYFAST_MERCHANT_KEY=your-merchant-key \
  -e PAYFAST_PASSPHRASE=your-passphrase \
  -e PAYFAST_ENVIRONMENT=sandbox \
  -- npx -y payfast-mcp
Cursor

Add to your Cursor MCP config (.cursor/mcp.json for project-level, or ~/.cursor/mcp.json for global):

{
  "mcpServers": {
    "payfast": {
      "command": "npx",
      "args": ["-y", "payfast-mcp"],
      "env": {
        "PAYFAST_MERCHANT_ID": "your-merchant-id",
        "PAYFAST_MERCHANT_KEY": "your-merchant-key",
        "PAYFAST_PASSPHRASE": "your-passphrase",
        "PAYFAST_ENVIRONMENT": "sandbox"
      }
    }
  }
}
Codex

Add via the Codex CLI:

codex mcp add payfast \
  --env PAYFAST_MERCHANT_ID=your-merchant-id \
  --env PAYFAST_MERCHANT_KEY=your-merchant-key \
  --env PAYFAST_PASSPHRASE=your-passphrase \
  --env PAYFAST_ENVIRONMENT=sandbox \
  -- npx -y payfast-mcp

Or add directly to ~/.codex/config.toml:

[mcp_servers.payfast]
command = "npx"
args = ["-y", "payfast-mcp"]

[mcp_servers.payfast.env]
PAYFAST_MERCHANT_ID = "your-merchant-id"
PAYFAST_MERCHANT_KEY = "your-merchant-key"
PAYFAST_PASSPHRASE = "your-passphrase"
PAYFAST_ENVIRONMENT = "sandbox"

Development

# Clone the repo
git clone https://github.com/jpbester/payfast-mcp.git
cd payfast-mcp

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run with MCP Inspector
npm run inspect

License

MIT

Frequently asked questions

What is io.github.jpbester/payfast?

MCP server for PayFast — AI assistants interact with South Africa's payment gateway

How do I install io.github.jpbester/payfast?

It runs on your machine. In Claude Code: claude mcp add payfast -e 'PAYFAST_MERCHANT_ID=<PAYFAST_MERCHANT_ID>' -e 'PAYFAST_MERCHANT_KEY=<your payfast_merchant_key>' -e 'PAYFAST_PASSPHRASE=<your payfast_passphrase>' -e 'PAYFAST_ENVIRONMENT=<PAYFAST_ENVIRONMENT>' -- npx -y payfast-mcp@1.0.1. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.jpbester/payfast need an API key?

Yes. It expects PAYFAST_MERCHANT_ID, PAYFAST_MERCHANT_KEY, PAYFAST_PASSPHRASE, which you set in its configuration.

Is io.github.jpbester/payfast open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains io.github.jpbester/payfast?

It is published by jpbester. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.