JD

jameskanyiri/darajamcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

14 stars 7 forks Качество 53 Тренд 20

🚨 This project has moved to a new repository. If you're looking to contribute or access the latest version, please visit: https://github.com/paylinkmcp/paylink

Обзор

🚨 This project has moved to a new repository. If you're looking to contribute or access the latest version, please visit: https://github.com/paylinkmcp/paylink A Model Context Protocol (MCP) server designed to integrate AI applications with Safaricom's Daraja API, enabling seamless interaction with M-Pesa services. ⚠️ This project is currently in development and is not recommended for production use. It's designed for: - Learning and experimentation - Development and testing environments - Proof of concept implementations For production use, please ensure: - Thorough security testing - Proper error handling - Complete implementation of all planned features - Compliance with Safaricom's production requirements MCP (Model Context Protocol) servers provide capabilities for LLMs to interact with external systems.

README

Показан фрагмент оригинального README. Открыть оригинал.

Daraja MCP

🚨 Important Notice: Repository Moved

This project has moved to a new repository. If you’re looking to contribute or access the latest version, please visit:

https://github.com/paylinkmcp/paylink

A Model Context Protocol (MCP) server designed to integrate AI applications with Safaricom’s Daraja API, enabling seamless interaction with M-Pesa services.

⚠️ Warning: Not Production Ready

This project is currently in development and is not recommended for production use. It’s designed for:

  • Learning and experimentation
  • Development and testing environments
  • Proof of concept implementations

For production use, please ensure:

  • Thorough security testing
  • Proper error handling
  • Complete implementation of all planned features
  • Compliance with Safaricom’s production requirements

What is an MCP Server?

MCP (Model Context Protocol) servers provide capabilities for LLMs to interact with external systems. MCP servers can provide three main types of capabilities:

  • Resources: File-like data that can be read by clients (like API responses)
  • Tools: Functions that can be called by the LLM (with user approval)
  • Prompts: Pre-written templates that help users accomplish specific tasks

Daraja MCP specifically leverages this architecture to connect AI systems with Safaricom’s Daraja M-Pesa API.

Overview

Daraja MCP is a bridge between AI, fintech, and M-Pesa, making AI-driven financial automation accessible and efficient. By standardizing the connection between LLMs (Large Language Models) and financial transactions, Daraja MCP allows AI-driven applications to process payments, retrieve transaction data, and automate financial workflows effortlessly.

Key Capabilities

  • ✅ AI-Powered M-Pesa Transactions – Enable LLMs to handle B2C, C2B, and B2B payments
  • ✅ Standardized Integration – MCP ensures compatibility with multiple AI tools
  • ✅ Secure & Scalable – Implements OAuth authentication and supports enterprise-grade transaction handling
  • ✅ Flexible Automation – AI agents can query account balances, generate invoices, and automate reconciliation

Requirements

  • Python 3.12
  • Safaricom Daraja API Credentials (Consumer Key and Secret)

Installation

Step 1: Setting Up Your Environment

  1. Install uv Package Manager

    For Mac/Linux:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    

    For Windows (PowerShell):

    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    
  2. Clone the Repository

    git clone https://github.com/jameskanyiri/DarajaMCP.git
    cd DarajaMCP
    
  3. Create and Activate a Virtual Environment

    uv venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "daraja": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/DarajaMCP", "run", "main.py" ] } } }