✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

UBOS Asset Marketplace: Africa’s Talking Airtime MCP Server - Automate Airtime Top-Ups with Ease

In today’s rapidly evolving digital landscape, businesses are constantly seeking innovative solutions to streamline operations and enhance customer engagement. The UBOS platform emerges as a comprehensive AI Agent Development Platform, empowering businesses to orchestrate AI Agents, connect them with enterprise data, and build custom AI Agents with their preferred LLM models and Multi-Agent Systems. Within the UBOS ecosystem, the Asset Marketplace offers a curated collection of tools and integrations designed to extend the capabilities of AI agents. One such asset is the Africa’s Talking Airtime MCP (Model Context Protocol) Server, a powerful tool that enables seamless airtime transactions via the Africa’s Talking API. This overview delves into the functionalities, use cases, and key features of the Africa’s Talking Airtime MCP Server, highlighting its potential to revolutionize airtime management for businesses across Africa.

What is an MCP Server?

Before diving into the specifics of the Africa’s Talking Airtime MCP Server, it’s crucial to understand the underlying concept of MCP. MCP stands for Model Context Protocol. An MCP server acts as a bridge, allowing AI models to access and interact with external data sources and tools. MCP is an open protocol that standardizes how applications provide context to LLMs. By adhering to the MCP standard, developers can create integrations that work seamlessly with a variety of AI models and platforms, ensuring interoperability and reducing integration complexity. This standardized approach unlocks new possibilities for AI-powered automation and decision-making.

Africa’s Talking Airtime MCP Server: A Deep Dive

The Africa’s Talking Airtime MCP Server is a specialized integration designed to facilitate airtime transfers using the Africa’s Talking API. It allows users to programmatically top-up airtime to mobile numbers, check account balances, and retrieve transaction histories. This server essentially empowers AI agents to manage airtime-related tasks autonomously, freeing up human resources and improving efficiency.

Use Cases:

The Africa’s Talking Airtime MCP Server finds applications in a variety of scenarios, including:

  • Customer Loyalty Programs: Reward loyal customers with airtime directly through AI-powered chatbots or automated marketing campaigns. For example, an AI agent could automatically top-up a customer’s phone with airtime as a birthday gift or as a reward for reaching a certain spending threshold.
  • Incentive Programs: Motivate employees or partners with airtime rewards based on performance metrics. An AI agent could be configured to automatically distribute airtime to sales representatives who exceed their targets, boosting morale and driving sales.
  • Disaster Relief and Emergency Assistance: Provide critical communication support to affected populations by distributing airtime during emergencies. In the wake of a natural disaster, an AI agent could identify individuals in affected areas and provide them with airtime to connect with loved ones and access essential information.
  • Micro-Payments and Digital Wallets: Integrate airtime top-ups into micro-payment systems and digital wallets, enabling users to easily replenish their airtime balance. An AI agent could monitor a user’s airtime balance and automatically trigger a top-up when it falls below a certain level.
  • Automated Notifications: Send automated airtime top-ups as reminders or notifications. For example, an AI agent could send a customer airtime as a reminder to pay a bill or as a thank you for completing a survey.
  • Research and Data Collection: Offer airtime as an incentive for participating in surveys or providing feedback. An AI agent could automatically distribute airtime to participants upon completion of a survey, increasing response rates and gathering valuable data.

Key Features:

The Africa’s Talking Airtime MCP Server boasts a comprehensive set of features designed to simplify airtime management:

  • Airtime Transfers: Effortlessly send airtime to specified phone numbers using the load_airtime tool. The server supports phone number formatting based on the country specified in the configuration, ensuring compatibility across different African nations.
  • Account Balance Checks: Retrieve the current airtime balance for your Africa’s Talking account with the check_balance tool. This allows you to monitor your airtime usage and ensure sufficient funds are available for future transactions.
  • Transaction History: Access and summarize transaction history using the get_last_topups, sum_last_n_topups, and count_topups_by_number tools. These tools provide valuable insights into your airtime spending patterns and help you track the effectiveness of your airtime campaigns.
  • SQLite Database Integration: Store transaction details in a local SQLite database (airtime_transactions.db). This ensures data persistence and allows you to easily query and analyze your transaction history.
  • Africa’s Talking API Integration: Leverage the robust capabilities of the Africa’s Talking API for reliable and secure airtime transactions. The server handles the complexities of API communication, allowing you to focus on your core business objectives.
  • Country Support: The application supports the countries where Africa’s Talking Airtime service is supported. This ensures that phone numbers are correctly formatted and that airtime transactions are processed according to local regulations.

Tools Descriptions

The MCP provides the following tools for managing airtime transactions:

  1. check_balance:

    • Description: Retrieves the current airtime balance for your Africa’s Talking account.
    • Usage: check_balance()
    • Output: Returns the account balance (e.g., “Account Balance: KES 1234.00”) or an error message if the balance cannot be fetched.
  2. load_airtime:

    • Description: Sends airtime to a specified phone number and saves the transaction in the database.
    • Parameters:
      • 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”).
    • Usage: load_airtime("0712345678", 100.00, "KES")
    • Output: Confirms success (e.g., “Successfully sent KES 100.00 airtime to +254712345678”) or reports an error.
  3. get_last_topups:

    • Description: Retrieves the last N airtime top-up transactions from the database.
    • Parameters:
      • limit: Number of transactions to retrieve (default: 3).
    • Usage: get_last_topups(3)
    • Output: Lists recent transactions (e.g., “Last 3 top-up transactions: …”) or indicates no transactions found.
  4. sum_last_n_topups:

    • Description: Calculates the total amount of the last N successful top-ups, ensuring they use the same currency.
    • Parameters:
      • n: Number of transactions to sum (default: 3).
    • Usage: sum_last_n_topups(3)
    • Output: Returns the sum (e.g., “Sum of last 3 successful top-ups: KES 300.00”) or an error if currencies differ.
  5. count_topups_by_number:

    • Description: Counts the number of successful top-ups to a specific phone number.
    • Parameters:
      • phone_number: The phone number to query (e.g., “0712345678”).
    • Usage: count_topups_by_number("0712345678")
    • Output: Returns the count (e.g., “Number of successful top-ups to +254712345678: 5”) or an error.

Getting Started with the Africa’s Talking Airtime MCP Server

Integrating the Africa’s Talking Airtime MCP Server into your AI agent workflow is a straightforward process. The server can be easily installed via Smithery, a package manager for AI tools, or manually by cloning the repository and installing the required dependencies.

Installation via Smithery:

bash npx -y @smithery/cli install @nasoma/africastalking-airtime-mcp --client claude

Manual Installation:

  1. Clone the repository:

bash git clone https://github.com/nasoma/africastalking-airtime-mcp.git cd africastalking-airtime-mcp

  1. Set up the virtual environment and install dependencies:

bash uv sync

Configuration:

Once installed, the server needs to be configured with your Africa’s Talking account credentials, including your username, API key, and country. These credentials can be set as environment variables or within the claude_desktop_config.json file when using Claude Desktop.

Configuration for Claude Desktop:

{ “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 } } } }

Configuration for Goose:

If you want to use your preferred LLM and supply an API key, Goose is a good option.

  • Install Goose.
  • Open the settings panel and add a custom extension (MCP Server).
  • Give your extension a name. Type is STDIO.
  • Add the command. Save changes.
  • Add your environment variables: username, api_key, currency_code and country.
  • Save changes.

Integrating with UBOS

The Africa’s Talking Airtime MCP Server seamlessly integrates with the UBOS platform, allowing you to incorporate airtime management into your AI agent workflows. By connecting the server to your UBOS environment, you can empower your AI agents to automate airtime-related tasks, such as rewarding loyal customers, incentivizing employees, or providing emergency assistance. UBOS offers a user-friendly interface for managing MCP servers and connecting them to your AI agents. The platform also provides robust monitoring and logging capabilities, allowing you to track the performance of your airtime transactions and identify any potential issues.

Example Prompts for AI Interaction

To interact with the Africa’s Talking Airtime MCP, you can use natural language prompts that leverage the available tools. Here are a few examples:

  • Check Account Balance:
    • “What is my Africa’s Talking account balance?”
    • “Can you show me the current balance?”
    • “Check my airtime balance.”
  • Send Airtime:
    • “Send 100 KES airtime to 0712345678.”
    • “Topup my 0712345678 with 60.”
    • “Load 50 NGN to +2348012345678.”
    • “Can you top up 200 UGX to 0755123456?”
  • View Recent Top-Ups:
    • “Show me the last 3 airtime transactions.”
    • “What are my most recent top-ups?”
    • “List the last 5 airtime top-ups.”
  • Sum Recent Top-Ups:
    • “What is the total of my last 3 top-ups?”
    • “Sum the amounts of my last 4 airtime transactions.”
    • “How much have I sent in my last 5 top-ups?”
  • Count Top-Ups by Phone Number:
    • “How many times have I topped up 0712345678?”
    • “Count the top-ups to +254712345678.”
    • “Tell me how many successful top-ups were made to 0755123456.”

Conclusion

The Africa’s Talking Airtime MCP Server is a valuable asset for businesses looking to automate airtime management and enhance customer engagement. By integrating this server into the UBOS platform, you can empower your AI agents to seamlessly handle airtime transactions, freeing up human resources and improving operational efficiency. Whether you’re running a customer loyalty program, incentivizing employees, or providing emergency assistance, the Africa’s Talking Airtime MCP Server offers a flexible and reliable solution for all your airtime needs. Embrace the power of AI and unlock new possibilities with the UBOS platform and the Africa’s Talking Airtime MCP Server.

Additional Notes

  • Ensure your Africa’s Talking account is funded to send airtime.
  • Phone numbers are automatically formatted based on the country variable set in the client or on claude_desktop_config.json.
  • The SQLite database (airtime_transactions.db) is created in the project directory upon initialization.
  • Works best with models that support tool calling, e.g Claude 3.7 Sonnet. If you are price conscious GPT-4.1 Nano is a good, cheaper option when used with clients like Goose.

Featured Templates

View More
AI Characters
Sarcastic AI Chat Bot
129 1713
Verified Icon
AI Agents
AI Chatbot Starter Kit
1336 8300 5.0
Customer service
Service ERP
126 1188
AI Agents
AI Video Generator
252 2007 5.0
AI Engineering
Python Bug Fixer
119 1433

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.