Payfast logo

Payfast

Connect AI assistants to PayFast for transaction, subscription, refund, and card-transaction operations.

Install Payfast

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "payfast": {
      "command": "npx",
      "args": [
        "-y",
        "payfast-mcp"
      ],
      "env": {
        "PAYFAST_MERCHANT_ID": "YOUR_VALUE_HERE",
        "PAYFAST_MERCHANT_KEY": "YOUR_VALUE_HERE",
        "PAYFAST_PASSPHRASE": "YOUR_VALUE_HERE",
        "PAYFAST_ENVIRONMENT": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env PAYFAST_MERCHANT_ID=YOUR_VALUE_HERE --env PAYFAST_MERCHANT_KEY=YOUR_VALUE_HERE --env PAYFAST_PASSPHRASE=YOUR_VALUE_HERE --env PAYFAST_ENVIRONMENT=YOUR_VALUE_HERE --transport stdio payfast -- npx -y payfast-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y payfast-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The payfast MCP server connects AI assistants to PayFast merchant accounts through MCP tools for transaction, subscription, refund, and credit-card queries. It runs with Node.js, reads merchant credentials from environment variables, and defaults to PayFast sandbox mode. Use it to inspect payment data or perform supported merchant operations from compatible MCP clients, with human approval required for high-risk actions.

Use cases

  • Check PayFast transaction status from an AI assistant
  • Review a merchant account's transaction history
  • Manage subscription pauses, renewals, and cancellations
  • Create and inspect PayFast refunds
  • Test PayFast API connectivity in sandbox mode

Key features

  • Transaction lookup and history queries
  • Stored-token charges
  • Subscription lifecycle management
  • Refund creation and status lookup
  • Credit-card transaction queries
  • Sandbox-first configuration

Tools13

What Payfast lets your agent do. Expand a tool for its parameters.

Self-reported~123 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

18/18 checks healthy over the last 84d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · payfast-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads209Package downloads in the last 30 days.
Last commit10mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed13Callable tools this server registers over MCP.

How Payfast works

What the payfast MCP server does

The payfast MCP server exposes selected PayFast merchant-account operations to AI assistants through the Model Context Protocol. It supports transaction lookups and history searches, charges against stored tokens, subscription administration, refunds, and credit-card transaction queries.

The server is intended for PayFast accounts in South Africa and can target either PayFast's sandbox or production environment. It provides a ping operation for checking API connectivity before attempting account actions.

How it works

The payfast MCP server runs as a Node.js process and communicates with an MCP client over its configured local server command. The client sends tool calls, while the server uses the PayFast merchant credentials supplied through the process environment to access the account.

Operations are grouped by the PayFast resource they affect:

  • Transactions can be fetched by ID, searched through history, or charged using a stored token.
  • Subscriptions can be retrieved, paused, resumed, cancelled, updated, or charged on an ad-hoc basis.
  • Refunds can be created and queried.
  • Credit-card transaction details can be looked up.

High-risk actions require human approval before execution. These include pausing, cancelling, or changing subscriptions, making ad-hoc subscription charges, and creating refunds. Token charges and subscription resumption are listed as medium-risk operations.

Setup and configuration

Install the package globally with npm or run it directly through npx:

Terminal
npm install -g payfast-mcp
npx payfast-mcp

Node.js 18 or newer and a PayFast merchant account are required. Configure the server with PAYFAST_MERCHANT_ID, PAYFAST_MERCHANT_KEY, and PAYFAST_PASSPHRASE. PAYFAST_ENVIRONMENT is optional; set it to sandbox for testing or production for live use. If omitted, the server uses sandbox mode. A .env file in the working directory can also hold these values.

The README provides configuration examples for Claude Desktop, Claude Code, Cursor, and Codex. Each starts the package with npx and passes the PayFast variables through the client configuration.

Tools and capabilities

Available tools include:

  • ping for API connectivity checks.
  • transaction_fetch and transaction_history for transaction retrieval.
  • transaction_charge for charging a stored payment token.
  • subscription_fetch, subscription_pause, subscription_unpause, subscription_cancel, and subscription_update for subscription administration.
  • subscription_adhoc for an additional subscription charge.
  • refund_create and refund_fetch for refund processing and status checks.
  • creditcard_fetch for card transaction queries.

Limitations and notes

The server requires valid PayFast merchant credentials and a PayFast account. Production use must be selected explicitly through PAYFAST_ENVIRONMENT; sandbox is the default. Credentials are supplied through environment variables rather than hard-coded configuration, and the project states that sensitive data is not logged.

Because several tools can alter payment or subscription state, client users should review approval prompts and confirm the target transaction, subscription, or refund before allowing execution. The project is released under the MIT license.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Payfast

payfast is an MCP server that connects AI assistants to PayFast merchant accounts in South Africa. Its main tools retrieve transactions, query history, charge stored tokens, manage subscriptions, create and inspect refunds, check card transactions, and test API connectivity. It supports sandbox and production environments.

Install it with npm or run it through npx. Use `npm install -g payfast-mcp` for a global installation, or run `npx payfast-mcp` without installing it globally. Node.js 18 or newer and a PayFast merchant account are required.

Yes, payfast works with Cursor through the client’s MCP configuration. Add the server command as `npx -y payfast-mcp` in `.cursor/mcp.json` for a project or `~/.cursor/mcp.json` globally, then provide the required PayFast environment variables.

Set `PAYFAST_MERCHANT_ID`, `PAYFAST_MERCHANT_KEY`, and `PAYFAST_PASSPHRASE` as environment variables. Optionally set `PAYFAST_ENVIRONMENT` to `sandbox` or `production`; sandbox is used by default. The values may also be placed in a `.env` file.

Yes, sandbox mode is supported and is the default. Leave `PAYFAST_ENVIRONMENT` unset for the default behavior, or set it explicitly to `sandbox`. Set the variable to `production` when connecting to a live PayFast merchant account.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPayfast AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/payfast?style=directory)](https://allmcps.com/mcp/payfast)
HTML Embed
<a href="https://allmcps.com/mcp/payfast"><img src="https://allmcps.com/api/badge/payfast?style=directory" alt="Payfast on AllMCPs" /></a>