email-firewall
Provides read-only access to Gmail accounts via the Gmail API (gmail.readonly) and IMAP, enabling authorization, testing, and polling of Gmail accounts for email triage without executing destructive actions such as Delete, Send, Move, Label, Archive, or Seen changes.
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., "@email-firewalltriage this email from no-reply@accounts.google.com about a new login"
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.
Email Triage Agent
Deterministic email triage for Hermes Agent. It classifies messages into P0–P3 or REVIEW, emits the shared pif.event.v1 contract, and lets Hermes deliver the result through its existing Feishu gateway.
确定性的 Hermes 邮件分诊 MCP:不确定就保留,V1 永不删除、永不发信,飞书凭证继续由 Hermes 管理。
Why / 设计理念
Reduce information, do not create more of it.
P0is immediate;P1waits for a digest;P2/P3are audit-only.Sender-auth conflicts and low confidence become
REVIEW/HOLD.Human feedback updates an external JSONL rule trail, never model weights.
The optional adapter connects through read-only IMAP or the Gmail API with
gmail.readonly. It never executes Delete, Send, Move, Label, Archive, or Seen changes.
Related MCP server: lilith-gmail
Local run
npm ci
npm test
npm run demoReal mailbox adapter commands:
node src/adapter-cli.js authorize-gmail --account gmail-main
node src/adapter-cli.js test --account gmail-main
node src/adapter-cli.js poll --accounts gmail-main,gmail-secondCredentials are references to macOS Keychain items or environment variables; literal passwords and tokens are rejected by config validation. For persistent personal Gmail access, publish the Google OAuth audience as In production before authorizing accounts; do not leave the deployment in Testing. See the read-only mailbox adapter guide and the multi-account Gmail OAuth guide.
One-off classification:
node src/cli.js --json '{"sender":"no-reply@accounts.google.com","subject":"New login detected","auth":{"spf":"pass","dkim":"pass","dmarc":"pass"},"protectedSender":true}'Add to Hermes on macOS
Hermes discovers stdio MCP tools from ~/.hermes/config.yaml. Clone and install, then use an absolute path:
git clone https://github.com/roclee2692/email-triage-agent.git ~/Projects/email-triage-agent
cd ~/Projects/email-triage-agent && npm ci
hermes mcp add email-firewall --command node --args "$HOME/Projects/email-triage-agent/src/mcp.js"
hermes mcp test email-firewallHermes registers tools with names such as mcp_email_firewall_triage_email. The server never needs Feishu secrets: Hermes already owns the Feishu channel and presents or schedules the returned message.
Tools
triage_emailrender_feishu_emailrecord_email_feedbackget_email_policyauthorize_gmail_accountpoll_email_accountstest_email_accountacknowledge_email_events
The companion repository is crypto-market-sentinel. Both return the same event envelope, so one Hermes prompt can apply the same urgent/digest/audit policy.
See Hermes macOS setup and the shared PIF event contract.
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Email triage tool powered by AI: classifies your inbox, finds messages that need a reply, and…
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Triage support mail across every connected domain via API key–gated Streamable HTTP MCP.
Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceClassify raw text into structured triage objects with intent, urgency, category, and sentiment. Zero-config MCP tool for support intake, lead routing, and ticket automation-
- FlicenseNot gradedqualityDmaintenanceEnables semantic search, retrieval, and summarization of Gmail emails with privacy-aware classification and PII sanitization.1-
- AlicenseAqualityAmaintenanceOne-pass agentic inbox triage as an MCP server: fetch unread Gmail → classify (action_needed/fyi/newsletter/noise) → summarize → extract tasks → draft replies as Gmail DRAFTS (never sends) → flag calendar → write a triage report. Four stdio tools (fetch_emails, save_gmail_draft, append_tasks, write_report); the host is the LLM, so it runs keyless in Claude Code. Gmail scopes: readonly + compose42MIT
- FlicenseNot gradedqualityCmaintenanceMCP server for human-reviewed Zoho Mail inbox triage. It uses a two-pass proposal/execution model to propose actions (move, archive, mark-read) without touching the inbox until a human approves, and treats email content as untrusted data to prevent prompt injection.-