PayFast MCP
# payfast-mcp
MCP server for PayFast payment gateway (South Africa).
## Tools (8)
| Tool | Description |
|---|---|
| `create_payment` | Create a payment request |
| `query_transaction` | Query transaction status |
| `cancel_subscription` | Cancel a subscription |
| `update_subscription` | Update a subscription |
| `create_adhoc` | Charge tokenized card (ad-hoc) |
| `refund_payment` | Refund a payment |
| `get_balance` | Get settlement balance |
| `validate_signature` | Validate a webhook signature |
## Quick Start
```json
{
"mcpServers": {
"payfast": {
"command": "npx",
"args": ["-y", "@theyahia/payfast-mcp"],
"env": {
"PAYFAST_MERCHANT_ID": "<YOUR_PAYFAST_MERCHANT_ID>",
"PAYFAST_MERCHANT_KEY": "<YOUR_PAYFAST_MERCHANT_KEY>",
"PAYFAST_PASSPHRASE": "<YOUR_PAYFAST_PASSPHRASE>"
}
}
}
}
```
## Environment Variables
| Variable | Required | Description |
|---|---|---|
| `PAYFAST_MERCHANT_ID` | Yes | Merchant ID |
| `PAYFAST_MERCHANT_KEY` | Yes | Merchant key |
| `PAYFAST_PASSPHRASE` | Yes | API passphrase |
## License
MIT
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose targeting specific payment operations: subscription management (cancel, update), payment processing (create, refund, query), balance checking, ad-hoc charging, and webhook validation. No ambiguity exists between tools as they cover non-overlapping actions on different resources.
All tools follow a consistent verb_noun pattern with clear action verbs (cancel, create, get, query, refund, update, validate) paired with specific nouns (subscription, payment, balance, transaction, signature). The naming is uniform and predictable throughout the set.
With 8 tools, the server is well-scoped for a payment processing domain. Each tool earns its place by covering essential operations like payment lifecycle, subscription management, balance inquiries, and security validation without being overly sparse or bloated.
The toolset provides complete coverage for core payment workflows: payment creation, status querying, refunds, subscription management (cancel/update), balance checks, ad-hoc charges, and webhook validation. No obvious gaps exist for the inferred payment processing domain, supporting full agent interaction.