daraja-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DARAJA_MODE | No | The mode: simulator, sandbox, or production. Defaults to simulator when no credentials are set. | simulator |
| DARAJA_PASSKEY | No | Lipa na M-Pesa passkey, for STK push. | |
| DARAJA_SHORTCODE | No | PayBill or till number. | |
| DARAJA_CONSUMER_KEY | No | Consumer key from your Daraja app. | |
| DARAJA_CALLBACK_PORT | No | Local listener port, default 8787. | 8787 |
| DARAJA_CALLBACK_CIDRS | No | Override allowed source ranges for callbacks. | |
| DARAJA_INITIATOR_NAME | No | Initiator name for B2C, B2B, reversals, balance. | |
| DARAJA_CONSUMER_SECRET | No | Consumer secret from your Daraja app. | |
| DARAJA_DISABLE_RECEIVER | No | Skip the callback listener entirely (e.g., 'true' or 'false'). | |
| DARAJA_CALLBACK_PUBLIC_URL | No | Public URL Safaricom can reach. | |
| DARAJA_SECURITY_CREDENTIAL | No | Encrypted initiator password. | |
| DARAJA_CALLBACK_PATH_SECRET | No | Unguessable path segment to protect callbacks. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| stk_pushA | Send an M-Pesa payment prompt (STK push) to a customer. Returns immediately with an acknowledgement; it does NOT confirm payment. Use stk_push_and_wait if you need the outcome. |
| stk_push_and_waitA | Send an M-Pesa payment prompt and wait for the customer to accept or decline. Returns the settled outcome including the receipt number on success. Use this when you need to know whether the payment actually completed. |
| stk_queryB | Query the status of a previous STK push using its CheckoutRequestID. |
| ratiba_createA | Create an M-Pesa Ratiba standing order for recurring collection: subscriptions, loan repayments, insurance premiums, SACCO contributions. The customer approves via an M-Pesa prompt. The standing order name must be unique per customer. |
| ratiba_create_and_waitA | Create an M-Pesa Ratiba standing order and wait for the customer to approve it. Returns the settled outcome including the reminder schedule id. |
| generate_qrB | Generate a dynamic M-Pesa QR code for a specific amount and till or paybill. |
| b2c_paymentA | Pay money out to a customer: refunds, withdrawals, salaries, promotional winnings. Asynchronous; the result arrives on a callback. |
| b2c_payment_and_waitB | Pay money out to a customer and wait for the result callback, returning the receipt number on success. |
| b2b_paymentB | Pay another business: a PayBill, a Buy Goods till, or a B2C working account top-up. |
| tax_remittanceB | Remit tax to the Kenya Revenue Authority using a Payment Registration Number. |
| business_to_pochiC | Pay a Pochi la Biashara number. |
| account_balanceB | Query the balance of your M-Pesa business account. Asynchronous; the balance arrives on a callback as a pipe-delimited string per account type. |
| transaction_statusA | Check the status of any past transaction by receipt number, or by conversation id when the original request timed out. Use this before retrying a payment you are unsure about. |
| reversalB | Reverse a transaction that was paid into your shortcode. |
| c2b_register_urlsA | Register the validation and confirmation URLs that Daraja calls when a customer pays your PayBill or till directly. Required once per shortcode before C2B notifications work. |
| c2b_simulateA | Simulate a customer paying your shortcode. Sandbox and simulator only. |
| pull_registerA | Register a shortcode for the Pull Transactions API, which lets you fetch missed C2B transactions after an outage. |
| pull_transactionsA | Fetch C2B transactions for a time window. Useful for reconciliation when callbacks were missed. |
| check_sim_swapA | Return the date a number was last SIM-swapped. A recent swap is a strong fraud signal; check this before disbursing to an unfamiliar number. |
| check_age_on_networkA | Return the date a number was first registered on the Safaricom network. Very new lines carry elevated fraud risk. |
| validate_identityB | Check whether a phone number is registered against a given national ID number. |
| query_org_infoA | Look up the registered name and tariff of a PayBill or till. Use this to confirm you are paying the business you intend to before sending money. |
| list_callbacksA | List callbacks this server has received, newest first. |
| get_callbackA | Fetch the full callback payload for a correlation id. |
| server_healthA | Report the current mode, which credentials are configured, and callback receiver status. Start here when something is not working. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/parseen254/daraja-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server