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
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.
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.
About
Use cases: payments-billing, finance-accounting
Reviews
Write a reviewNo 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_hintmpesa_account_balancempesa_dynamic_qrmpesa_imsi_querympesa_pull_transactionsmpesa_query_org_infompesa_sim_swap_querympesa_stk_querympesa_transaction_status
Write 1 · Create, change, send or run things.
mpesa_bill_manager_optin
Delete 13 · Delete, drop, revoke or wipe things.
airtime_sendmpesa_b2b_express_checkoutmpesa_b2cmpesa_bill_manager_cancelmpesa_bill_manager_invoicempesa_business_buygoodsmpesa_business_paybillmpesa_business_pochimpesa_ratiba_creatempesa_reversalmpesa_stk_pushmpesa_tax_remittance
Show 1 more tools
sms_send
Network hosts it talks to 6
aikungfu.dev· found in codeapi.safaricom.co.ke· found in codegabrielmahia.github.io· found in codegithub.com· found in codeglama.ai· found in codesandbox.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 dataSend 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-onlyReturns 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-onlyQuery 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 dataStart 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 dataSend 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 dataCancel 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 dataCreate 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 InEnrol 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 dataPay 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 dataPay 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 dataPay 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-onlyGenerate 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-onlyVerify 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-onlyPull 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-onlyValidate 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 dataCreate 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 dataReverse 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-onlyCheck 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 dataSend 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-onlyCheck 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 dataRemit 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-onlyQuery 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 dataSend 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
- Repository
- github.com/gabrielmahia/mpesa-mcp
- First seen
- Oct 24, 2026
- Last checked
- Oct 26, 2026
More from gabrielmahia
- 0.630score
Wapimaji MCP
gabrielmahia
Kenya drought-response toolkit: simulated drought phases, confirmed SMS alerts, coordination events
ConnectorAFreshness: ALocal★ 1↓ 404/wkClaude Code +5 - 0.618score
Bima MCP
gabrielmahia
Kenya insurance MCP: sample products, NHIF-era coverage figures, illustrative crop risk.
ConnectorAFreshness: ALocalRead-only↓ 517/wkClaude Code +5 - 0.617score
Haki Ya Kazi MCP
gabrielmahia
Kenya labour rights: 2026 minimum wages, dismissal, leave, unions, labour court.
ConnectorAFreshness: ALocalRead-only↓ 504/wkClaude Code +5 - 0.617score
Kra MCP
gabrielmahia
Kenya tax tools: PAYE calculator (2026 rates), VAT, PIN, filing calendar, withholding.
ConnectorAFreshness: ALocalRead-only↓ 495/wkClaude Code +5 - 0.617score
Familia MCP
gabrielmahia
Kenya family-law guides: succession, wills, trusts, diaspora property, caretaker records.
ConnectorAFreshness: ALocalRead-only↓ 475/wkClaude Code +5 - 0.615score
Decision Intelligence MCP
gabrielmahia
Public-domain military strategy and philosophy texts as MCP tools: Sun Tzu, Napoleon and more.
ConnectorAFreshness: ALocalRead-only↓ 402/wkClaude Code +5
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.
Cite this page
Mpesa MCP. Agent Mart. https://agentmart.dev/connectors/gabrielmahia-mpesa-mcp (last updated 2026-10-26)