Skip to content
Agentmart
Submit a tool

Mpesa MCP

M-Pesa Daraja and Africa's Talking MCP server: 23 tools; live payments and SMS need confirmation.

Connector by gabrielmahia · GitHub account verified by the MCP Registry

IndexedMITLocal (stdio)★ 4
Write a review

Chalk Labs

Need help deploying Mpesa MCP?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.

npx agentmarket install connector/gabrielmahia-mpesa-mcp

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

M-Pesa Daraja and Africa's Talking MCP server: 23 tools; live payments and SMS need confirmation.

Use cases: payments-billing, finance-accounting

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.

Tools
9 read · 1 write · 13 delete
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Tools by what they do 23

Read from the source code; the running server may list different tools.

Read 9 · Look things up without changing anything.

  • get_model_hint
  • mpesa_account_balance
  • mpesa_dynamic_qr
  • mpesa_imsi_query
  • mpesa_pull_transactions
  • mpesa_query_org_info
  • mpesa_sim_swap_query
  • mpesa_stk_query
  • mpesa_transaction_status

Write 1 · Create, change, send or run things.

  • mpesa_bill_manager_optin

Delete 13 · Delete, drop, revoke or wipe things.

  • airtime_send
  • mpesa_b2b_express_checkout
  • mpesa_b2c
  • mpesa_bill_manager_cancel
  • mpesa_bill_manager_invoice
  • mpesa_business_buygoods
  • mpesa_business_paybill
  • mpesa_business_pochi
  • mpesa_ratiba_create
  • mpesa_reversal
  • mpesa_stk_push
  • mpesa_tax_remittance
Show 1 more tools
  • sms_send

Network hosts it talks to 6

  • aikungfu.dev · found in code
  • api.safaricom.co.ke · found in code
  • gabrielmahia.github.io · found in code
  • github.com · found in code
  • glama.ai · found in code
  • sandbox.safaricom.co.ke · found in code

Tools (23)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • airtime_sendSend Airtimecan change or delete data

    Send airtime to a phone (Safaricom, Airtel, MTN, Vodafone and others) in a currency. Use only when the user has explicitly approved this exact top-up. MOVES MONEY: in live mode it needs confirm_send=true and refuses amounts above the per-transaction cap (MPESA_MAX_AMOUNT_KES, default KES 100,000); the sandbox is never restricted. Returns the Africa's Talking response or a refusal saying what is missing.

  • get_model_hintModel Hintread-only

    Returns neutral guidance on choosing a model for these tools; no model is recommended and no benchmark or pricing claims are made. Use when someone asks which model to pair with this server. Takes no arguments. Returns a null recommendation, guidance, a deprecation note and the tool count (23). Read-only.

  • mpesa_account_balanceM-Pesa Account Balanceread-only

    Query the balance of your business M-PESA account (shortcode or till). Use when someone asks how much is in the account. identifier_type 4 (default) means an organisation shortcode. Returns the Daraja response, with the balance delivered on your result URL. Read-only.

  • mpesa_b2b_express_checkoutB2B Express Checkoutcan change or delete data

    Start a B2B Express Checkout: a USSD push to another merchant's till so they approve a payment from your account. Use only when the user has explicitly approved this exact payment. MOVES MONEY: in live mode it needs confirm_send=true (set only after the user approves this exact payment) and refuses amounts above the per-transaction cap (MPESA_MAX_AMOUNT_KES, default KES 100,000); the sandbox is never restricted. Returns success, the Daraja response and the sandbox flag, or a refusal saying what is missing; the final result arrives asynchronously on your result URL.

  • mpesa_b2cM-Pesa B2Ccan change or delete data

    Send money from your business shortcode to a customer's phone (Business to Customer). Use only when the user has explicitly approved this exact payment. MOVES MONEY: in live mode it needs confirm_send=true (set only after the user approves this exact payment) and refuses amounts above the per-transaction cap (MPESA_MAX_AMOUNT_KES, default KES 100,000); the sandbox is never restricted. Returns success, the Daraja response and the sandbox flag, or a refusal saying what is missing; the final result arrives asynchronously on your result URL.

  • mpesa_bill_manager_cancelBill Manager — Cancel Invoicecan change or delete data

    Cancel an outstanding Bill Manager invoice by its external reference. Use when an invoice was raised in error or is no longer due. Returns the Daraja response. Cancels the invoice, so have the user approve it first; the customer will no longer be able to pay it, and a cancelled invoice cannot be restored through this tool.

  • mpesa_bill_manager_invoiceBill Manager — Create Invoicecan change or delete data

    Create a Bill Manager invoice: the customer receives an SMS with the amount and a way to pay. Use when billing a customer. Sends an SMS to the customer's phone in live mode, so have the user approve the customer, amount and due date first. Returns the Daraja response for the invoice.

  • mpesa_bill_manager_optinBill Manager — Opt In

    Enrol your business in M-PESA Bill Manager, a one-time setup for sending invoices with payment links. Use before creating invoices. Takes the notification email and an optional logo and callback URL. Returns the Daraja response. Changes your Bill Manager registration.

  • mpesa_business_buygoodsBusiness Buy Goods (B2B)can change or delete data

    Pay from your business shortcode to a till (Buy Goods) number. Use only when the user has explicitly approved this exact payment. MOVES MONEY: in live mode it needs confirm_send=true (set only after the user approves this exact payment) and refuses amounts above the per-transaction cap (MPESA_MAX_AMOUNT_KES, default KES 100,000); the sandbox is never restricted. Returns success, the Daraja response and the sandbox flag, or a refusal saying what is missing; the final result arrives asynchronously on your result URL.

  • mpesa_business_paybillBusiness Pay Bill (B2B)can change or delete data

    Pay from your business shortcode directly to another paybill number (B2B PayBill). Use only when the user has explicitly approved this exact payment. MOVES MONEY: in live mode it needs confirm_send=true (set only after the user approves this exact payment) and refuses amounts above the per-transaction cap (MPESA_MAX_AMOUNT_KES, default KES 100,000); the sandbox is never restricted. Returns success, the Daraja response and the sandbox flag, or a refusal saying what is missing; the final result arrives asynchronously on your result URL.

  • mpesa_business_pochiBusiness to Pochi la Biasharacan change or delete data

    Pay from your business shortcode to a Pochi la Biashara micro-business wallet by phone number. Use only when the user has explicitly approved this exact payment. MOVES MONEY: in live mode it needs confirm_send=true (set only after the user approves this exact payment) and refuses amounts above the per-transaction cap (MPESA_MAX_AMOUNT_KES, default KES 100,000); the sandbox is never restricted. Returns success, the Daraja response and the sandbox flag, or a refusal saying what is missing; the final result arrives asynchronously on your result URL.

  • mpesa_dynamic_qrDynamic QR Coderead-only

    Generate a dynamic M-PESA QR code for a specific amount and reference. Use when a customer should pay by scanning. Returns qr_base64 (a PNG), qr_data_url usable in an HTML img tag, and the merchant, amount and reference. The QR encodes the amount you pass, so check it before showing it to a customer. Read-only; it changes nothing.

  • mpesa_imsi_queryIMSI Query — Phone Verificationread-only

    Verify a Safaricom number: registration date, SIM age, last swap date and a hashed IMSI, with risk indicators (recently swapped; SIM age below 30 as returned by the API). Use for identity or fraud checks before onboarding or paying. This queries personal data about a subscriber: do so only with a lawful basis and any consent required under the Data Protection Act 2019. Returns those fields and the risk indicators. Read-only.

  • mpesa_pull_transactionsPull C2B Transactionsread-only

    Pull C2B transactions in a date range for reconciliation. Use when reconciling payments received. start_date and end_date use YYYY-MM-DD HH:MM:SS; offset pages through results from 0. Returns count, the transactions, the response code and message. Read-only.

  • mpesa_query_org_infoQuery Org Inforead-only

    Validate a shortcode and return its registered organisation name and tariff type. Use before paying a paybill or till to confirm who will actually receive the money, which helps catch a mistyped number or a lookalike business name. Returns the Daraja organisation details (registered name and tariff type). Read-only; it changes nothing.

Show 8 more tools
  • mpesa_ratiba_createM-PESA Ratiba — Create Standing Ordercan change or delete data

    Create an M-PESA Ratiba standing order: automated recurring payments collected from a customer's phone. Use when a customer wants to pay a regular amount. The customer must approve on their handset; confirm the amount, dates and customer with the user first, since this creates a recurring commitment. frequency 1 one-off, 2 daily, 3 weekly, 4 monthly (default), 5 bi-monthly, 6 quarterly, 7 half-year, 8 annually. Returns success, standing_order_id, response code, message and frequency_label.

  • mpesa_reversalM-Pesa Reversalcan change or delete data

    Reverse an erroneous M-PESA transaction by its receipt number. Use only when the user has explicitly approved reversing this exact transaction. MOVES MONEY: in live mode it needs confirm_send=true (set only after the user approves this exact payment) and refuses amounts above the per-transaction cap (MPESA_MAX_AMOUNT_KES, default KES 100,000); the sandbox is never restricted. Returns success, the Daraja response and the sandbox flag, or a refusal saying what is missing; the final result arrives asynchronously on your result URL.

  • mpesa_sim_swap_querySIM Swap Queryread-only

    Check whether a phone number's SIM was recently swapped, a fraud signal before sending money. Use before a disbursement to an unfamiliar or high-value recipient. This queries personal data about a subscriber: do so only with a lawful basis and any consent required under the Data Protection Act 2019. Returns phone, swap_detected, last_swap_date, a risk level (HIGH if swapped) and a recommendation. Read-only.

  • mpesa_stk_pushM-Pesa STK Pushcan change or delete data

    Send an M-PESA payment prompt (STK Push) to a customer's phone for them to approve with their PIN. Use when a customer is to pay your business shortcode. The customer must approve on the handset: nothing is taken without their PIN. Returns success, checkout_request_id, merchant_request_id, response code, message and the sandbox flag; success means the prompt was SENT, not that the customer paid, so poll mpesa_stk_query. In live mode it prompts a real phone.

  • mpesa_stk_queryM-Pesa STK Queryread-only

    Check the status of an STK Push using its checkout_request_id. Use 10 to 30 seconds after mpesa_stk_push to learn whether the customer paid, cancelled or the request is still processing. Returns the Daraja status for that request with the sandbox flag. Read-only.

  • mpesa_tax_remittanceTax Remittance to KRAcan change or delete data

    Remit tax from your M-PESA business account to the Kenya Revenue Authority. Use only when the user has explicitly approved this exact remittance. MOVES MONEY: in live mode it needs confirm_send=true (set only after the user approves this exact payment) and refuses amounts above the per-transaction cap (MPESA_MAX_AMOUNT_KES, default KES 100,000); the sandbox is never restricted. Returns success, the Daraja response and the sandbox flag, or a refusal saying what is missing; the final result arrives asynchronously on your result URL.

  • mpesa_transaction_statusM-Pesa Transaction Statusread-only

    Query the status of any M-PESA transaction by its receipt number. Use when you need to confirm what happened to a payment, or to reconcile one against your records after an STK Push, B2C or reversal. Returns the Daraja response for that transaction, whose full details can arrive asynchronously on your result URL. Read-only; it changes nothing.

  • sms_sendSend SMScan change or delete data

    Send an SMS to up to 1,000 recipients through Africa's Talking. Use only when the user has explicitly approved this exact message and recipient list. SENDS TO REAL PEOPLE: in live mode it needs confirm_send=true and refuses more recipients than the per-call cap (MPESA_MAX_SMS_RECIPIENTS, default 50); the sandbox is never restricted. Returns the number sent and failed, any failures, a summary and per-recipient status, cost and id, or a refusal saying what is missing. Sending cannot be undone.

Signals

Stars
4
Forks
2
Open issues
0
Weekly downloads
414
Last commit
Oct 22, 2026 (8 days ago)
Last release
Oct 25, 2026 (5 days ago)
Last package publish
Oct 22, 2026 (8 days ago)

From GitHub (fetched Oct 24, 2026) and the package registry.

Details

Registry name
io.github.gabrielmahia/mpesa-mcp
Version
0.4.5
Auth
No auth
Packages
pypi mpesa-mcp
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 26, 2026

More from gabrielmahia

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get Mpesa MCP running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying Mpesa MCP?

CallGet help
Cite this page

Mpesa MCP. Agent Mart. https://agentmart.dev/connectors/gabrielmahia-mpesa-mcp (last updated 2026-10-26)