by nasoma
This project implements a Model Context Protocol (MCP) server for managing airtime transactions using the Africa's Talking API. It provides a set of tools to check account balance, send airtime, view recent top-up transactions, sum the amounts of recent top-ups, and count top-ups for a specific phone number. The application uses SQLite to store transaction data and supports African countries supported by Africa's Talking Airtime Service with proper phone number formatting.
The Africa's Talking Airtime MCP Server integrates with the Africa's Talking Airtime API to facilitate airtime transfers. Key features include:
The application supports the countries where Africa's Talking Airtime service is supported.
To install Africa's Talking Airtime Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @nasoma/africastalking-airtime-mcp --client claude
Python 3.10 or higher
curl -LsSf https://astral.sh/uv/install.sh | sh
Follow these steps to set up and run the project locally:
git clone https://github.com/nasoma/africastalking-airtime-mcp.git cd africastalking-airtime-mcp
uv sync
Add this to your claude_desktop_config.json
:
*Configuration content*
Goose is a good option if you want to use your preferred LLM and supply an API key.
username
, api_key
, currency_code
and country
.The MCP provides the following tools for managing airtime transactions:
check_balance:
check_balance()
load_airtime:
phone_number
: The recipient's phone number (e.g., "0712345678" or "+254712345678").amount
: The amount of airtime to send (e.g., 100).currency_code
: The currency code (e.g., "KES").load_airtime("0712345678", 100.00, "KES")
get_last_topups:
N
airtime top-up transactions from the database.limit
: Number of transactions to retrieve (default: 3).get_last_topups(3)
sum_last_n_topups:
N
successful top-ups, ensuring they use the same currency.n
: Number of transactions to sum (default: 3).sum_last_n_topups(3)
count_topups_by_number:
phone_number
: The phone number to query (e.g., "0712345678").count_topups_by_number("0712345678")
The following are example questions or commands users can ask the AI to interact with the Africa's Talking Airtime MCP, based on the available tools:
country
variable set in the client or on claude_desktop_config.json
.airtime_transactions.db
) is created in the project directory upon initialization.Claude 3.7 Sonnet
. If you are price conscious GPT-4.1 Nano
is a good, cheaper option when used with clients like Goose.No version information available
0 contributors