mpesa-mcp
JSON →MCP server for M-Pesa (Safaricom Daraja) and Africa's Talking APIs. Gives AI coding assistants â Claude Code, Cursor, GitHub Copilot â direct access to East African payment and SMS infrastructure from a single server. What it does: STK Push payments via Safaricom Daraja (triggers M-Pesa prompt on user's phone) Transaction status queries SMS to 20+ African telecom networks via Africa's Talking Airtime top-up across East and West Africa Safety: All 5 tools are annotated per MCP 2025-03-26 spec â payment and SMS tools declare destructiveHint: true, so Claude Desktop and other clients show confirmation dialogs before executing. Query tools declare readOnlyHint: true for auto-approval. Install: pip install mpesa-mcp Who it's for: Developers building AI agents for East African markets. M-Pesa handles ~$50B/year in transactions and reaches 50M+ users. Africa's Talking reaches 300M+ phones across 20+ telecoms.
Install
uvx mpesa-mcp Tools · 5
- mpesa_stk_push Trigger STK Push payment prompt on customer's M-Pesa phone
- mpesa_stk_query Check status of an STK Push request
- mpesa_transaction_status Query any M-Pesa transaction by receipt number
- sms_send Send SMS to 1–1,000 recipients across African networks
- airtime_send Send airtime top-up to any subscriber (KES, NGN, GHS, UGX, etc.)
Environment variables
MPESA_CONSUMER_KEYMPESA_CONSUMER_SECRETMPESA_CALLBACK_URLAT_API_KEY