Interact with Africa's Talking airtime service and store transaction data in a local SQLite database.
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
:
{
"mcpServers": {
"Airtime Server": {
"command": "{{PATH_TO_UV}}", // Run `which uv` and place the output here
"args": [
"--directory",
"{{PATH_TO_PROJECT}}", // cd into the repo, run `pwd` and enter the output here
"run",
"main.py"
],
"env": {
"username": "your_africastalking_username",
"api_key": "your_africastalking_api_key",
"country":"your_country", # e.g kenya, uganda, dr congo, rwanda, south africa
"currency_code":"currency-code" # e.g. KES, UGX, NGN
}
}
}
}
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.Send notifications to Slack channels using webhook URLs.
Send emails via SMTP. Requires SMTP server credentials to be configured through environment variables.
Connect to any function, any language, across network boundaries using AgentRPC.
Official MCP Server to interact with Pearl API. Connect your AI Agents with 12,000+ certified experts instantly.
A news feed server for aggregating news from various sources.
Enables interactive LLM workflows by adding local user prompts and chat capabilities directly into the MCP loop.
A read-only MCP server by CData that enables LLMs to query live SendGrid data. Requires the external CData JDBC Driver for SendGrid.
Sends desktop notifications with sound when agent tasks are completed.
Access the Waroom API through the Model Context Protocol.
An open-source messaging server for client-to-client communication using MCP HTTP Streamable messaging.