JD

jameskanyiri/darajamcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

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
    
在 GitHub 查看完整 README

安装

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

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

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