MCP Server (AI assistants)
Connect Claude, ChatGPT, Cursor and other AI assistants to Taifa Mail.
The Taifa Mail MCP server lets an AI assistant - Claude, ChatGPT, Cursor, or any agent that speaks the Model Context Protocol - send, schedule, track and search email through your Taifa Mail account.
It is hosted - there is nothing to install. Point your AI client at one URL:
The server speaks standard MCP, so every client connects the same way. Authenticate either with one-click OAuth sign-in or with an Taifa Mail API key - see Connect it below.
What the AI can do
Once connected, the assistant has these tools:
| Tool | What it does |
|---|---|
send_email | Send a transactional email - to, subject, from_address, html/text, optional cc, reply_to, and send_at to schedule it. |
send_batch | Send many emails in one call, one recipient each. Starter plan or higher. |
validate_email | Dry-run a send - checks the sender, domain and plan limits without delivering anything. |
get_email_status | Look up a sent email's delivery status by id. |
get_email_events | Get the full delivery-event timeline for an email (queued, sent, delivered, open, click, bounce). |
retry_email | Resend a previously bounced, rejected or failed email. |
search_emails | Search the email log (to:, status:, domain: filters). |
list_scheduled_emails | List emails queued for future delivery, with a countdown. |
cancel_scheduled_email | Cancel a scheduled email before it sends. |
send_scheduled_now | Send a scheduled email immediately instead of waiting. |
get_analytics | Aggregate stats - sent, delivered, bounced, opens, clicks - for a time window. |
list_senders | List the verified sender addresses the account may send from. |
list_domains | List sending domains and their DKIM/SPF/DMARC status. |
Every tool call is a scoped, authenticated request to your account. Org scoping, rate limits and usage accounting apply exactly as for any API call.
Connect it
You can connect in one of two ways. OAuth is the easiest for desktop AI apps; an API key is best for editors and CLIs.
Option A - Connect with OAuth (one click)
Clients that support OAuth connectors (Claude, ChatGPT) can connect without you handling any credential:
- In your AI client, add a custom connector / MCP server with the URL
https://mcp.govconnect.ke/mcp. - The client opens an Taifa Mail sign-in page. Sign in (Google, GitHub, magic link or password) and approve the connection on the consent screen.
- You are returned to your AI client, connected.
The connection appears under Settings → Connections in the dashboard, showing which assistant connected and when it was last used. Revoke it there at any time - that immediately cuts off the assistant.
Option B - Connect with an API key
-
In the dashboard, open API Keys and create a key. It starts with
tfm_k_. Treat it like a password. -
Add the server to your AI client with the endpoint URL and the key as an
Authorizationheader:Endpoint https://mcp.govconnect.ke/mcp(HTTP / streamable transport)Auth header Authorization: Bearer tfm_k_your_key_here
How you enter these depends on the client:
- Claude Code -
- Claude Desktop / ChatGPT - add a custom connector with the
endpoint URL. These clients prefer OAuth (Option A); they also accept
an
Authorizationheader where the UI allows one. - Cursor, Windsurf, VS Code, Zed, and other MCP-capable editors - add an HTTP MCP server entry with the same URL and header.
- Any other MCP client - point it at the endpoint and pass the
Authorizationheader. There is nothing Taifa Mail-specific to install.
That's the whole setup. Now you can ask the assistant things like
"email this release note to alice@example.com from hello@govconnect.ke" -
it calls list_senders, then send_email, and reports the delivery id.
Every AI action is logged
Anything an assistant does through the MCP server is recorded on your account's activity log, tagged as AI-driven and labelled with the connecting client (Claude, ChatGPT, …). Emails it sends are marked with an MCP source in the email log. You always have a full audit trail of what an assistant did on your behalf.
How MCP works
MCP is an open protocol for connecting AI assistants to tools. An MCP server advertises a set of tools; the AI client discovers them and decides when to call them based on the conversation.
The assistant never sees raw HTTP or your account internals - it just
calls send_email(...). The server authenticates each connection with
the credential you supplied, and the rest of Taifa Mail applies
exactly as for any API call.
Other assistants
The server speaks standard MCP, so it works with any MCP-capable client. For an assistant that exposes its own plugin or "action" mechanism instead of MCP, wrap the REST API directly - the API key is the only credential either way.
A connected assistant can send email and read your logs with the permissions of the credential it used. Connect with a dedicated API key or a revocable OAuth connection, and revoke it the moment it is no longer needed.