MCP Integration Guide
What is MCP?
The Model Context Protocol (MCP) is a standard for connecting AI assistants to external tools and data sources. The SendAfrica Agent implements MCP to expose its SMS, Email, and Documentation tools to any compatible AI assistant.
Integration Options
1. Stdio Transport (Local)
Run the agent as a local MCP server for direct integration with AI assistants.
Claude Desktop Configuration:
{
"mcpServers": {
"sendafrica": {
"command": "uv",
"args": ["run", "sendafrica-agent", "mcp"],
"cwd": "/path/to/SendAfrica-Agent"
}
}
}Start the server:
uv run sendafrica-agent mcp2. SSE Transport (Remote)
The agent also supports authenticated Server-Sent Events (SSE) transport when running as a FastAPI service.
Endpoint: http://localhost:8000/sse
Send Authorization: Bearer <AGENT_MCP_AUTH_TOKEN> when connecting remotely. Keep AGENT_ALLOWED_HOSTS and AGENT_ALLOWED_ORIGINS restricted to known domains.
Configuration for remote MCP:
{
"mcpServers": {
"sendafrica": {
"url": "http://localhost:8000/sse"
}
}
}Safety Guardrails
| Action | Requirement |
|---|---|
| Send single SMS | No confirmation needed |
| Send bulk SMS (>10 recipients) | Requires confirmed: true |
| Create campaign | Always requires confirmed: true |
| Send email (>5 recipients) | Requires confirmed: true |
Transport Security
Remote SSE is protected by AGENT_MCP_AUTH_TOKEN; FastMCP also enforces the comma-separated AGENT_ALLOWED_HOSTS and AGENT_ALLOWED_ORIGINS settings.