Mpesa Daraja MCP

MCP文档知识

提供方 未标注

文档知识 HTTP · 远程 未标注 社区 / 第三方
查看接入方式

全面解析Mpesa Daraja MCPMCP Server的核心功能、安装配置和实用案例。作为顶级Model Context Protocol服务器,Mpesa Daraja MCP能让AI助手访问实时数据、执行操作,为您提供更智能的工作体验和自动化解决方案。

一句话选型结论

按资料字段整理

Mpesa Daraja MCP 属于文档知识类 MCP 服务器,HTTP · 远程,鉴权方式未标注,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式HTTP · 远程 鉴权未标注 部署方式远程部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

安装与配置

HTTP · 远程 未标注
连远程 HTTPS 端点,通常为 Streamable HTTP
pip install -r requirements.txt

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Mpesa Daraja MCP当前 未标注 HTTP · 远程 远程部署 有 2026-05-17
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类文档知识本站按上游分类展示
连接方式HTTP · 远程连远程 HTTPS 端点,通常为 Streamable HTTP
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Python本地安装时用到的包标识与运行时
部署类型远程部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

24.6 KB
来自项目仓库与上游目录的原文,未做删改

Daraja API Documentation Scraper & MCP Server

A comprehensive toolkit for accessing Safaricom's Daraja API documentation through web scraping and Model Context Protocol (MCP) integration. This project provides both a powerful scraper for keeping documentation up-to-date and a professional MCP server for AI assistant integration.

⚠️ Important Legal Notice & Disclaimers

Data Source and Usage Rights

  • Documentation Source: This project scrapes documentation from Safaricom's Daraja API portal
  • Authentication Required: The scraper requires login credentials to access Safaricom's developer portal
  • Terms of Service: Users must comply with Safaricom's Terms of Service when using the scraper
  • Data Ownership: All scraped documentation remains the intellectual property of Safaricom PLC

Legal Compliance

  • Personal Use: This tool is intended for personal development and learning purposes
  • Commercial Use: For commercial applications, ensure you have appropriate licenses from Safaricom
  • Rate Limiting: The scraper includes delays to respect Safaricom's servers - do not modify these
  • Account Responsibility: Users are responsible for their own Safaricom developer account credentials

Disclaimers

  • No Warranty: This software is provided "as is" without any warranties
  • Data Accuracy: Scraped documentation may become outdated - always verify with official sources
  • Service Availability: Safaricom may change their portal structure, potentially breaking the scraper
  • Legal Responsibility: Users assume all legal responsibility for their use of this tool

Ethical Usage Guidelines

  • Respect Rate Limits: Do not overwhelm Safaricom's servers with excessive requests
  • Valid Credentials: Only use your own legitimate Safaricom developer account
  • Data Sharing: Be mindful of sharing scraped data - respect Safaricom's intellectual property
  • Updates: Keep scraped documentation current and don't redistribute outdated information

By using this software, you acknowledge that you have read, understood, and agree to comply with these terms and Safaricom's Terms of Service.

Features

  • Complete Documentation Scraper: Automated scraping of all 22 Daraja APIs with images
  • Professional MCP Server: Standards-compliant server for AI assistant integration
  • Docker Support: Containerized deployment for consistent environments
  • Multi-Platform Support: Works on Windows, macOS, and Linux
  • Editor Integration: Compatible with Kiro, VSCode, Cursor, Windsurf, Claude Desktop, and more
  • Offline Ready: Complete documentation dataset included for immediate use
  • Auto-Discovery: Smart path detection for seamless setup

Table of Contents

  • Important Legal Notice & Disclaimers
  • Quick Start
  • Installation
  • Docker Deployment
  • Scraper Usage
  • MCP Server Setup
  • Editor Integration
  • API Documentation
  • Troubleshooting
  • Contributing
  • License
  • Contributing

Quick Start

Option 1: Docker Deployment (Recommended)```bash

Clone the repository

git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp

Build and start Docker container

cd mpesa-daraja-mcp
pnpm run docker:build
pnpm run docker:start

Configure your editor (see Editor Integration section)


### Option 2: Native Installation```bash
# Clone the repository
git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp

# Setup MCP server
cd mpesa-daraja-mcp
pnpm install
pnpm run build

# Configure your editor (see Editor Integration section)

Option 3: Fresh Scraping + MCP Setup```bash

Clone and setup scraper

git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp

Setup Python environment

python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt

Run scraper (requires Daraja portal login)

python scraper.py

Setup MCP server

cd mpesa-daraja-mcp
pnpm install
pnpm run build


## Installation

### Prerequisites

- **Docker** (recommended) OR
- **Python 3.8+** (for scraper) + **Node.js 18+** (for MCP server)
- **Git** (for cloning)

### Platform-Specific Setup

#### Windows```powershell
# Option 1: Docker (Recommended)
# Install Docker Desktop from https://docker.com
# Clone repository
git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp\mpesa-daraja-mcp
pnpm run docker:build

# Option 2: Native Installation
# Install Python and Node.js from official websites
# Clone repository
git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp

# Python setup (for scraper)
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt

# Node.js setup (for MCP server)
cd mpesa-daraja-mcp
pnpm install
pnpm run build

macOS```bash

Option 1: Docker (Recommended)

Install Docker Desktop from https://docker.com

brew install git
git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp/mpesa-daraja-mcp
pnpm run docker:build

Option 2: Native Installation

Install dependencies via Homebrew

brew install python node git pnpm

Clone repository

git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp

Python setup (for scraper)

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Node.js setup (for MCP server)

cd mpesa-daraja-mcp
pnpm install
pnpm run build


#### Linux (Ubuntu/Debian)```bash
# Option 1: Docker (Recommended)
# Install Docker
sudo apt update
sudo apt install docker.io docker-compose git
sudo usermod -aG docker $USER
# Log out and back in, then:
git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp/mpesa-daraja-mcp
pnpm run docker:build

# Option 2: Native Installation
# Install dependencies
sudo apt update
sudo apt install python3 python3-venv nodejs npm git
npm install -g pnpm

# Clone repository
git clone https://github.com/JacksCodeVault/mpesa-daraja-mcp.git
cd mpesa-daraja-mcp

# Python setup (for scraper)
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# Node.js setup (for MCP server)
cd mpesa-daraja-mcp
pnpm install
pnpm run build

Docker Deployment

Docker provides the most reliable and consistent deployment method across all platforms.

Quick Docker Setup```bash

cd mpesa-daraja-mcp

Build the Docker image

pnpm run docker:build

Start the container

pnpm run docker:start

Check status

pnpm run docker:status

View logs

pnpm run docker:logs


### Docker Management Commands```bash
# Build and deployment
pnpm run docker:build     # Build the Docker image
pnpm run docker:start     # Start the container
pnpm run docker:stop      # Stop the container
pnpm run docker:restart   # Restart the container

# Monitoring and debugging
pnpm run docker:status    # Check container status
pnpm run docker:logs      # View container logs
pnpm run docker:shell     # Open shell in container

# Cleanup
pnpm run docker:clean     # Remove container and image

Docker Configuration

The Docker setup includes:

  • Multi-stage build for optimized image size
  • Non-root user for security
  • Volume mounting for documentation access
  • Health checks for reliability
  • Resource limits for production use

Docker Compose Configuration```yaml

docker-compose.yml

services:
daraja-mcp:
build: .
container_name: daraja-mcp-server
restart: unless-stopped
volumes:
- ../daraja_docs_v3:/app/daraja_docs_v3:ro
environment:
- NODE_ENV=production
stdin_open: true
tty: true


### MCP Configuration for Docker

When using Docker, update your editor's MCP configuration:```json
{
  "mcpServers": {
    "daraja-docs": {
      "command": "docker",
      "args": ["exec", "-i", "daraja-mcp-server", "node", "dist/index.js"],
      "disabled": false,
      "autoApprove": [
        "search_daraja_apis",
        "get_daraja_api_doc",
        "list_apis_by_category",
        "get_api_summary",
        "get_server_stats",
        "compare_apis"
      ]
    }
  }
}

Scraper Usage

⚠️ IMPORTANT: Before using the scraper, ensure you have:

  • A valid Safaricom developer account
  • Accepted Safaricom's Terms of Service
  • Permission to access the documentation programmatically
  • Understanding that you're responsible for compliance with Safaricom's policies

The scraper automatically downloads documentation for all 22 Daraja APIs with images.

First Time Setup

  1. Activate Python environment:bash source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows

  2. Run the scraper:bash python scraper.py

  3. Login Process:
    - Browser window opens automatically
    - Login to Daraja portal manually when prompted
    - Press ENTER in terminal after successful login
    - Scraper saves session for future use

Updating Documentation

To get the latest API documentation:```bash

Activate environment

source venv/bin/activate

Run scraper (uses saved session)

python scraper.py

If session expired, login again when browser opens


### Output Structure```text
daraja_docs_v3/
├── data_index.json          # API metadata and index
├── docs/                    # Markdown documentation
│   ├── Authorization.md
│   ├── MpesaExpressSimulate.md
│   └── ... (22 API files)
└── images/                  # Downloaded images
    ├── Authorization_img_0.svg
    └── ... (200+ images)

MCP Server Setup

The MCP server provides AI assistants with access to Daraja documentation through 6 powerful tools.

Native Build and Test```bash

cd mpesa-daraja-mcp

Install dependencies

pnpm install

Build TypeScript

pnpm run build

Test server can find documentation

pnpm test

Run server (for testing)

pnpm run dev


### Available MCP Tools

The MCP server provides 6 comprehensive tools:

1. **`search_daraja_apis`** - Advanced search with category filtering
2. **`get_daraja_api_doc`** - Complete API documentation retrieval
3. **`list_apis_by_category`** - Organized API listing by categories
4. **`get_api_summary`** - Enhanced summaries with endpoints
5. **`get_server_stats`** - Usage statistics and monitoring
6. **`compare_apis`** - Side-by-side API comparison

### Server Configuration

The server automatically detects documentation in these locations:

- `../daraja_docs_v3` (relative to server)
- `./daraja_docs_v3` (current directory)
- `/app/daraja_docs_v3` (Docker container)
- Custom path via environment variable

## Editor Integration

### Kiro IDE

1. **Create MCP configuration file**:```bash
   # Create .kiro/settings/mcp.json in your workspace
   mkdir -p .kiro/settings
   ```

2. **Docker Configuration** (Recommended):```json
   {
     "mcpServers": {
       "daraja-docs": {
         "command": "docker",
         "args": ["exec", "-i", "daraja-mcp-server", "node", "dist/index.js"],
         "disabled": false,
         "autoApprove": [
           "search_daraja_apis",
           "get_daraja_api_doc",
           "list_apis_by_category",
           "get_api_summary",
           "get_server_stats",
           "compare_apis"
         ]
       }
     }
   }
   ```

3. **Native Configuration**:```json
   {
     "mcpServers": {
       "daraja-docs": {
         "command": "node",
         "args": ["mpesa-daraja-mcp/dist/index.js"],
         "disabled": false,
         "autoApprove": [
           "search_daraja_apis",
           "get_daraja_api_doc",
           "list_apis_by_category",
           "get_api_summary",
           "get_server_stats",
           "compare_apis"
         ]
       }
     }
   }
   ```

### VSCode with MCP Extensions

1. **Install MCP extension** (if available)
2. **Configure in settings.json**:```json
   {
     "mcp.servers": {
       "daraja-docs": {
         "command": "docker",
         "args": ["exec", "-i", "daraja-mcp-server", "node", "dist/index.js"]
       }
     }
   }
   ```

### Cursor IDE

1. **Open Cursor settings**
2. **Add MCP server configuration**:```json
   {
     "mcp": {
       "servers": {
         "daraja-docs": {
           "command": "docker",
           "args": ["exec", "-i", "daraja-mcp-server", "node", "dist/index.js"]
         }
       }
     }
   }
   ```

### Windsurf

1. **Access Windsurf MCP settings**
2. **Add server configuration**:```json
   {
     "mcpServers": {
       "daraja-docs": {
         "command": "docker",
         "args": ["exec", "-i", "daraja-mcp-server", "node", "dist/index.js"]
       }
     }
   }
   ```

### Claude Desktop

1. **Edit Claude config file**:
   - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
   - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

2. **Add server configuration**:```json
   {
     "mcpServers": {
       "daraja-docs": {
         "command": "docker",
         "args": ["exec", "-i", "daraja-mcp-server", "node", "dist/index.js"]
       }
     }
   }
   ```

### Generic MCP Client

For any MCP-compatible client using Docker:```json
{
  "servers": {
    "daraja-docs": {
      "command": "docker",
      "args": ["exec", "-i", "daraja-mcp-server", "node", "dist/index.js"],
      "env": {}
    }
  }
}

For native installation:```json
{
"servers": {
"daraja-docs": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/absolute/path/to/mpesa-daraja-mcp",
"env": {}
}
}
}


## API Documentation

### Available APIs

The project includes comprehensive documentation for 22 Daraja APIs organized into 6 categories:

#### Core Payment APIs

- **Authorization** - OAuth token generation and management
- **MpesaExpressSimulate** - STK Push payment initiation
- **MpesaExpressQuery** - STK Push transaction status queries

#### Payment Processing

- **CustomerToBusiness** - C2B payment processing
- **BusinessToCustomer** - B2C payment disbursements
- **CustomerToBusinessRegisterURL** - C2B URL registration

#### Transaction Management

- **TransactionStatus** - Transaction status verification
- **AccountBalance** - Account balance inquiries
- **Reversal** - Transaction reversal operations
- **PullTransaction** - Transaction detail retrieval

#### Business Operations

- **BusinessPayBill** - Bill payment processing
- **BusinessBuyGoods** - Goods purchase payments
- **B2BExpressCheckout** - Business-to-business transactions
- **BusinessToPochi** - Business to Pochi wallet transfers

#### Advanced Features

- **DynamicQRCode** - Dynamic QR code generation
- **BillManager** - Bill management and processing
- **TaxRemittance** - Tax payment processing
- **MpesaRatiba** - Scheduled payment management

#### Specialized Services

- **B2CAccountTopUp** - Account top-up services
- **Swap** - Currency swap operations
- **IMSI** - SIM card management services
- **IotSimManagement** - IoT SIM card management

### Using the MCP Tools

#### Advanced API Search

Use search_daraja_apis tool with powerful filtering:

- Query: "payment" + Category: "core" → Core payment APIs
- Query: "balance" → AccountBalance and related APIs
- Category: "business" → All business operation APIs
- No parameters → All 22 APIs with categories

#### Complete Documentation Access

Use get_daraja_api_doc tool for full documentation:

- api_name: "Authorization" → Complete OAuth implementation guide
- api_name: "MpesaExpressSimulate" → Full STK Push documentation
- Includes code examples, parameters, and response formats

#### Enhanced API Summaries

Use get_api_summary tool for quick overviews:

- api_name: "BusinessToCustomer" → Summary with key endpoints
- include_endpoints: true → Includes endpoint URLs
- Perfect for quick reference and comparison

#### API Comparison

Use compare_apis tool for side-by-side analysis:

- api_names: ["Authorization", "MpesaExpressSimulate"] → Compare auth vs payment
- comparison_aspects: ["endpoints", "authentication"] → Focus on specific aspects
- Supports 2-4 APIs simultaneously

#### Usage Statistics

Use get_server_stats tool for monitoring:

- Total API count and categories
- Most accessed APIs
- Request statistics
- Server health information

#### Category-Based Browsing

Use list_apis_by_category tool for organized access:

- category: "payments" → All payment-related APIs
- No category → List all categories with counts
- Perfect for discovering related APIs

## Troubleshooting

### Docker Issues

#### Container Won't Start```bash
# Check Docker is running
docker --version
docker-compose --version

# View detailed logs
pnpm run docker:logs

# Rebuild if needed
pnpm run docker:clean
pnpm run docker:build

Documentation Not Found in Container```bash

Check volume mounting

docker inspect daraja-mcp-server

Verify documentation exists

ls -la ../daraja_docs_v3/data_index.json

Test container access

pnpm run docker:shell
ls -la /app/daraja_docs_v3/


#### MCP Connection Issues with Docker```bash
# Ensure container is running
pnpm run docker:status

# Test MCP tools directly
docker exec -i daraja-mcp-server node dist/index.js

# Check container logs for errors
pnpm run docker:logs

Native Installation Issues

MCP Server Issues

Server won't start:```bash

Check Node.js version

node --version # Should be 18+

Rebuild server

cd mpesa-daraja-mcp
pnpm run clean
pnpm install
pnpm run build


**Documentation not found**:```bash
# Test documentation detection
pnpm test

# Check paths manually
ls -la ../daraja_docs_v3/data_index.json

TypeScript errors:```bash

Update dependencies

pnpm update
pnpm run build

Check for syntax errors

pnpm run dev


#### Scraper Issues

**Browser doesn't open**:```bash
# Install browser dependencies
playwright install chromium

# Check Python version
python --version  # Should be 3.8+

Login session expired:```bash

Delete auth file and re-login

rm auth.json
python scraper.py


**Permission errors**:```bash
# Check file permissions
chmod +x scraper.py
# Or run with python explicitly
python scraper.py

Editor Integration Issues

MCP Server Not Connecting

  1. Verify Docker container is running:bash pnpm run docker:status

  2. Check MCP configuration syntax:
    - Ensure JSON is valid
    - Verify command and args are correct
    - Use absolute paths for native installation

  3. Test server manually:```bash
    # Docker
    docker exec -i daraja-mcp-server node dist/index.js

# Native
cd mpesa-daraja-mcp
node dist/index.js
```

  1. Restart editor after configuration changes

Tools Not Appearing

  1. Check server logs in editor's MCP panel
  2. Verify autoApprove list includes desired tools
  3. Ensure server builds successfully: pnpm run build
  4. Test with minimal configuration first

Platform-Specific Issues

Windows Platform Issues

  • Use forward slashes in Docker paths: C:/path/to/project
  • Run PowerShell as Administrator if Docker permission issues
  • Check Windows Defender isn't blocking Docker or Node.js
  • Use WSL2 for better Docker performance

macOS Platform Issues

  • Install Xcode Command Line Tools: xcode-select --install
  • Use Homebrew for dependency management: brew install docker
  • Check Docker Desktop is running and configured
  • Verify file permissions: chmod +x docker-scripts.sh

Linux Platform Issues

  • Add user to docker group: sudo usermod -aG docker $USER
  • Install build essentials: sudo apt install build-essential
  • Check Docker service: sudo systemctl status docker
  • Verify Node.js installation: which node

Performance Optimization

Docker Performance```bash

Limit container resources

docker update --memory=512m --cpus="0.5" daraja-mcp-server

Use multi-stage builds for smaller images

(Already implemented in Dockerfile)

Clean up unused Docker resources

docker system prune -a


#### MCP Server Performance```bash
# Monitor server stats
# Use get_server_stats tool to track usage

# Optimize documentation loading
# Server caches documentation on startup

# Use appropriate log levels
NODE_ENV=production pnpm run docker:start

Getting Help

  1. Check logs first: Both Docker and native installations provide detailed error messages
  2. Test components individually: Use pnpm test to verify MCP server setup
  3. Verify paths and permissions: Ensure all file paths are correct and accessible
  4. Update dependencies: Keep Docker, Node.js, and Python packages current
  5. Use Docker for consistency: Docker eliminates most platform-specific issues

Contributing

⚠️ Data Handling Guidelines for Contributors:

  • No Scraped Data in PRs: Do not include scraped documentation in pull requests
  • Respect IP Rights: Ensure contributions don't violate Safaricom's intellectual property
  • Code Only: Contribute improvements to the scraper and MCP server code, not the data
  • Documentation: Update README and code comments, not scraped API documentation

Development Setup

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Setup development environment:```bash
    # Docker development (recommended)
    cd mpesa-daraja-mcp
    pnpm run docker:build
    pnpm run docker:start

# Native development
# Python development
pip install -r requirements-dev.txt # If exists

# Node.js development
cd mpesa-daraja-mcp
pnpm install
pnpm run dev
```

Adding New APIs

  1. Update scraper URLs:python URLS = [ "https://developer.safaricom.co.ke/apis/NewAPI", # ... existing URLs ]

  2. Test scraping:bash python scraper.py

  3. Update API categorization:typescript // In mpesa-daraja-mcp/src/config.ts API_CATEGORIES: { new_category: ["NewAPI"], // ... existing categories }

  4. Verify MCP server:bash cd mpesa-daraja-mcp pnpm test pnpm run docker:build

Code Style

  • Python: Follow PEP 8, use black formatter
  • TypeScript: Use Prettier formatting, ESLint rules
  • Docker: Follow best practices for multi-stage builds
  • Commits: Use conventional commit format

Testing```bash

Test scraper

python scraper.py --test-mode

Test MCP server (native)

cd mpesa-daraja-mcp
pnpm test
pnpm run build

Test MCP server (Docker)

pnpm run docker:build
pnpm run docker:start
pnpm run docker:logs
```

Documentation

  • Update README for new features
  • Add inline code comments
  • Update API documentation
  • Include Docker-specific instructions

License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Important License Clarification:

  • Software License: The MIT License applies only to the scraper and MCP server code
  • Documentation Rights: Scraped Daraja API documentation remains the property of Safaricom PLC
  • Separate Terms: Use of Safaricom's documentation is subject to their Terms of Service
  • No Transfer: This license does not grant rights to Safaricom's intellectual property

What this means

  • ✅ Commercial use - Use this project in commercial applications
  • ✅ Modification - Modify the source code to fit your needs
  • ✅ Distribution - Distribute copies of the software
  • ✅ Private use - Use the software for private purposes
  • ❌ Liability - The authors are not liable for any damages
  • ❌ Warranty - The software is provided "as is" without warranty

Attribution

If you use this project, please consider:

  • ⭐ Starring the repository on GitHub
  • 📝 Mentioning the project in your documentation
  • 🔗 Linking back to the original repository

Acknowledgments

  • Safaricom for providing the Daraja API platform
  • Model Context Protocol team for the MCP standard
  • Playwright team for the excellent automation framework
  • Docker community for containerization best practices
  • Open source contributors who make projects like this possible

Repository Information

  • Repository: https://github.com/JacksCodeVault/mpesa-daraja-mcp
  • Issues: Report bugs or request features
  • Discussions: Community discussions
  • Releases: Latest releases

Support

If you find this project helpful, please consider:

  • ⭐ Starring the repository
  • 🐛 Reporting issues you encounter
  • 💡 Suggesting improvements
  • 🤝 Contributing to the project
  • 📢 Sharing with others who might benefit

Ready to integrate Daraja API documentation with your AI assistant?

Quick Start with Docker: cd mpesa-daraja-mcp && pnpm run docker:build && pnpm run docker:start

Browse the documentation: Use the MCP tools to explore 22 comprehensive Daraja APIs

Need help? Check the Troubleshooting section or open an issue

Start with the Quick Start guide and have your AI assistant accessing Daraja documentation in minutes!

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Mpesa Daraja MCP 怎么安装?

在客户端按下面的安装命令接入:pip install -r requirements.txt。装完在客户端配置里引用同一个包或端点。

Mpesa Daraja MCP 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Mpesa Daraja MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Mpesa Daraja MCP 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

Mpesa Daraja MCP 能提供哪些能力?

资料显示能力标签包括 Python、API文档、HTTP。具体工具清单以官方文档为准。

Mpesa Daraja MCP 需要什么运行环境?

运行时为 Python;属于远程端点,不需要在本地装运行时。

Mpesa Daraja MCP 是本地还是远程?

它是远程端点,连服务地址即可。传输方式为HTTP · 远程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。