M-Pesa Daraja
by github.com/Mr-Macharia · v0.1.6 · updated Oct 29, 2026
Safaricom M-Pesa Daraja tools: STK Push, C2B, B2C, B2B, QR, Ratiba. Sandbox-first, idempotent.
Run it locally
Install the package and point your AI client at it.
PyPI
uvx mpesa-daraja-mcp==0.1.6Environment variables
DARAJA_CONSUMER_KEYrequiredsecretDaraja app Consumer Key
DARAJA_CONSUMER_SECRETrequiredsecretDaraja app Consumer Secret
DARAJA_ENVsandbox (default) or production
DARAJA_SHORTCODEPaybill / store number (174379 in sandbox)
DARAJA_PASSKEYsecretM-Pesa Express passkey (STK Push)
DARAJA_INITIATOR_NAMEAPI operator username (B2C, B2B, status, balance, reversal)
DARAJA_SECURITY_CREDENTIALsecretEncrypted initiator password
DARAJA_CALLBACK_BASE_URLPublic HTTPS base for callback URLs
DARAJA_CALLBACK_LISTENhost:port for the built-in callback receiver
DARAJA_CALLBACK_TOKENsecret16+ random characters; secret path for callbacks
DARAJA_TOOLSETSComma list: stk,c2b,payouts,ops,qr,ratiba,billmanager
DARAJA_READ_ONLYtrue hides every tool that moves money or writes
DARAJA_APPROVAL_THRESHOLDPayouts above this many shillings need approval in the chat
DARAJA_ALLOWED_RECIPIENTSComma list of phones/shortcodes that payouts may go to
DARAJA_ALLOW_LIVE_MONEY_MOVEMENTtrue to allow production charges and payouts
DARAJA_INITIATOR_PASSWORDsecretInitiator password, encrypted into SecurityCredential at startup (alternative to DARAJA_SECURITY_CREDENTIAL)
DARAJA_CERT_PATHPath to Safaricom's public certificate, used with DARAJA_INITIATOR_PASSWORD
DARAJA_STATE_DBPath of the SQLite file that stores request state and callbacks
DARAJA_OUTPUT_DIRDirectory where generated QR PNGs are saved
DARAJA_CONFIG_DIRDirectory holding the saved config (default: user config dir)
DARAJA_DOTENVPath of a .env file to load instead of the project one
DARAJA_MCP_TOKENsecretBearer token for HTTP mode (32+ random characters)
DARAJA_MCP_HOSTHTTP mode bind address (default 127.0.0.1)
DARAJA_MCP_PORTHTTP mode port (default 8000)
DARAJA_FORWARD_URLYour app's URL: every callback is POSTed on to it, HMAC-signed
DARAJA_FORWARD_SECRETsecretHMAC secret for forwarded callbacks (16+ characters)
More MCP servers
Delvorn
github.com/MrAnderson323
GET https://delvorn.site/api/x402/test-asset $0.05 Base. First independent=Certified+$0.05 back.
Lomen
github.com/MrBananKaka123
Ask about your website traffic, revenue and live visitors from Lomen analytics
Mcp Server Vivino
github.com/MrBridgeHQ
Vivino wine data for AI assistants: search, explore, wine details and meal-aware recommendations
Cartography Mcp Server
github.com/MrCartographer
Human-curated crypto market intelligence with x402 payments. Weekly signals and analysis.
Crypto Analysis Human Mcp
github.com/MrCartographer
Human-curated crypto signals, altcoin analysis, and airdrop alpha. x402 payments.
AgentCanary
github.com/MrCerq
Retired compatibility stub for AgentCanary MCP. Daily briefs continue on X and Telegram.