Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mpesa": {
"env": {
"AT_API_KEY": "your_at_key",
"AT_USERNAME": "sandbox",
"MPESA_PASSKEY": "your_passkey",
"MPESA_SANDBOX": "true",
"MPESA_SHORTCODE": "174379",
"MPESA_CALLBACK_URL": "https://yourdomain.com/mpesa/callback",
"MPESA_CONSUMER_KEY": "your_key",
"MPESA_CONSUMER_SECRET": "your_secret"
},
"args": [
"mpesa-mcp"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP server for East African fintech APIs — M-Pesa (Safaricom Daraja) and Africa's Talking
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'mpesa-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked mpesa-mcp against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in finance / communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
Real-time financial market data: stocks, forex, crypto, commodities, and economic indicators
An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages.
A Model Context Protocol server for building an investor agent
MCP Security Weekly
Get CVE alerts and security updates for io.github.gabrielmahia/mpesa-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
MCP server for East African fintech APIs — M-Pesa (Safaricom Daraja) and Africa's Talking
Give your AI agent the ability to trigger M-Pesa payments, check transaction status, send SMS, and top up airtime across 20+ African telecom networks.
M-Pesa processes more transactions per day than PayPal does in Africa. Africa's Talking reaches users in 20+ countries on basic phones via SMS and USSD. Neither has an MCP server.
This means every AI agent built today — Claude, GPT, Gemini, or any MCP-compatible runtime — cannot trigger an M-Pesa payment or send a Kiswahili SMS without custom integration work.
mpesa-mcp closes that gap in one pip install.
| Tool | Description |
|---|---|
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.) |
mpesa-mcp is available as a hosted MCP server on Glama:
mpesa-mcp was updated in response to NSA CSI U/OO/6030316-26 (May 2026) — the NSA Artificial Intelligence Security Center's Cybersecurity Information Sheet on Model Context Protocol security.
This makes mpesa-mcp the first African MCP server to document compliance against the NSA's MCP security framework.
| NSA Control | Implementation |
|---|---|
| Parameter validation | KE phone regex ^254[17]\d{8}$ + amount bounds [1–150,000 KES] |
| Audit logging | Structured log per tool call; phone numbers SHA-256 hashed |
| Token lifecycle | OAuth token cached with expiry; auto-refreshed |
| Error containment | Structured error dicts; no raw exception propagation |
| HTTPS enforcement | All Daraja API calls HTTPS-only |
| No hardcoded secrets | All credentials via environment variables |
See SECURITY.md for the full compliance table.
Reference: NSA CSI_MCP_SECURITY.pdf — May 2026, UNCLASSIFIED
pip install mpesa-mcp
Or run directly with uvx:
uvx mpesa-mcp
Set these environment variables before starting the server:
# M-Pesa (Safaricom Dara
... [View full README on GitHub](https://github.com/gabrielmahia/mpesa-mcp#readme)