TokenToSeaMCP Hub
中文 Console

Daraja MCP

jameskanyiri

Connects agents to the Safaricom Daraja API so they can run M-Pesa payment transactions and automation.

Setup

Choose your client, copy the config, then fill in any required environment variables.

Add to CursorAdd to VS Code

claude mcp add daraja --env BUSINESS_SHORTCODE='<BUSINESS_SHORTCODE>' --env MPESA_CONSUMER_KEY='<MPESA_CONSUMER_KEY>' --env MPESA_CONSUMER_SECRET='<MPESA_CONSUMER_SECRET>' --env PASSKEY='<PASSKEY>' -- uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/DarajaMCP run main.py

Environment variables

  • BUSINESS_SHORTCODE
  • MPESA_CONSUMER_KEY
  • MPESA_CONSUMER_SECRET
  • PASSKEY

Replace the placeholders with your own credentials and keep them out of version control.