Africa Payments MCP
by kenyaclaw
README.md
# ๐ Africa Payments MCP
> **The missing piece for African fintech.** One MCP server. Every major African payment provider. Natural language payments.
[](https://github.com/kenyaclaw/africa-payments-mcp/actions/workflows/ci.yml)
[](https://github.com/kenyaclaw/africa-payments-mcp/actions/workflows/security.yml)
[](https://codecov.io/gh/kenyaclaw/africa-payments-mcp)
[](https://badge.fury.io/js/@kenyaclaw%2Fafrica-payments-mcp)
[](https://www.npmjs.com/package/@kenyaclaw/africa-payments-mcp)
[](https://opensource.org/licenses/MIT)
[](https://github.com/kenyaclaw)
---
## โจ What if accepting payments was as easy as sending a message?
```bash
# "Send KES 5,000 to Mary via M-Pesa"
# "Request $100 from a customer in Nigeria"
# "Check if that MTN MoMo payment came through"
# "Process a refund for order #12345"
```
No more wrestling with 5 different APIs. No more juggling documentation.
Just natural language that works across **M-Pesa**, **Paystack**, **MTN MoMo**, and more.
<p align="center">
<img src="docs/assets/demo.gif" alt="Africa Payments MCP Demo" width="800"/>
<br>
<em>See it in action with Claude, ChatGPT, Cursor, and any MCP client</em>
</p>
---
## ๐ฌ See It In Action
| Demo with Claude | Demo with Cursor |
|:----------------:|:----------------:|
|  |  |
---
## ๐ก Why Africa Payments MCP?
### The Problem ๐ค
Africa has the world's most innovative payment systemsโM-Pesa, Paystack, Flutterwave, MTN MoMo, Chipper Cashโbut integrating them is a nightmare:
- ๐ **Fragmented APIs**: M-Pesa uses SOAP. Paystack uses REST. MTN MoMo uses something entirely different.
- ๐ **Scattered Documentation**: Hours spent hunting for the right docs
- ๐ง **Different Auth Methods**: API keys, OAuth, basic authโeach one unique
- ๐ **Edge Cases Everywhere**: Each provider has quirks that break your code
- โฑ๏ธ **Weeks of Integration Time**: Before you process a single payment
### The Solution ๐ฏ
**One MCP server. Every provider. Natural language.**
```typescript
// Instead of this...
const mpesa = new MpesaAPI({ consumerKey, consumerSecret, passkey });
await mpesa.authenticate();
const result = await mpesa.stkPush({ phone, amount, accountRef });
// Just say this:
"Send KES 5,000 to 254712345678 via M-Pesa"
```
### The Impact ๐
- โก **Ship in hours, not weeks** โ Your first payment working today
- ๐ง **AI-native from day one** โ Built for the era of AI agents
- ๐ **Truly Pan-African** โ One integration covers the continent
- ๐ **Open Source** โ MIT licensed, community-driven
- ๐ ๏ธ **Developer-First** โ Built by Africans who understand the pain
---
## ๐ Quick Start
### One-Line Installer (Recommended)
```bash
curl -fsSL https://raw.githubusercontent.com/kenyaclaw/africa-payments-mcp/main/scripts/install.sh | bash
```
Or with wget:
```bash
wget -qO- https://raw.githubusercontent.com/kenyaclaw/africa-payments-mcp/main/scripts/install.sh | bash
```
### Manual Installation
#### 1. Install
```bash
npm install -g @kenyaclaw/africa-payments-mcp
```
#### 2. Configure
**Interactive wizard (recommended):**
```bash
africa-payments-mcp init
# Beautiful interactive setup with emoji and progress indicators
```
**Auto-detect existing credentials:**
```bash
africa-payments-mcp detect --output config.json
# Automatically finds MPESA_*, PAYSTACK_* env vars and config files
```
### 3. Connect to Your AI
Add to your MCP client configuration:
```json
{
"mcpServers": {
"africa-payments": {
"command": "africa-payments-mcp",
"env": {
"MPESA_CONSUMER_KEY": "your_key",
"PAYSTACK_SECRET_KEY": "your_key"
}
}
}
}
```
### 4. Start Accepting Payments
Open Claude, ChatGPT, Cursor, or any MCP client and just ask:
> "Send KES 5,000 to Mary via M-Pesa"
---
## ๐ณ Docker Quick Start
Run with Docker (no Node.js installation required):
```bash
# Pull the latest image
docker pull kenyaclaw/africa-payments-mcp:latest
# Run with a config file
docker run -v $(pwd)/config.json:/app/config/config.json \
kenyaclaw/africa-payments-mcp:latest
# Or run with environment variables
docker run -e MPESA_CONSUMER_KEY=xxx \
-e MPESA_CONSUMER_SECRET=xxx \
-e PAYSTACK_SECRET_KEY=xxx \
kenyaclaw/africa-payments-mcp:latest
```
### Docker Compose
```yaml
version: '3.8'
services:
africa-payments:
image: kenyaclaw/africa-payments-mcp:latest
volumes:
- ./config.json:/app/config/config.json:ro
environment:
- NODE_ENV=production
ports:
- "3000:3000" # For webhook support
restart: unless-stopped
```
---
## ๐ Supported Providers
| Provider | Countries | Status | Features |
|----------|-----------|--------|----------|
| **M-Pesa** | ๐ฐ๐ช Kenya, ๐น๐ฟ Tanzania, ๐ฒ๐ฟ Mozambique, ๐จ๐ฉ DRC, ๐ช๐ฌ Egypt | โ
Ready | STK Push, B2C, B2B, C2B, Reversal |
| **Paystack** | ๐ณ๐ฌ Nigeria, ๐ฌ๐ญ Ghana, ๐ฟ๐ฆ South Africa, +4 more | โ
Ready | Cards, Bank Transfer, Mobile Money |
| **MTN MoMo** | ๐ณ๐ฌ Nigeria, ๐ฌ๐ญ Ghana, ๐บ๐ฌ Uganda, +12 more | โ
Ready | Collections, Disbursements, Remittances |
| **Flutterwave** | ๐ณ๐ฌ Nigeria, ๐ฐ๐ช Kenya, ๐ฟ๐ฆ South Africa, +30 more | ๐ง Beta | Cards, Mobile Money, Bank Transfer |
| **Chipper Cash** | ๐ณ๐ฌ Nigeria, ๐ฌ๐ญ Ghana, ๐ฐ๐ช Kenya, +7 more | ๐ง Beta | P2P Transfers, Payments |
> ๐ก **Want to add a provider?** [See our contribution guide](CONTRIBUTING.md)
---
## ๐ Documentation
- [๐ Full Documentation](https://docs.africapayments.dev)
- [๐ Quick Start Guide](docs/quickstart.md)
- [๐ง Provider Setup](docs/providers.md)
- [๐ป API Reference](docs/api.md)
- [๐งช Examples](examples/)
---
## ๐๏ธ Architecture
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your AI Agent โ
โ (Claude, ChatGPT, Cursor, etc.) โ
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Protocol
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Africa Payments MCP Server โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ M-Pesa โ โ Paystack โ โ MTN MoMo โ โ
โ โ Adapter โ โ Adapter โ โ Adapter โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Flutterwave โ โ ChipperCash โ โ More Coming... โ โ
โ โ Adapter โ โ Adapter โ โ โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## ๐ What Developers Are Saying
> *"Integrated M-Pesa in 10 minutes. Took me 3 weeks the old way."*
> โ **David O.**, Fintech Developer, Lagos
> *"Finally, payments that work the way I think about them."*
> โ **Grace W.**, Startup Founder, Nairobi
> *"The USB-C of African payments. One connection, everything works."*
> โ **Kofi A.**, Full Stack Engineer, Accra
---
## ๐ค Contributing
We built this for Africa's developers. Help us make it better:
1. ๐ด Fork the repo
2. ๐ฟ Create your branch (`git checkout -b feature/amazing-feature`)
3. ๐ป Make your changes
4. โ
Add tests
5. ๐ Update documentation
6. ๐ Submit a PR
[Read our Contributing Guide](CONTRIBUTING.md)
---
## ๐ License
MIT License โ use it, modify it, build the future of African fintech.
---
## ๐ฌ Join the Community
- ๐ฆ [Twitter/X](https://twitter.com/africapayments)
- ๐ผ [LinkedIn](https://linkedin.com/company/africa-payments)
- ๐ฌ [Discord](https://discord.gg/africapayments)
- ๐ง [Email us](mailto:hello@africapayments.dev)
---
<p align="center">
<strong>Built with โค๏ธ in Nairobi, Lagos, Accra, and across the continent</strong>
<br>
<em>๐ฐ๐ช ๐ณ๐ฌ ๐ฌ๐ญ ๐น๐ฟ ๐บ๐ฌ ๐ฟ๐ฆ ๐ช๐ฌ ๐ฒ๐ฆ ๐ท๐ผ ๐ช๐น ๐ธ๐ณ ๐จ๐ฎ</em>
</p>
<p align="center">
<img src="docs/assets/africa-payments-logo.svg" alt="Africa Payments MCP" width="200"/>
</p>
## ๐ Launch Materials
Ready to launch? Check out our complete launch kit:
๐ **[LAUNCH.md](docs/LAUNCH.md)** - Twitter, HN, Dev.to, LinkedIn, Product Hunt templates
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues