Skip to main content
Glama
nasoma

Africa's Talking Airtime MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
api_keyYesYour Africa's Talking API key
countryYesYour country (e.g. kenya, uganda, dr congo, rwanda, south africa)
usernameYesYour Africa's Talking username
currency_codeYesCurrency code (e.g. KES, UGX, NGN)

Tools

Functions exposed to the LLM to take actions

NameDescription
check_balance

Checks the airtime balance of the Africa's Talking account.

This tool connects to the Africa's Talking API to fetch the user's current application data, which includes the account balance. Returns: str: A message displaying the account balance or an error if the balance cannot be retrieved.
load_airtime

Sends airtime to a specified phone number and logs the transaction.

This tool formats the phone number, sends the airtime using the Africa's Talking API, and saves a record of the transaction in the database. Args: phone_number (str): The recipient's phone number. amount (float): The amount of airtime to send. currency_code (str): The currency for the transaction (e.g., "KES"). Returns: str: A message indicating the status of the airtime transaction.
get_last_topups

Retrieves the last N top-up transactions from the database.

Args: limit (int, optional): The number of recent transactions to fetch. Defaults to 3. Returns: str: A formatted string listing the last N transactions or a message if no transactions are found.
sum_last_n_topups

Calculates the sum of the last 'n' successful top-ups.

This tool retrieves the last 'n' transactions from the database and calculates their total sum. It ensures that all transactions are in the same currency before summing. Args: n (int, optional): The number of recent top-ups to sum. Defaults to 3. Returns: str: The total sum of the last 'n' top-ups or an error message if the currencies are mixed or no transactions are found.
count_topups_by_number

Counts the number of top-ups for a specific phone number.

Args: phone_number (str): The phone number to count transactions for. Returns: str: The total count of top-ups for the given number or an error message.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nasoma/africastalking-airtime-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server