Skip to content

MCP server

Daraja MCP

MCP server connecting AI clients to Safaricom's Daraja M-Pesa API to initiate STK push payments, generate payment QR codes and process documents.

  • Community
  • Runs locally
  • API key

Repository and documentation last checked Built from public product pages and documentation. SourcesClaim this listing

ecommerceguide summary

Daraja MCP connects AI clients to Safaricom's Daraja API so an assistant can take M-Pesa payment actions. Tools cover stk_push, which prompts a customer to authorise a payment on their phone, and generate_qr_code for scannable payment requests, plus Unstructured connector and workflow tools for document processing. It runs locally over stdio, cloned from GitHub and installed with uv, authenticated with Daraja Consumer Key and Secret in a .env file. Setup steps cover Claude Desktop.

Why it stands out

Community MCP server combining Safaricom Daraja M-Pesa payment tools with Unstructured document connector and workflow tools in one package.

What Daraja MCP does

ecommerceguide editorial
  • stk_push tool prompts customers to authorise an M-Pesa payment
  • generate_qr_code returns QR data for buy goods, paybill and send money
  • Unstructured tools create source and destination connectors and run workflows
  • Prompt templates included for STK push, QR codes and workflows
  • Python server run locally with uv over stdio transport
  • Authenticates with Safaricom Daraja Consumer Key and Secret from .env
  • Community project by jameskanyiri; README states MIT licence
  • README marks it not production ready and points to paylinkmcp/paylink

How ecommerce teams could use it

ecommerceguide editorial

Illustrative scenarios written by ecommerceguide from the product's documented capabilities. They are not customer case studies.

  1. Developer building a Kenyan store checkout that collects M-Pesa payments

    Testing payment prompts against Daraja sandbox credentials from Claude Desktop

    Intended outcomeDaraja MCP calls stk_push with an amount and phone number and returns the M-Pesa API response

  2. Team selling in person as well as online and taking M-Pesa

    Creating scannable payment requests for a till, paybill or merchant buy goods number

    Intended outcomeThe generate_qr_code tool returns QR data for the named merchant, amount and transaction reference

  3. Store handling supplier invoices and other documents alongside payments

    Processing PDF invoices from one location into another store of processed files

    Intended outcomeConnector and workflow tools create the source and destination, run the workflow and fetch the analysed documents

Who it suits

ecommerceguide editorial

Best for

You work in Claude Desktop, hold Safaricom Daraja API credentials and want STK push and QR code payment tools in a locally run MCP server.

Probably not for

You need a production-ready service, since the README marks the project as development only and points to a successor repository, or if you want a packaged install rather than cloning the source.

Business size
Any stageA free community repository run locally with the user's own Daraja credentials, with no stated audience or pricing tiers.

Technical details

From the vendor's own pages

From the server's repository, documentation and MCP directory listings.

What an agent can do
Payments
Transport
stdio (local)
Authentication
API keyRequires Safaricom Daraja API credentials (Consumer Key and Secret) set in .env
Package
daraja
Language
Python
Repository last updated
29 Apr 2026

Connect Daraja MCP

Third-party data

Setup documented for

Install command
git clone https://github.com/jameskanyiri/DarajaMCP.git && cd DarajaMCP && uv sync

Command as listed on the repository README, not tested by ecommerceguide. Check the repository README (opens in a new tab) for configuration and credentials before running it.

Categories and use cases

Sources

ecommerceguide profiles are built from public product information and written for ecommerce teams. We do not test products, and paying never changes where a listing ranks.

Also listed on MCP Market.

See something incorrect? Report an update