Contributing
Thank you for your interest in contributing to MailAfrica Agent!
Agent Repository
The main agent code lives at github.com/cameltech/MailAfrica-Agent.
Development Setup
git clone https://github.com/cameltech/MailAfrica-Agent.git
cd MailAfrica-Agent
cp .env.example .env
# Fill in your API keys
uv syncRunning Locally
# MCP server (for testing with AI assistants)
uv run mailafrica-agent mcp
# Webhook server (for testing HTTP endpoints)
uv run mailafrica-agent webhook
# Connectivity check
uv run mailafrica-agent checkCode Style
- Formatter/Linter: Ruff (configured in
pyproject.toml) - Type hints: Required for all functions
- Async: All I/O is async (httpx, aiosqlite, OpenAI SDK)
- Tests: Add tests for new features
Adding a New MCP Tool
- Add the tool function to
mailafrica_agent/mcp_server.py - Use the
@mcp.tool()decorator - Add the corresponding API method to
mailafrica_agent/mailafrica.pyif needed - Update the documentation
Example:
@mcp.tool()
async def my_new_tool(param1: str, param2: int = 10) -> str:
"""Description of what this tool does.
Args:
param1: Description of param1
param2: Description of param2 (default: 10)
"""
# Implementation
return resultDocumentation Repository
This documentation site lives at github.com/cameltech/MailAfrica-agent-docs.
Development Setup
git clone https://github.com/cameltech/MailAfrica-agent-docs.git
cd MailAfrica-agent-docs
npm install
npm run devThe site runs at http://localhost:3000 with hot reload.
Adding or Editing Docs
All documentation content is in content/docs/ as MDX files. Edit them directly — changes appear instantly in dev mode.
File structure:
content/docs/
meta.json # Sidebar navigation order
index.mdx # Introduction
quickstart.mdx # Quickstart guide
configuration.mdx # Configuration reference
mcp-server.mdx # MCP server docs
mcp-tools.mdx # MCP tools reference
auto-reply-agent.mdx # Agent docs
webhooks.mdx # Webhook setup
architecture.mdx # Architecture overview
deployment.mdx # Deployment guide
api-reference.mdx # API reference
contributing.mdx # This fileMDX Format
MDX files support standard Markdown plus JSX components:
---
title: Page Title
description: Page description for SEO
---
# Page Title
Content here with **bold**, *italic*, and `code`.
import { Callout } from "nextra-theme-docs"
<Callout type="info">
This is an info callout.
</Callout>
## Code Blocks
```python
def hello():
print("Hello, world!")
### Building
```bash
npm run buildThe output is a standalone Next.js site that can be deployed to Vercel, Netlify, or any static hosting provider.
Reporting Issues
- Agent bugs: GitHub Issues
- Documentation issues: GitHub Issues