Mpesa MCP Server

Give your AI agent the ability to trigger M-Pesa payments, check transaction status, send SMS, and top up airtime across 20+ African telecom networks.

Remote serverstreamable-http

What is the Mpesa MCP Server?

Give your AI agent the ability to trigger M-Pesa payments, check transaction status, send SMS, and top up airtime across 20+ African telecom networks.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
mpesa_stk_push❌
mpesa_stk_query✅
mpesa_transaction_status✅
sms_send❌
airtime_send❌

How to install the Mpesa MCP Server

{
  "mcpServers": {
    "mpesa": {
      "command": "uvx",
      "args": [
        "mpesa-mcp"
      ],
      "env": {
        "MPESA_CONSUMER_KEY": "YOUR_MPESA_CONSUMER_KEY",
        "MPESA_CONSUMER_SECRET": "YOUR_MPESA_CONSUMER_SECRET",
        "MPESA_SHORTCODE": "174379",
        "MPESA_PASSKEY": "YOUR_MPESA_PASSKEY",
        "MPESA_CALLBACK_URL": "https://yourdomain.com/mpesa/callback",
        "MPESA_SANDBOX": "true",
        "AT_USERNAME": "sandbox",
        "AT_API_KEY": "YOUR_AT_API_KEY"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
MPESA_CONSUMER_KEYDeclared in the maintainer’s client configuration.Check documentation
MPESA_CONSUMER_SECRETDeclared in the maintainer’s client configuration.Check documentation
MPESA_SHORTCODEDeclared in the maintainer’s client configuration.Check documentation
MPESA_PASSKEYDeclared in the maintainer’s client configuration.Check documentation
MPESA_CALLBACK_URLDeclared in the maintainer’s client configuration.Check documentation
MPESA_SANDBOXDeclared in the maintainer’s client configuration.Check documentation
AT_USERNAMEDeclared in the maintainer’s client configuration.Check documentation
AT_API_KEYDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use Mpesa MCP to mpesa stk push.”
  • “Use Mpesa MCP to mpesa stk query.”
  • “Use Mpesa MCP to mpesa transaction status.”

Frequently asked questions

Give your AI agent the ability to trigger M-Pesa payments, check transaction status, send SMS, and top up airtime across 20+ African telecom networks. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.