Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI โ†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE โ†— (opens in a new tab)
  • llms.txt โ†— (opens in a new tab)
  • Catalog JSON โ†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub โ†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
ยฉ 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. ๐Ÿ’ฐ Finance & Fintech
  3. Mpesa MCP
Mpesa MCP logo
Health: ActiveRecent health check succeeded.Last checked 9/9/2026, 12:18:08 PM

Mpesa MCP

User RatingsBe the first to rate and review this MCP server!
View Repository4 GitHub StarsTotal stargazers on GitHub for the source repository (4 stars).Visit Website
mpesapaymentsfintechsmsairtime

MCP server for M-Pesa payments plus Africa's Talking SMS and airtime services across African telecom networks.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Automated check passedโ€” started and listed 23 tools correctly (1mo ago).
Manual Client & Custom JSON ConfigExpand JSON โ–พ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "gabrielmahia-mpesa-mcp": {
      "command": "uvx",
      "args": [
        "mpesa-mcp"
      ]
    }
  }
}

๐Ÿ’ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Tool Schemas (23) Directory Badge Claim listing Alternatives๐Ÿ’ฐ More in Finance & Fintech

Overview

This server connects AI agents to Safaricom Daraja in Kenya and Africa's Talking services across 20+ African countries. It supports M-Pesa payment requests and status checks, SMS delivery, and airtime top-ups. Use it for agent workflows that need to initiate or monitor mobile-money and telecom transactions.

Use cases

โ€ขTrigger an M-Pesa STK Push payment
โ€ขCheck an STK Push or transaction receipt status
โ€ขSend SMS messages to African phone numbers
โ€ขTop up subscriber airtime
โ€ขBuild multi-step payment and notification workflows

Key features

โ€ขM-Pesa STK Push requests
โ€ขSTK Push status queries
โ€ขM-Pesa transaction status lookup
โ€ขSMS delivery to 1โ€“1,000 recipients
โ€ขAirtime top-ups across 20+ African networks
โ€ขSandbox and production Daraja configuration

Capabilities & Tool Schemas (23) ~3.4k tokensApproximate context cost of this serverโ€™s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Verified live Verified liveCaptured by calling this serverโ€™s live tools/list endpoint.

Inspect callable tools, capabilities, and parameters exposed to AI agents by Mpesa MCP.

mpesa_stk_push

Trigger M-Pesa STK Push โ€” sends payment prompt to customer's phone. Customer enters M-PESA PIN to complete payment. Returns CheckoutRequestID; poll mpesa_stk_query after 10-30 seconds.

mpesa_stk_query

Check STK Push status. Poll 10-30s after mpesa_stk_push. ResultCode 0 = success, 1032 = cancelled, 1037 = timed out.

mpesa_b2c

Business To Customer disbursement โ€” send money from shortcode to phone. Use for payroll, NGO field incentives, agent float, survey rewards. Result delivered async to MPESA_RESULT_URL. Requires MPESA_INITIATOR_NAME and MPESA_SECURITY_CREDENTIAL env vars.

mpesa_business_paybill

Pay directly from business shortcode to another paybill number. Use for supplier payments, utility bills, inter-business transfers. Requires MPESA_INITIATOR_NAME and MPESA_SECURITY_CREDENTIAL.

mpesa_business_buygoods

Pay from business shortcode to a till/buy-goods number. Requires MPESA_INITIATOR_NAME and MPESA_SECURITY_CREDENTIAL.

mpesa_business_pochi

Pay from business shortcode to a Pochi la Biashara micro-SME wallet. Used for micro-enterprise supplier payments and informal sector settlements. Requires MPESA_INITIATOR_NAME and MPESA_SECURITY_CREDENTIAL.

Documentation Overview

mpesa-mcp

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.

Tests PyPI License: MIT Glama Score smithery badge Glama NSA MCP Compliant

mpesa-mcp MCP server

Tested With

Code
claude-sonnet-5  (recommended โ€” call get_model_hint() for guidance)
claude-opus-4-8  (for highest-accuracy compliance reasoning)

Claude Sonnet 5 (released June 30, 2026) finishes multi-step M-PESA workflows without stopping short and self-corrects tool-call errors without prompting. Terminal-Bench score 80.4% vs Sonnet 4.6's 67.0% โ€” the benchmark most analogous to payment agent work.

Why this exists

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.

Tools

ToolDescription
mpesa_stk_pushTrigger STK Push payment prompt on customer's M-Pesa phone
mpesa_stk_queryCheck status of an STK Push request
mpesa_transaction_statusQuery any M-Pesa transaction by receipt number
sms_sendSend SMS to 1โ€“1,000 recipients across African networks
airtime_sendSend airtime top-up to any subscriber (KES, NGN, GHS, UGX, etc.)

Coverage

  • M-Pesa: Kenya (Safaricom Daraja v3) โ€” STK Push, C2B, transaction status
  • SMS/Airtime: Kenya, Nigeria, Ghana, Tanzania, Uganda, Rwanda, South Africa, and 15+ more via Africa's Talking

Glama (hosted MCP)

mpesa-mcp is available as a hosted MCP server on Glama:

mpesa-mcp MCP server mpesa-mcp score

Security โ€” NSA MCP Guidance Compliant

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.

The implementation below documents compliance against the NSA's MCP security framework, control by control.

NSA ControlImplementation
Parameter validationKE phone regex ^254[17]\d{8}$ + amount bounds [1โ€“150,000 KES]
Audit loggingStructured log per tool call; phone numbers SHA-256 hashed
Token lifecycleOAuth token cached with expiry; auto-refreshed
Error containmentStructured error dicts; no raw exception propagation
HTTPS enforcementAll Daraja API calls HTTPS-only
No hardcoded secretsAll credentials via environment variables

See SECURITY.md for the full compliance table.

Reference: NSA CSI_MCP_SECURITY.pdf โ€” May 2026, UNCLASSIFIED

Install

Terminal
pip install mpesa-mcp

Or run directly with uvx:

bash
uvx mpesa-mcp

Configuration

Set these environment variables before starting the server:

bash
# M-Pesa (Safaricom Daraja)
MPESA_CONSUMER_KEY=your_consumer_key
MPESA_CONSUMER_SECRET=your_consumer_secret
MPESA_SHORTCODE=174379               # sandbox test shortcode
MPESA_PASSKEY=your_passkey
MPESA_CALLBACK_URL=https://yourdomain.com/mpesa/callback
MPESA_SANDBOX=true                   # set false for production

# Africa's Talking
AT_USERNAME=sandbox                  # your AT username (sandbox for testing)
AT_API_KEY=your_at_api_key

Sandbox credentials

M-Pesa sandbox: https://developer.safaricom.co.ke โ€” create a free app to get test credentials.

  • Test shortcode: 174379
  • Test passkey: bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919

Africa's Talking sandbox: https://account.africastalking.com โ€” use username=sandbox, any API key.

Usage with Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

config.json
{
  "mcpServers": {
    "mpesa": {
      "command": "uvx",
      "args": ["mpesa-mcp"],
      "env": {
        "MPESA_CONSUMER_KEY": "your_key",
        "MPESA_CONSUMER_SECRET": "your_secret",
        "MPESA_SHORTCODE": "174379",
        "MPESA_PASSKEY": "your_passkey",
        "MPESA_CALLBACK_URL": "https://yourdomain.com/mpesa/callback",
        "MPESA_SANDBOX": "true",
        "AT_USERNAME": "sandbox",
        "AT_API_KEY": "your_at_key"
      }
    }
  }
}

Usage with Claude Code

Terminal
claude mcp add mpesa -- uvx mpesa-mcp

Set env vars in your shell before running claude.

Example prompts

Once connected, you can ask your AI agent:

"Send KES 500 STK Push to +254712345678 for order #1234"

"Check if the payment QKL8ABC123 has been received"

"Send an SMS to these 50 farmers with today's maize price: [list]"

"Top up KES 50 airtime for our field agents: [list of numbers]"

Real-world scenarios

Field agent payment dispatch

"Send KES 300 STK Push to each of these 12 field agents for today's data collection: [list]"

The agent triggers 12 sequential STK pushes, tracks each checkout_request_id, and polls for confirmation โ€” without any code from you.

Farmer alert + airtime

"SMS these 200 Garissa farmers that the river is rising. Then top up KES 20 airtime each so they can call in reports."

One prompt โ†’ 200 SMS messages and 200 airtime top-ups across Safaricom, Airtel, and Telkom.

Payment reconciliation

"Check whether receipt OKL8M3B2HF was a successful payment and how much it was for"

Useful for support agents using Claude to verify M-Pesa transactions in real time.

Tool annotations

All tools declare MCP tool annotations so clients can gate calls appropriately:

ToolreadOnlydestructiveidempotent
mpesa_stk_pushโŒโœ…โŒ
mpesa_stk_queryโœ…โŒโœ…
mpesa_transaction_statusโœ…โŒโœ…
sms_sendโŒโœ…โŒ
airtime_sendโŒโœ…โŒ

Claude Desktop and other MCP clients will request confirmation before triggering payment, SMS, or airtime operations.

Server discovery

Capabilities are advertised via .well-known/mcp.json โ€” the emerging MCP Server Cards standard. Registries and browsers can index this server's tools without connecting to it.

bash
# Check capabilities
curl https://raw.githubusercontent.com/gabrielmahia/mpesa-mcp/main/.well-known/mcp.json

Testing and accuracy

The MCP ecosystem benchmark (CData, 2026) found most MCP servers accurate 60โ€“75% of the time on complex queries โ€” particularly silent failures on write operations and partial parameter application.

mpesa-mcp is tested against all three Kenyan phone number formats, boundary amount values, and missing optional fields:

bash
pytest tests/ -v  # run full suite
pytest tests/test_phone_formats.py  # format normalization
pytest tests/test_boundary_amounts.py  # min/max amount edge cases

Write operations (STK push, SMS, airtime) have explicit validation before any API call is made.

Ecosystem context โ€” Mojaloop + MCP

Mojaloop (funded by the Gates Foundation) handles payment interoperability โ€” connecting banks, mobile money wallets, and merchants across DFSPs in East Africa and beyond.

mpesa-mcp handles the AI agent tooling layer โ€” enabling AI coding assistants to trigger and query M-Pesa payments programmatically.

These are complementary:

  • Mojaloop: the interoperability rails between financial providers
  • mpesa-mcp: the MCP interface layer that connects AI agents to those rails

See the Mojaloop documentation contribution for more on this pattern.

MCP vs A2A โ€” two different protocols

mpesa-mcp implements MCP (Model Context Protocol) โ€” how an AI agent talks to tools.

There is a complementary protocol, A2A (Agent-to-Agent), which handles how agents talk to each other. They solve different problems and work together:

  • MCP: Your AI agent โ†’ mpesa-mcp โ†’ Daraja API / Africa's Talking
  • A2A: Orchestrator agent โ†” payment sub-agent โ†” notification sub-agent

For most integrations you only need MCP. A2A becomes relevant when you're building multi-agent systems where a payment workflow coordinates with other specialized agents.


Development

bash
git clone https://github.com/gabrielmahia/mpesa-mcp
cd mpesa-mcp
pip install -e ".[dev]"
pytest tests/ -v

Read the full README โ†’View source on GitHub โ†’

Related MCP Servers

View all in Finance & Fintech View all alternatives
  • Xendit MCP logoXendit MCP

    Xendit payment gateway for Southeast Asia. Invoices, disbursements, balance checks, and bank transfers across Indonesia, Philippines, Thailand, Vietnam, and Malaysia. Install via npx xendit-mcp.

    ๐Ÿ’ฐ Finance & Fintech2 views
    Compare vs Xendit MCP โ†’
  • Brazilian Central Bank (BCB) MCP logoBrazilian Central Bank (BCB) MCP
    Verified

    MCP server for the Brazilian Central Bank (Banco Central do Brasil): SGS time series (Selic, IPCA, exchange rates, GDP and 139 curated, source-verified indicators), the Focus market-expectations survey and PTAX official exchange rates. 15 tools, 3 resources and 3 prompts, with provenance metadata on every response. Runs locally via npx (stdio) or through the hosted endpoint at https://bcb.sidneybissoli.com/mcp โ€” no API key or signup required.

    ๐Ÿ’ฐ Finance & Fintech7 views
    Compare vs Brazilian Central Bank (BCB) MCP โ†’
  • Mossgate MCP logoMossgate MCP

    mcp stdio server exposing mossgate trust and rue render apis with x402 usdc payment

    ๐Ÿ’ฐ Finance & Fintech6 views
    Compare vs Mossgate MCP โ†’
  • Spraay X402 MCP logoSpraay X402 MCP

    Pay-per-call onchain data, AI models, and batch USDC payments on Base via x402 micropayments. 9 tools including swap quotes, token prices, wallet balances, ENS resolution, and multi-recipient batch transfers.

    ๐Ÿ’ฐ Finance & Fintech3 views
    Compare vs Spraay X402 MCP โ†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks โ€” not a rating.

GitHub stars
4
Stargazers on the source repository.
Last commit
1mo ago
Most recent push to the default branch.
Availability
100%
Our rolling endpoint + install checks that succeeded.
Install check
Passed
Our sandbox started it and listed its tools.
Tools exposed
23
Callable tools this server registers over MCP.
Directory activity
1 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet โ€” be the first to share how this listing worked for you.

Frequently Asked Questions about Mpesa MCP

It supports Safaricom M-Pesa through the Daraja v3 API in Kenya.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMpesa MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gabrielmahia-mpesa-mcp?style=directory)](https://allmcps.com/mcp/gabrielmahia-mpesa-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/gabrielmahia-mpesa-mcp"><img src="https://allmcps.com/api/badge/gabrielmahia-mpesa-mcp?style=directory" alt="Mpesa MCP on AllMCPs" /></a>

Technical Specs & Signals

Category๐Ÿ’ฐFinance & Fintech
PricingBring your own API key (usage-based cost)
More technical detailsExpand โ–พ
TransportSTDIO
RuntimePython
AuthAPI key
LicenseMIT
ClientsClaude Desktop
Last updatedAug 9, 2026
Views1
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars4
GitHub Star CountTotal stargazers on GitHub representing community popularity (4 stars).
Last commit1mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Aug 1, 2026
69Quality signal: Great ยท 69/100How this signal is calculated โ–พ
Server availability25/25
Verified ownership10/20
Documentation & tools30/30
Adoption & activity4/15
Community engagement0/10

A guidance signal from public completeness & health data โ€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 27d ago via OSV.dev ยท mpesa-mcp (PyPI)

โ˜… FeaturedMoxie Docs MCP logo

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

Explore Server โ†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge โ€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it โ€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in ๐Ÿ’ฐ Finance & Fintech โ†’Best MCP servers for Finance & Fintech โ†’Alternatives to Mpesa MCP โ†’Install in Claude DesktopInstall in CursorInstall in VS Code