M-Pesa Daraja MCP
An MCP server and agent skills package for Safaricom's M-Pesa Daraja API. It enables AI agents to perform payment operations such as STK Push, C2B, B2C, and B2B transactions, as well as checking balances and reversing payments. The tool supports sandbox-first testing and idempotent operations, allowing agents to build integrations or handle payments directly via chat commands.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
Checks and signals
Each line is separate evidence, not a trust score.
- Popularity 3 GitHub stars
What you can do with it
- Send KES 250 to a phone number for an order
- Build a B2C payout job for driver earnings
- Check if a specific receipt transaction went through
- Pull yesterday's C2B transactions to match invoices
Source and maintenance
- Last repository push
- Latest release
- v0.1.5
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
mpesa-daraja-mcp 0.1.6
{
"version": "0.1.6",
"transport": "stdio",
"identifier": "mpesa-daraja-mcp",
"runtimeHint": "uvx",
"registryType": "pypi",
"environmentVariables": [
{
"name": "DARAJA_CONSUMER_KEY",
"isRequired": true,
"description": "Daraja app Consumer Key"
},
{
"name": "DARAJA_CONSUMER_SECRET",
"isRequired": true,
"description": "Daraja app Consumer Secret"
},
{
"name": "DARAJA_ENV",
"description": "sandbox (default) or production"
},
{
"name": "DARAJA_SHORTCODE",
"description": "Paybill / store number (174379 in sandbox)"
},
{
"name": "DARAJA_PASSKEY",
"description": "M-Pesa Express passkey (STK Push)"
},
{
"name": "DARAJA_INITIATOR_NAME",
"description": "API operator username (B2C, B2B, status, balance, reversal)"
},
{
"name": "DARAJA_SECURITY_CREDENTIAL",
"description": "Encrypted initiator password"
},
{
"name": "DARAJA_CALLBACK_BASE_URL",
"description": "Public HTTPS base for callback URLs"
},
{
"name": "DARAJA_CALLBACK_LISTEN",
"description": "host:port for the built-in callback receiver"
},
{
"name": "DARAJA_CALLBACK_TOKEN",
"description": "16+ random characters; secret path for callbacks"
},
{
"name": "DARAJA_TOOLSETS",
"description": "Comma list: stk,c2b,payouts,ops,qr,ratiba,billmanager"
},
{
"name": "DARAJA_READ_ONLY",
"description": "true hides every tool that moves money or writes"
},
{
"name": "DARAJA_APPROVAL_THRESHOLD",
"description": "Payouts above this many shillings need approval in the chat"
},
{
"name": "DARAJA_ALLOWED_RECIPIENTS",
"description": "Comma list of phones/shortcodes that payouts may go to"
},
{
"name": "DARAJA_ALLOW_LIVE_MONEY_MOVEMENT",
"description": "true to allow production charges and payouts"
},
{
"name": "DARAJA_INITIATOR_PASSWORD",
"description": "Initiator password, encrypted into SecurityCredential at startup (alternative to DARAJA_SECURITY_CREDENTIAL)"
},
{
"name": "DARAJA_CERT_PATH",
"description": "Path to Safaricom's public certificate, used with DARAJA_INITIATOR_PASSWORD"
},
{
"name": "DARAJA_STATE_DB",
"description": "Path of the SQLite file that stores request state and callbacks"
},
{
"name": "DARAJA_OUTPUT_DIR",
"description": "Directory where generated QR PNGs are saved"
},
{
"name": "DARAJA_CONFIG_DIR",
"description": "Directory holding the saved config (default: user config dir)"
},
{
"name": "DARAJA_DOTENV",
"description": "Path of a .env file to load instead of the project one"
},
{
"name": "DARAJA_MCP_TOKEN",
"description": "Bearer token for HTTP mode (32+ random characters)"
},
{
"name": "DARAJA_MCP_HOST",
"description": "HTTP mode bind address (default 127.0.0.1)"
},
{
"name": "DARAJA_MCP_PORT",
"description": "HTTP mode port (default 8000)"
},
{
"name": "DARAJA_FORWARD_URL",
"description": "Your app's URL: every callback is POSTed on to it, HMAC-signed"
},
{
"name": "DARAJA_FORWARD_SECRET",
"description": "HMAC secret for forwarded callbacks (16+ characters)"
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Maintenance history
Public check and source-refresh events. Editorial and ownership records remain private.
- · repository · passed · metadata changed · updated
- · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"m-pesa-daraja-mcp": {
"command": "uvx",
"args": [
"mpesa-daraja-mcp==0.1.6"
],
"env": {
"DARAJA_CONSUMER_KEY": "<YOUR_DARAJA_CONSUMER_KEY>",
"DARAJA_CONSUMER_SECRET": "<YOUR_DARAJA_CONSUMER_SECRET>",
"DARAJA_ENV": "<YOUR_DARAJA_ENV>",
"DARAJA_SHORTCODE": "<YOUR_DARAJA_SHORTCODE>",
"DARAJA_PASSKEY": "<YOUR_DARAJA_PASSKEY>",
"DARAJA_INITIATOR_NAME": "<YOUR_DARAJA_INITIATOR_NAME>",
"DARAJA_SECURITY_CREDENTIAL": "<YOUR_DARAJA_SECURITY_CREDENTIAL>",
"DARAJA_CALLBACK_BASE_URL": "<YOUR_DARAJA_CALLBACK_BASE_URL>",
"DARAJA_CALLBACK_LISTEN": "<YOUR_DARAJA_CALLBACK_LISTEN>",
"DARAJA_CALLBACK_TOKEN": "<YOUR_DARAJA_CALLBACK_TOKEN>",
"DARAJA_TOOLSETS": "<YOUR_DARAJA_TOOLSETS>",
"DARAJA_READ_ONLY": "<YOUR_DARAJA_READ_ONLY>",
"DARAJA_APPROVAL_THRESHOLD": "<YOUR_DARAJA_APPROVAL_THRESHOLD>",
"DARAJA_ALLOWED_RECIPIENTS": "<YOUR_DARAJA_ALLOWED_RECIPIENTS>",
"DARAJA_ALLOW_LIVE_MONEY_MOVEMENT": "<YOUR_DARAJA_ALLOW_LIVE_MONEY_MOVEMENT>",
"DARAJA_INITIATOR_PASSWORD": "<YOUR_DARAJA_INITIATOR_PASSWORD>",
"DARAJA_CERT_PATH": "<YOUR_DARAJA_CERT_PATH>",
"DARAJA_STATE_DB": "<YOUR_DARAJA_STATE_DB>",
"DARAJA_OUTPUT_DIR": "<YOUR_DARAJA_OUTPUT_DIR>",
"DARAJA_CONFIG_DIR": "<YOUR_DARAJA_CONFIG_DIR>",
"DARAJA_DOTENV": "<YOUR_DARAJA_DOTENV>",
"DARAJA_MCP_TOKEN": "<YOUR_DARAJA_MCP_TOKEN>",
"DARAJA_MCP_HOST": "<YOUR_DARAJA_MCP_HOST>",
"DARAJA_MCP_PORT": "<YOUR_DARAJA_MCP_PORT>",
"DARAJA_FORWARD_URL": "<YOUR_DARAJA_FORWARD_URL>",
"DARAJA_FORWARD_SECRET": "<YOUR_DARAJA_FORWARD_SECRET>"
}
}
}
}Cline
{
"mcpServers": {
"m-pesa-daraja-mcp": {
"command": "uvx",
"args": [
"mpesa-daraja-mcp==0.1.6"
],
"env": {
"DARAJA_CONSUMER_KEY": "<YOUR_DARAJA_CONSUMER_KEY>",
"DARAJA_CONSUMER_SECRET": "<YOUR_DARAJA_CONSUMER_SECRET>",
"DARAJA_ENV": "<YOUR_DARAJA_ENV>",
"DARAJA_SHORTCODE": "<YOUR_DARAJA_SHORTCODE>",
"DARAJA_PASSKEY": "<YOUR_DARAJA_PASSKEY>",
"DARAJA_INITIATOR_NAME": "<YOUR_DARAJA_INITIATOR_NAME>",
"DARAJA_SECURITY_CREDENTIAL": "<YOUR_DARAJA_SECURITY_CREDENTIAL>",
"DARAJA_CALLBACK_BASE_URL": "<YOUR_DARAJA_CALLBACK_BASE_URL>",
"DARAJA_CALLBACK_LISTEN": "<YOUR_DARAJA_CALLBACK_LISTEN>",
"DARAJA_CALLBACK_TOKEN": "<YOUR_DARAJA_CALLBACK_TOKEN>",
"DARAJA_TOOLSETS": "<YOUR_DARAJA_TOOLSETS>",
"DARAJA_READ_ONLY": "<YOUR_DARAJA_READ_ONLY>",
"DARAJA_APPROVAL_THRESHOLD": "<YOUR_DARAJA_APPROVAL_THRESHOLD>",
"DARAJA_ALLOWED_RECIPIENTS": "<YOUR_DARAJA_ALLOWED_RECIPIENTS>",
"DARAJA_ALLOW_LIVE_MONEY_MOVEMENT": "<YOUR_DARAJA_ALLOW_LIVE_MONEY_MOVEMENT>",
"DARAJA_INITIATOR_PASSWORD": "<YOUR_DARAJA_INITIATOR_PASSWORD>",
"DARAJA_CERT_PATH": "<YOUR_DARAJA_CERT_PATH>",
"DARAJA_STATE_DB": "<YOUR_DARAJA_STATE_DB>",
"DARAJA_OUTPUT_DIR": "<YOUR_DARAJA_OUTPUT_DIR>",
"DARAJA_CONFIG_DIR": "<YOUR_DARAJA_CONFIG_DIR>",
"DARAJA_DOTENV": "<YOUR_DARAJA_DOTENV>",
"DARAJA_MCP_TOKEN": "<YOUR_DARAJA_MCP_TOKEN>",
"DARAJA_MCP_HOST": "<YOUR_DARAJA_MCP_HOST>",
"DARAJA_MCP_PORT": "<YOUR_DARAJA_MCP_PORT>",
"DARAJA_FORWARD_URL": "<YOUR_DARAJA_FORWARD_URL>",
"DARAJA_FORWARD_SECRET": "<YOUR_DARAJA_FORWARD_SECRET>"
}
}
}
}VS Code
{
"servers": {
"m-pesa-daraja-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"mpesa-daraja-mcp==0.1.6"
],
"env": {
"DARAJA_CONSUMER_KEY": "<YOUR_DARAJA_CONSUMER_KEY>",
"DARAJA_CONSUMER_SECRET": "<YOUR_DARAJA_CONSUMER_SECRET>",
"DARAJA_ENV": "<YOUR_DARAJA_ENV>",
"DARAJA_SHORTCODE": "<YOUR_DARAJA_SHORTCODE>",
"DARAJA_PASSKEY": "<YOUR_DARAJA_PASSKEY>",
"DARAJA_INITIATOR_NAME": "<YOUR_DARAJA_INITIATOR_NAME>",
"DARAJA_SECURITY_CREDENTIAL": "<YOUR_DARAJA_SECURITY_CREDENTIAL>",
"DARAJA_CALLBACK_BASE_URL": "<YOUR_DARAJA_CALLBACK_BASE_URL>",
"DARAJA_CALLBACK_LISTEN": "<YOUR_DARAJA_CALLBACK_LISTEN>",
"DARAJA_CALLBACK_TOKEN": "<YOUR_DARAJA_CALLBACK_TOKEN>",
"DARAJA_TOOLSETS": "<YOUR_DARAJA_TOOLSETS>",
"DARAJA_READ_ONLY": "<YOUR_DARAJA_READ_ONLY>",
"DARAJA_APPROVAL_THRESHOLD": "<YOUR_DARAJA_APPROVAL_THRESHOLD>",
"DARAJA_ALLOWED_RECIPIENTS": "<YOUR_DARAJA_ALLOWED_RECIPIENTS>",
"DARAJA_ALLOW_LIVE_MONEY_MOVEMENT": "<YOUR_DARAJA_ALLOW_LIVE_MONEY_MOVEMENT>",
"DARAJA_INITIATOR_PASSWORD": "<YOUR_DARAJA_INITIATOR_PASSWORD>",
"DARAJA_CERT_PATH": "<YOUR_DARAJA_CERT_PATH>",
"DARAJA_STATE_DB": "<YOUR_DARAJA_STATE_DB>",
"DARAJA_OUTPUT_DIR": "<YOUR_DARAJA_OUTPUT_DIR>",
"DARAJA_CONFIG_DIR": "<YOUR_DARAJA_CONFIG_DIR>",
"DARAJA_DOTENV": "<YOUR_DARAJA_DOTENV>",
"DARAJA_MCP_TOKEN": "<YOUR_DARAJA_MCP_TOKEN>",
"DARAJA_MCP_HOST": "<YOUR_DARAJA_MCP_HOST>",
"DARAJA_MCP_PORT": "<YOUR_DARAJA_MCP_PORT>",
"DARAJA_FORWARD_URL": "<YOUR_DARAJA_FORWARD_URL>",
"DARAJA_FORWARD_SECRET": "<YOUR_DARAJA_FORWARD_SECRET>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"m-pesa-daraja-mcp": {
"command": "uvx",
"args": [
"mpesa-daraja-mcp==0.1.6"
],
"env": {
"DARAJA_CONSUMER_KEY": "<YOUR_DARAJA_CONSUMER_KEY>",
"DARAJA_CONSUMER_SECRET": "<YOUR_DARAJA_CONSUMER_SECRET>",
"DARAJA_ENV": "<YOUR_DARAJA_ENV>",
"DARAJA_SHORTCODE": "<YOUR_DARAJA_SHORTCODE>",
"DARAJA_PASSKEY": "<YOUR_DARAJA_PASSKEY>",
"DARAJA_INITIATOR_NAME": "<YOUR_DARAJA_INITIATOR_NAME>",
"DARAJA_SECURITY_CREDENTIAL": "<YOUR_DARAJA_SECURITY_CREDENTIAL>",
"DARAJA_CALLBACK_BASE_URL": "<YOUR_DARAJA_CALLBACK_BASE_URL>",
"DARAJA_CALLBACK_LISTEN": "<YOUR_DARAJA_CALLBACK_LISTEN>",
"DARAJA_CALLBACK_TOKEN": "<YOUR_DARAJA_CALLBACK_TOKEN>",
"DARAJA_TOOLSETS": "<YOUR_DARAJA_TOOLSETS>",
"DARAJA_READ_ONLY": "<YOUR_DARAJA_READ_ONLY>",
"DARAJA_APPROVAL_THRESHOLD": "<YOUR_DARAJA_APPROVAL_THRESHOLD>",
"DARAJA_ALLOWED_RECIPIENTS": "<YOUR_DARAJA_ALLOWED_RECIPIENTS>",
"DARAJA_ALLOW_LIVE_MONEY_MOVEMENT": "<YOUR_DARAJA_ALLOW_LIVE_MONEY_MOVEMENT>",
"DARAJA_INITIATOR_PASSWORD": "<YOUR_DARAJA_INITIATOR_PASSWORD>",
"DARAJA_CERT_PATH": "<YOUR_DARAJA_CERT_PATH>",
"DARAJA_STATE_DB": "<YOUR_DARAJA_STATE_DB>",
"DARAJA_OUTPUT_DIR": "<YOUR_DARAJA_OUTPUT_DIR>",
"DARAJA_CONFIG_DIR": "<YOUR_DARAJA_CONFIG_DIR>",
"DARAJA_DOTENV": "<YOUR_DARAJA_DOTENV>",
"DARAJA_MCP_TOKEN": "<YOUR_DARAJA_MCP_TOKEN>",
"DARAJA_MCP_HOST": "<YOUR_DARAJA_MCP_HOST>",
"DARAJA_MCP_PORT": "<YOUR_DARAJA_MCP_PORT>",
"DARAJA_FORWARD_URL": "<YOUR_DARAJA_FORWARD_URL>",
"DARAJA_FORWARD_SECRET": "<YOUR_DARAJA_FORWARD_SECRET>"
}
}
}
}Let your agent find its tools
Find servers like M-Pesa Daraja MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.