Skip to content
verify mcp Beta VerifyMCP is currently in beta. If you notice any issues, get in touch and we’ll put it right.

io.github.gabrielmahia/mpesa-mcp

PYPI · MPESA-MCP

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

Available components

−15 this week 80 Trust /100

Last scanned (23 hours ago)

Scores higher than 80% of PyPI servers

Category Finance and Payments

Trust breakdown (7 categories)

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →

Supply Chain Security50
  • Malware scan not yet available for this package.Unverified
  • No known CVEs affecting this package version or its production dependencies.Pass
  • Runs setuptools.build_meta at install time, a recognised build step with no custom scripting around it. View diagnostics → Pass
  • 2 of 25 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency100
  • Source repository is publicly reachable at the declared URL. View diagnostics → Pass
  • Cryptographically verified build provenance (signed, bound to gabrielmahia/mpesa-mcp). View diagnostics → Pass
  • Clear OSI-approved license (MIT).Pass
  • Actively maintained (last published 1 days ago).Pass
  • Publishes a security disclosure policy (SECURITY.md).Pass
Schema Quality & AI Usability72
  • AI-judged instruction clarity (excellent).Pass
  • Context-footprint check failed: tool/resource definitions use about 3830 tokens (~159/item across 24 items; 24 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
  • Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management100
  • No destabilizing schema changes in the last 30 days.Pass
Tool Coverage100
  • 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
  • 100% of tool parameters carry a description.Pass
  • Structured output schemas are declared (100% of tools); any adoption earns full credit.Pass
Tool Safety100
  • No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
  • All 7 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation.Pass
  • An AI judge read all 25 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
  • Implements a current MCP spec version (2026-07-28).Pass
Changelog

Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.

  • 2 Nov 26 −15
    • Malware scan: pass → unverified ▼ security
    • Package version: 0.5.0 → 0.5.1 functional
  • 30 Oct 26 0
    • Stability: 0.97 → pass security
  • 29 Oct 26 0
    • Stability: pass → 0.97 functional
  • 28 Oct 26 +15
    • Malware scan: unverified → pass ▲ security
  • 27 Oct 26 −15
    • Malware scan: pass → unverified ▼ security
    • Package version: 0.4.5 → 0.5.0 functional
    • Package version: 0.4.5 → 0.4.6 functional
  • 25 Oct 26 0
    • Stability: pass → unverified ▼ security
    • Tool safety: pass → unverified ▼ security
    • Capabilities: pass → unverified ▼ functional
    • Tool coverage: 100 → unverified ▼ functional
    • Package version: 0.4.4 → 0.4.5 functional
  • 23 Oct 26 +16
    • Malware scan: unverified → pass ▲ security
    • Stability: 0.97 → pass security
  • 22 Oct 26 +10
    • Malware scan: unverified → pass ▲ security
    • Provenance: unverified → pass ▲ security
    • The attested source repository moved: gabrielmahia/mpesa-mcp security
    • Stability: pass → 0.97 functional
    • Package version: 0.4.3 → 0.4.4 functional
Diagnostics

Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.

Captured 4 Nov 2026 · Analysed pypi/mpesa-mcp@0.5.1

Provenance Verified

A signed build attestation was found and verified, binding this exact artifact to the source repository it claims to come from.

Result Verified
Ecosystem pypi
Reason Verified
Discovered via Registry attestation endpoint
Source repo gabrielmahia/mpesa-mcp
Certificate issuer https://token.actions.githubusercontent.com
Certificate SAN https://github.com/gabrielmahia/mpesa-mcp/.github/workflows/publish.yml@refs/tags/v0.5.1
Rekor log index 3646739533
Predicate type PyPI publish attestation https://docs.pypi.org/attestations/publish/v1
Subject digest sha256:0c0387b838bc8c5b9ef311631d788f7fd72995985a97e02a0211b591797216cb

Background: How many MCP packages publish verified provenance →

Install scripts 1 script
Hook Tier Command
build_backend allowlisted setuptools.build_meta

Background: Why install scripts are a supply-chain risk →

Dependencies 25 packages
Packages resolved 25
Stale 2
Tree resolution Complete

Background: SBOMs and build attestations, explained →

MCP tools · 24 exposed · ~3,750 tokens

The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →

Tool Tokens
airtime_send ~242

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.

NameTypeReqDescription
amountstringyesAmount as string e.g. '50'. Denominated in currency_code, NOT always KES.
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved this exact payment (recipient and amount). Ignored in sandbox.
currency_codestring–ISO currency: KES, TZS, UGX, RWF, NGN, GHS, ZAR, ETB, MWK, ZMW. MUST match the recipient's country — a mismatch is rejected, not silently sent.
phonestringyesRecipient phone in E.164 format e.g. '+254712345678'

Structured output declared, but exposes no named fields.

No examples provided.

get_model_hint ~70

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.

Input schema present but exposes no named parameters.

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_account_balance ~104

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.

NameTypeReqDescription
identifier_typestring–1=MSISDN, 2=Till, 4=Shortcode/Paybill
remarksstring–Query remarks

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_b2b_express_checkout ~214

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.

NameTypeReqDescription
account_referencestringyesAccount reference for the transaction
amountintegeryesAmount in KES
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved this exact payment (recipient and amount). Ignored in sandbox.
receiver_tillstringyesRecipient till number
remarksstring–Remarks

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_b2c ~222

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.

NameTypeReqDescription
amountintegeryesAmount in KES to send
command_idstring–SalaryPayment | BusinessPayment | PromotionPayment
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved this exact payment (recipient and amount). Ignored in sandbox.
occasionstring–Optional occasion label
phonestringyesRecipient phone number (any Kenyan format)
remarksstring–Remarks (max 100 chars)

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_bill_manager_cancel ~93

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.

NameTypeReqDescription
external_referencestringyesThe externalReference used when creating the invoice

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_bill_manager_invoice ~161

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.

NameTypeReqDescription
account_refstring–Account reference for the payment
amountnumberyesInvoice amount in KES
billing_refstringyesCustomer billing account reference
due_datestringyesPayment due date YYYY-MM-DD
external_refstringyesYour internal invoice/reference number
invoice_namestringyesInvoice description shown to customer
phonestringyesCustomer phone to receive SMS notification

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_bill_manager_optin ~108

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.

NameTypeReqDescription
callback_urlstring–Callback URL for Bill Manager events
emailstringyesBusiness email for Bill Manager notifications
logo_urlstring–HTTPS URL to your business logo (PNG/JPG)

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_business_buygoods ~189

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.

NameTypeReqDescription
amountintegeryesAmount in KES
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved this exact payment (recipient and amount). Ignored in sandbox.
remarksstring–Transaction remarks
till_numberstringyesDestination till number (Buy Goods)

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_business_paybill ~206

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.

NameTypeReqDescription
account_referencestringyesAccount number at destination paybill
amountintegeryesAmount in KES
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved this exact payment (recipient and amount). Ignored in sandbox.
receiver_paybillstringyesDestination paybill shortcode
remarksstring–Transaction remarks

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_business_pochi ~195

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.

NameTypeReqDescription
amountintegeryesAmount in KES
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved this exact payment (recipient and amount). Ignored in sandbox.
phonestringyesPochi wallet owner phone number
remarksstring–Remarks

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_dynamic_qr ~179

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.

NameTypeReqDescription
amountintegeryesAmount in KES to encode in QR
merchant_namestringyesBusiness/merchant name to display on QR
qr_sizeinteger–QR image size in pixels (300-1000)
ref_nostringyesTransaction reference number
trx_codestring–BG=Buy Goods, PB=Paybill, WA=Wallet, SM=Send Money, SB=Lipa Shortcode

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_imsi_query ~113

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.

NameTypeReqDescription
phonestringyesPhone number to verify

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_pull_transactions ~116

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.

NameTypeReqDescription
end_datestringyesEnd date YYYY-MM-DD HH:MM:SS
offsetinteger–Pagination offset (0-based)
start_datestringyesStart date YYYY-MM-DD HH:MM:SS

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_query_org_info ~93

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.

NameTypeReqDescription
shortcodestringyesShortcode to validate (paybill or till number)

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_ratiba_create ~254

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.

NameTypeReqDescription
account_refstringyesAccount reference for each payment
amountintegeryesAmount in KES per payment
descriptionstring–Standing order description
end_datestringyesEnd date YYYYMMDD
frequencystring–1=One-Off 2=Daily 3=Weekly 4=Monthly 5=Bi-Monthly 6=Quarterly 7=Half-Year 8=Annually
phonestringyesCustomer phone number
standing_order_namestringyesName for the standing order
start_datestringyesStart date YYYYMMDD

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_reversal ~198

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.

NameTypeReqDescription
amountintegeryesAmount to reverse in KES
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved this exact payment (recipient and amount). Ignored in sandbox.
remarksstring–Reason for reversal
transaction_idstringyesM-Pesa receipt to reverse e.g. QKL8XXXXXX

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_session_report ~100

Report this server session's spending limits and what the server itself has authorised so far. Use before a payment to check the budget left, or after one to verify what was actually authorised, from the server's own record and not the model's account. Returns the per-payment cap, the session budget, spent and remaining, whether a recipient allowlist is active, counts, and the last ten authorisations or refusals with recipients masked. Read-only.

Input schema present but exposes no named parameters.

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_sim_swap_query ~112

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.

NameTypeReqDescription
phonestringyesPhone number to check for SIM swap activity

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_stk_push ~190

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.

NameTypeReqDescription
account_refstringyesAccount reference shown to customer on phone (max 12 chars)
amountintegeryesAmount in KES (whole number, min 1, max 150000)
descriptionstring–Transaction description (max 13 chars)
phonestringyesCustomer phone (any Kenyan format: +254..., 07..., 254...)

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_stk_query ~88

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.

NameTypeReqDescription
checkout_request_idstringyesCheckoutRequestID from mpesa_stk_push response

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_tax_remittance ~196

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.

NameTypeReqDescription
account_referencestringyesKRA Payment Registration Number (PRN)
amountintegeryesTax amount in KES
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved this exact payment (recipient and amount). Ignored in sandbox.
remarksstring–Remittance remarks

Structured output declared, but exposes no named fields.

No examples provided.

mpesa_transaction_status ~103

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.

NameTypeReqDescription
transaction_idstringyesM-Pesa receipt number e.g. QKL8XXXXXX

Structured output declared, but exposes no named fields.

No examples provided.

sms_send ~204

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.

NameTypeReqDescription
confirm_sendboolean–Required in live mode: set true ONLY after the user has explicitly approved sending this exact message to these recipients.
messagestringyesSMS message text. Unicode supported (Kiswahili etc.)
recipientsarrayyesPhone numbers in E.164 format e.g. ['+254712345678']
sender_idstring–Optional pre-registered alphanumeric sender ID

Structured output declared, but exposes no named fields.

No examples provided.

Install

How do I install the io.github.gabrielmahia/mpesa-mcp server?

io.github.gabrielmahia/mpesa-mcp runs locally as a PyPI package, launched with uvx mpesa-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

pypi · mpesa-mcp

# add to Claude Code
claude mcp add gabrielmahia-mpesa-mcp -- uvx mpesa-mcp
Common questions

What is the io.github.gabrielmahia/mpesa-mcp server?

io.github.gabrielmahia/mpesa-mcp is listed in the public MCP registry as io.github.gabrielmahia/mpesa-mcp. M-Pesa Daraja and Africa's Talking MCP server: 24 tools; live payments and SMS need confirmation. This page covers its PyPI package (mpesa-mcp).

Is the io.github.gabrielmahia/mpesa-mcp server safe to use?

io.github.gabrielmahia/mpesa-mcp scores 80 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 4 November 2026. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

What tools does the io.github.gabrielmahia/mpesa-mcp server expose?

io.github.gabrielmahia/mpesa-mcp exposes 24 tools: mpesa_stk_push, mpesa_stk_query, mpesa_b2c, mpesa_business_paybill, mpesa_business_buygoods, and 19 more. Their descriptions and schemas cost roughly 3,750 tokens of context every time the server is loaded.

Is the io.github.gabrielmahia/mpesa-mcp server still maintained?

io.github.gabrielmahia/mpesa-mcp is still listed as active in the MCP registry. We last reached this channel on 4 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

What licence is the io.github.gabrielmahia/mpesa-mcp server under?

io.github.gabrielmahia/mpesa-mcp declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.