Model Context Protocol (MCP) server for PayFast — enables AI assistants to interact with South Africa's leading payment gateway
PayFast MCP has well-structured tool definitions with clear naming (verb_noun pattern), comprehensive parameter descriptions, and explicit risk classifications. However, output schemas are not documented in the source code, parameter constraints lack formal enums, and error handling guidance is minimal. Tool names are action-oriented (fetch, create, charge, pause, cancel) and risk levels are clearly marked, but LLMs cannot infer what fields to expect from responses. The confirmation pattern for destructive operations is good practice, but descriptions could be more concise (many exceed 200 chars). Average tool description length ~140 chars is reasonable; all params have descriptions. Missing: documented return types, enum constraints for categorical inputs, and recovery guidance in error scenarios.
Query credit card transaction details for a specific PayFast payment
Test connectivity to the PayFast API and verify credentials are valid
Create a refund for a PayFast transaction. This will return money to the customer's original payment method.
Fetch refund transaction history and available balance for a payment that has ALREADY been refunded. Returns 404 if no refund exists yet — use refund.query first to check availability.
Query refund availability for a transaction BEFORE creating a refund. Returns available amounts, refund methods (credit card or bank payout), and required parameters. Use this first to check if a refund is possible.
Process an ad-hoc charge on a subscription outside of the regular billing cycle
Output schemas not documented. Tool descriptions state what is returned (e.g., 'Fetch details', 'Get history') but do not specify the response structure, field names, or types. LLMs cannot plan downstream tool calls or extract required data without knowing what fields to expect.
Categorical parameters lack enum constraints. 'frequency' in subscription.update, 'environment' in config, and 'reason' in refund.create accept free-form strings. Enums should replace descriptions like 'New billing frequency' to prevent hallucinated invalid values.
No error recovery guidance. Tool descriptions do not explain what to do if a call fails (e.g., 'If refund fails due to insufficient balance, call refund.query first'). Error responses are not shown in the source, so LLMs cannot self-correct on failures.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 56 | <=2025-11-25 | v2 |
Permanently cancel a PayFast subscription. This cannot be undone.
Fetch details of a PayFast subscription by its token
Pause a PayFast subscription for a specified number of billing cycles. This stops charges temporarily.
Resume a previously paused PayFast subscription. Billing will resume on the next cycle.
Update subscription parameters such as amount, billing frequency, or run date
Process a charge on a tokenized card. This creates a real payment. Requires confirmation.
Fetch details of a specific PayFast transaction by payment ID
Get PayFast transaction history with optional date range and pagination
Confirmation pattern present but not enforced. Tools like transaction.charge and subscription.cancel require 'confirmed: true', but there is no dry-run or preview step. LLMs may pass confirmed=true without understanding consequences.
Parameter descriptions lack format/constraint details. 'amount' is described as 'Amount in cents (ZAR)' but does not specify min/max bounds, decimal precision, or whether negative values are rejected. 'reason' in refund.create states '3-255 characters' but is not enforced via schema.