p

payfast

@jpbester/payfast
0 Stars 2 次浏览 jpbester 更新于 2026-08-23

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

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "payfast-mcp": {
      "args": [
        "payfast-mcp@1.0.1"
      ],
      "command": "npx"
    }
  }
}

可用工具 (5 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

tavily_search 14 个参数 需填 1 项

Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.

必填参数:query

tavily_extract 6 个参数 需填 1 项

Extract content from URLs. Returns raw page content in markdown or text format.

必填参数:urls

tavily_crawl 11 个参数 需填 1 项

Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.

必填参数:url

tavily_map 8 个参数 需填 1 项

Map a website's structure. Returns a list of URLs found starting from the base URL.

必填参数:url

tavily_research 2 个参数 需填 1 项

Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources to answer a question or complete a task. Returns a detailed response based on the research findings.

必填参数:input

服务介绍

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

| Tool | Description | Risk |
|- -- -- -|- -- -- -- -- -- --|- -- -- -|
| ping | Test API connectivity | Low |
| transaction_fetch | Get transaction by ID | Low |
| transaction_history | Query transaction history | Low |
| transaction_charge | Charge a stored token | Medium |
| subscription_fetch | Get subscription details | Low |
| subscription_pause | Pause a subscription | High |
| subscription_unpause | Resume a subscription | Medium |
| subscription_cancel | Cancel a subscription | High |
| subscription_update | Update subscription terms | High |
| subscription_adhoc | Ad-hoc subscription charge | High |
| refund_create | Process a refund | High |
| refund_fetch | Get refund details | Low |
| creditcard_fetch | Query card transaction | Low |

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:

| Variable | Required | Description |
|- -- -- -- -- -|- -- -- -- -- -|- -- -- -- -- -- --|
| PAYFAST_MERCHANT_ID | Yes | Your PayFast Merchant ID |
| PAYFAST_MERCHANT_KEY | Yes | Your PayFast Merchant Key |
| PAYFAST_PASSPHRASE | Yes | Your PayFast API Passphrase |
| PAYFAST_ENVIRONMENT | No | sandbox (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

相关 MCP 服务