MCP server that integrates M-Pesa payment functionality, enabling STK Push payment initiation on behalf of customers
The M-Pesa MCP server defines a single tool (stk_push) with complete input schema and clear descriptions. The tool name appropriately starts with a verb (stk_push is domain-specific but acts as 'initiate'), and the description is well-written at ~240 characters. All four required parameters have type constraints, regex patterns, and clear descriptions. However, critical gaps exist: no output schema is documented, no error handling guidance is provided, no tool annotations for the destructive nature of payment initiation, and parameter descriptions lack dependency information (e.g., phone number format requirements are stated but not how errors are recovered). The server lacks comprehensive error recovery patterns expected in production payment integrations.
Initiates M-Pesa Express (STK Push) payment on behalf of a customer. Sends a payment prompt to the customer's phone requesting them to enter their M-Pesa PIN to authorize and complete payment.
No output schema documented. LLMs cannot determine what fields to expect from the payment response (success status, transaction ID, error codes, etc.). This breaks downstream tool composition and error handling.
No error handling guidance. Tool description does not explain failure modes, recovery steps, or error classification. Payment tools are inherently risky; without actionable error messages, LLMs cannot handle failures gracefully (e.g., 'Insufficient balance' vs 'Network timeout').
Missing tool annotations for payment operations. The stk_push tool initiates irreversible financial transactions but has no destructiveHint, idempotentHint, or confirmation pattern. LLMs should warn users before executing payment tools.
No idempotency guarantee stated. Agents retry on ambiguous failures, if stk_push is called twice with the same parameters, does it charge twice? Documentation must clarify.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 64 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 54 | - | v1 |
Parameter descriptions lack validation context. The 'amount' parameter accepts only whole numbers, but the description does not state minimum/maximum allowed amounts. M-Pesa likely has daily limits, minimum transaction size, and maximum limits, these constraints should be documented.
Missing dependency hints. Parameter descriptions do not explain when this tool should be called vs alternatives, or what the user must do after calling it (e.g., 'Customer will receive an STK prompt; they have 2 minutes to enter PIN').