draftgate-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@draftgate-mcpCheck my inbox for unread emails"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
draftgate-mcp
An MCP server for email agents that cannot send mail without a human saying yes — unless you've explicitly told it otherwise for that contact.
Most "AI email assistant" demos either send freely (fine for a toy, unacceptable in production) or gate everything behind approval (safe, but defeats the point of automation for routine, low-stakes contacts). draftgate-mcp does neither: each contact carries its own trust level, and the send path enforces it deterministically — not by asking the model to "please be careful."
The pattern
Every contact has an auth_level:
Level | Behaviour |
| Sends immediately. No gate. |
| Sends immediately, unless the body contains a flagged keyword ( |
| Always held as a draft. A human must explicitly call |
| The agent isn't even allowed to compose a draft without permission first. This is the default for anyone not in |
send_email() returns a status field — sent, draft_created, needs_review, or blocked — and the server's own instructions tell the calling model exactly what each status requires before it's allowed to proceed. The gate lives in code, not in a prompt asking the model nicely not to send things.
Unknown recipients default to the most restrictive level. An agent can't accidentally email someone it's never been told about — it has to be extended a trust level explicitly, by a human, first.
Related MCP server: sabit-mcp
Tools
read_inbox,read_message— read mail via IMAPsend_email— the gated send path described abovelist_drafts,confirm_draft,discard_draft— manage held draftslist_contacts,add_contact,update_contact_auth— manage trust levels
Setup
pip install -r requirements.txt
cp .env.example .env # fill in your IMAP/SMTP credentials
cp data/contacts.example.json data/contacts.json # add your real contacts
python server.pyPoint any MCP client (Claude Desktop, Claude Code, etc.) at server.py over stdio.
Why
This was extracted from the trust-tiering logic in a production email agent I run for my own inbox. The rest of that system — voice, telephony, task tracking, internal chat bridges — is specific to my own setup and not worth open-sourcing as-is, but the draft-gate pattern is a genuinely reusable answer to "how do you let an agent act without letting it act unsupervised." This repo is that pattern, stripped down to ~250 lines with no dependencies beyond the standard library, fastmcp, and python-dotenv.
License
MIT — see LICENSE.
Derek Manthorpe · github.com/DRMM101
This server cannot be deployed
Maintenance
Related MCP Connectors
Give your agent its own email address with graduated human oversight, from approval to autonomy.
Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.
Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.
Trust verification for AI agents: identities, domains, phishing, contacts, Trust Circle, Vault.
Related MCP Servers
- AlicenseAqualityDmaintenance▎ Check an email before an AI agent sends it: send / ask a human / block — with machine reason codes and prompt-injection detection.22MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to verify email addresses through a multi-signal probabilistic pipeline, returning confidence scores and honest statuses (safe/risky/invalid/unknown) with evidence.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to send and receive email with enforced security policies, scoped mailboxes, and human approval for external sending.1MIT
- AlicenseAqualityFmaintenanceAn email operating system for AI agents that provides safe triage, drafting, and searching of emails with unbypassable hard-stops on money, banking changes, first-contact senders, and prompt injection.1248 npmMIT