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)
| Tool | Parameters | Description |
|---|---|---|
get_account_balance | — | Check SendAfrica SMS credit balance |
get_usage_summary | period="this_month" | Summarize sent/delivered/failed SMS |
list_contacts | list_id="1", query="" | Search/list phonebook contacts |
get_delivery_status | message_id="" | Query delivery status logs |
send_sms | to, message, sender_id="" | Send a single SMS |
send_bulk_sms | recipients[], message, sender_id="" | Bulk send (≤100 recipients) |
create_campaign | name, message, contact_group_id | Schedule bulk campaign — guardrail-checked |
#Email tools (MailAfrica)
| Tool | Parameters | Description |
|---|---|---|
send_email | to[], subject, body, from_address | Send transactional email — guardrail-checked |
list_inbound_emails | address_id=1, limit=20 | List received inbound emails |
get_email_balance | — | Check MailAfrica wallet & credit balance |
#Documentation & SDK tools
| Tool | Parameters | Description |
|---|---|---|
search_documentation | query, target="all" | Search REST API docs and SDK code samples |
get_documentation_topic | topic_id | Fetch full guide & SDK snippets |
#Model discovery
| Tool | Parameters | Description |
|---|---|---|
list_models | — | List 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)