SendAfrica logoSendAfricaDocs

MCP Tools Reference

Every FastMCP tool exposed by the SendAfrica Agent — SMS, email, documentation, and account tools with parameters and behavior.


Run sendafrica-agent mcp to expose these tools over stdio to any MCP client. Tools are grouped by channel:

#SMS tools (SendAfrica)

ToolParametersDescription
get_account_balanceCheck SendAfrica SMS credit balance
get_usage_summaryperiod="this_month"Summarize sent/delivered/failed SMS
list_contactslist_id="1", query=""Search/list phonebook contacts
get_delivery_statusmessage_id=""Query delivery status logs
send_smsto, message, sender_id=""Send a single SMS
send_bulk_smsrecipients[], message, sender_id=""Bulk send (≤100 recipients)
create_campaignname, message, contact_group_idSchedule bulk campaign — guardrail-checked

#Email tools (MailAfrica)

ToolParametersDescription
send_emailto[], subject, body, from_addressSend transactional email — guardrail-checked
list_inbound_emailsaddress_id=1, limit=20List received inbound emails
get_email_balanceCheck MailAfrica wallet & credit balance

#Documentation & SDK tools

ToolParametersDescription
search_documentationquery, target="all"Search REST API docs and SDK code samples
get_documentation_topictopic_idFetch full guide & SDK snippets

#Model discovery

ToolParametersDescription
list_modelsList models available through the Ngamia gateway

#Connecting an MCP client

Start the server over stdio and point your client at it. Example configuration for Claude Desktop / Cursor style clients:

mcp config.json
json
{
  "mcpServers": {
    "sendafrica": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/SendAfrica-Agent", "sendafrica-agent", "mcp"],
      "env": {
        "SENDAFRICA_API_KEY": "SA-your-key-here",
        "MAILAFRICA_API_KEY": "MA-your-key-here"
      }
    }
  }
}

Then ask naturally — *"What's my SMS balance?"*, *"Send 'Meeting moved to 3pm' to 0712345678"*, or *"Draft a campaign for my VIP list announcing Friday's sale"* (which triggers the confirmation guardrail).

client.py
python
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

server = StdioServerParameters(
    command="uv",
    args=["run", "sendafrica-agent", "mcp"],
)

async def main():
    async with stdio_client(server) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()

            tools = await session.list_tools()
            print([t.name for t in tools.tools])

            balance = await session.call_tool(
                "get_account_balance", {}
            )
            print(balance.content)