Taifa MailTaifa Mail Docs
Sending Emails

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:

https://mcp.govconnect.ke/mcp

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:

ToolWhat it does
send_emailSend a transactional email - to, subject, from_address, html/text, optional cc, reply_to, and send_at to schedule it.
send_batchSend many emails in one call, one recipient each. Starter plan or higher.
validate_emailDry-run a send - checks the sender, domain and plan limits without delivering anything.
get_email_statusLook up a sent email's delivery status by id.
get_email_eventsGet the full delivery-event timeline for an email (queued, sent, delivered, open, click, bounce).
retry_emailResend a previously bounced, rejected or failed email.
search_emailsSearch the email log (to:, status:, domain: filters).
list_scheduled_emailsList emails queued for future delivery, with a countdown.
cancel_scheduled_emailCancel a scheduled email before it sends.
send_scheduled_nowSend a scheduled email immediately instead of waiting.
get_analyticsAggregate stats - sent, delivered, bounced, opens, clicks - for a time window.
list_sendersList the verified sender addresses the account may send from.
list_domainsList 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:

  1. In your AI client, add a custom connector / MCP server with the URL https://mcp.govconnect.ke/mcp.
  2. 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.
  3. 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

  1. In the dashboard, open API Keys and create a key. It starts with tfm_k_. Treat it like a password.

  2. Add the server to your AI client with the endpoint URL and the key as an Authorization header:

    Endpointhttps://mcp.govconnect.ke/mcp (HTTP / streamable transport)
    Auth headerAuthorization: Bearer tfm_k_your_key_here

How you enter these depends on the client:

  • Claude Code -
    claude mcp add --transport http taifa-mail \
      https://mcp.govconnect.ke/mcp \
      --header "Authorization: Bearer tfm_k_your_key_here"
  • Claude Desktop / ChatGPT - add a custom connector with the endpoint URL. These clients prefer OAuth (Option A); they also accept an Authorization header 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 Authorization header. 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.

You ─▶ Claude ─▶ mcp.govconnect.ke ─▶ Taifa Mail API ─▶ inbox
       (decides     (one HTTP call         (sends via
        to send)     per tool)              Postfix)

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.

On this page