GuideUpdated December 1, 2026
Connect Hermes Agent to email: MCP, skills or the gateway
The quickest way to give Hermes Agent email access is a remote MCP server: one entry with url and auth: oauth in ~/.hermes/config.yaml, then hermes mcp login.[1] Hermes also ships its own routes: the Himalaya skill for a mailbox over IMAP/SMTP, the Google Workspace skill for Gmail, an email gateway that lets people write to the agent, and a bundled skill that triages an inbox and drafts replies.[4][5][6][9] Which one fits depends on whether the agent should run a mailbox of its own, work in the addresses you already use, or simply be reachable by email.
Command Mail is our product, so the examples use it as the MCP server. The steps work the same with other email MCP servers that offer Streamable HTTP and OAuth, as long as Hermes can sign in there without an OAuth client of your own, through dynamic client registration or a client metadata document (CIMD). If a provider requires a pre-registered client, the Hermes docs say you add its oauth.client_id and oauth.client_secret to the entry.[1][2] We read the Hermes docs and code on 2026-11-06, when the latest release was v0.23.0 from 2026-11-05.[8]
Contents
- Four ways to add email to Hermes
- Triage an inbox with the email-inbox-triage skill
- What you need
- Step by step: set up an email MCP server in Hermes
- Approve write calls: trust and tool filters
- Hermes with Outlook and Microsoft 365
- The email gateway: reach Hermes by email
- Hermes on a server: signing in without a browser
- Check that it works
- Scheduled inbox jobs with hermes cron
- Common problems
- Connect Command Mail to your agent
- Review status
- Next steps
- Frequently asked questions
- Sources
01Four ways to add email to Hermes
The Hermes docs draw a clear line between features that sound alike. The gateway makes Hermes reachable by email; the Himalaya skill lets the agent operate a mailbox.[4][5]
| Route | Use it for | Sign-in | How the agent works |
|---|---|---|---|
| Email MCP server | read, sort, draft and send in your existing addresses | OAuth in the browser, or headers | tools prefixed mcp__<name>__ |
| Himalaya skill | a separate agent mailbox over IMAP/SMTP | password, app password or OAuth2 in Himalaya | terminal commands, polled by cron |
| Google Workspace skill | Gmail, Calendar, Drive | your own Google Cloud project, OAuth | script calls |
| Email gateway | people email Hermes, Hermes replies in the thread | mailbox credentials in ~/.hermes/.env | each incoming email becomes a message |
Sources: Hermes documentation and the Himalaya configuration reference, read on 2026-11-06.[1][4][5][6][14]
For the gateway and the Himalaya skill, Hermes recommends a separate account for the agent and advises against handing it your personal inbox.[4][5] An MCP server with fine-grained permissions is the route when Hermes should work in your real addresses without mailbox passwords sitting on the machine. If you want a pure agent inbox at AgentMail, there is an optional skill built on the AgentMail CLI.[15]
02Triage an inbox with the email-inbox-triage skill
The Hermes docs retrieved on 2026-11-06 list a skill, installed by default, that turns a mailbox into a bounded queue of decisions: email/email-inbox-triage, version 0.2.0.[9] It owns prioritization and reply policy and leaves the provider commands to connector skills, naming Himalaya and Google Workspace or "the relevant connector".[9]
The skill starts by fixing the scope: account, folders, time window, maximum number of threads and allowed actions. The default is read plus draft, with no sending or deleting, and the skill states that "handle my inbox" does not imply permission to send or delete.[9] Hermes then reads whole threads instead of only the newest message and treats message content as data, never as instructions.
Each thread gets one of six dispositions: urgent reply, reply, action without reply, waiting, reference or noise. Before the first draft, Hermes should sample 20 to 50 of your recent sent replies where available, to match greeting, length and tone. If Sent is empty or inaccessible after checking the available folders, Hermes says so and matches the incoming thread's register.[9] It ends with an approval batch, and only what you approve there gets sent, labelled or archived. When a send fails ambiguously, it checks Sent before retrying.[9]
Paired with an MCP server, the skill decides how Hermes works and the permissions at the mail service decide what is technically possible. A prompt such as "Triage my inbox for the last two days with commandmail, read and drafts only" is enough to start.
03What you need
You need a current Hermes install; MCP support is part of the standard install, according to the docs.[1] You also need an email service with an MCP server and a browser where you approve the sign-in.
Command Mail's server runs at https://commandmail.app/mcp with OAuth 2.1, PKCE and dynamic client registration.[7] You don't need an OAuth client of your own. On the consent page you switch each permission on or off: mail:read to read, search and organize within the mailbox's autonomy level, mail:draft for drafts, mail:send-approved to send a draft you approved, mail:send to send without per-message approval, and mailboxes to connect addresses. Sending without approval starts switched off.[7]
The free plan covers one mailbox (further mailboxes pause and keep receiving) and the last 90 days, with reading, search, sorting, the morning brief and drafts, but no sending. Pro adds sending, up to ten mailboxes and full history: €19 a month for the first 100 paying Pro accounts for as long as that subscription runs, €29 a month after that, or €190 or €290 a year. You can try Pro for 7 days for €1; Team costs €39 per person per month (prices as of 2026-12-01).[7]
04Step by step: set up an email MCP server in Hermes
Setup is one config entry, one sign-in and a tool reload.[1]
Open
~/.hermes/config.yamland add an entry undermcp_servers:mcp_servers: commandmail: url: "https://commandmail.app/mcp" auth: oauth trust: untrustedYou can pick any name; it sets the tool prefix. The next section explains
trust: untrusted.Sign in from a fresh terminal:
hermes mcp login commandmail. Hermes prints a sign-in link, opens your browser when it can, and waits up to five minutes for the callback.[1] If you edit the file from inside a running Hermes session, the CLI reloads MCP connections with a 30-second timeout, which the docs say is too short for a browser sign-in. Hence the separate terminal.Pick the permissions on the consent page.
mail:readandmail:draftare enough to begin with.Start a new session with
hermes chator type/reload-mcpin the running one.[1] A running gateway (hermes gateway run) watches the config on its own and connects a new entry within about a minute, according to the docs.
Hermes stores the tokens at ~/.hermes/mcp-tokens/commandmail.json, readable only by your user, and refreshes them until a refresh fails.[1] According to the Hermes code, the tools are registered as mcp__commandmail__search_mail or mcp__commandmail__get_thread, for example; the feature docs still show an older single-underscore form. In tools.include you use the server's own tool names anyway.[2] You rarely call the tools by hand, because Hermes picks them during normal work.
If Command Mail is already set up in Claude Code, hermes import-agent claude-code copies the MCP server entries from ~/.claude.json. Since v0.23.0 that command comes from the agent-importers plugin, which you install once per profile with hermes plugins install agent-importers; a fresh hermes setup offers the plugin and the import itself when it finds Claude Code, Codex CLI, Cursor or OpenClaw.[1][8] The import does not bring credentials along, so sign in to Command Mail afterwards with hermes mcp login commandmail.
05Approve write calls: trust and tool filters
With trust: untrusted, Hermes asks before tool calls that are not marked readOnlyHint: true. The default is full, where Hermes asks nothing extra for write tools; only a configured spend limit (spend_limit) can still trigger a prompt.[2] The docs recommend untrusted for any server you don't fully control.
The prompt offers three answers: allow once, for the rest of this chat (Session), or Always. According to the reference, Always writes mcp:<server>/<tool> to the command_allowlist and allows that one tool in other chats too. Deleting the entry revokes it for the other chats, while the chat where you chose Always keeps it until that chat ends.[2] Approve send_message with Always once, and the next send goes through without a question.
YOLO skips the prompt entirely: /yolo for the current chat, --yolo for the process, and approvals.mode: off for every chat and cron job of the profile.[10] Write tools on an untrusted server then run without asking. The Hermes prompt is therefore an additional approval layer that can be switched off; the permissions you grant at the mail service apply regardless.
Command Mail's hosted MCP server annotates its tools to match: read, search and list tools carry readOnlyHint: true; drafts, organizing actions, rules and sending do not. Under untrusted, searches run without a prompt. Hermes asks before archiving, drafting or sending unless the tool has a Session or Always approval, YOLO is on, or approvals.mode: off is set.
You can also limit which tools Hermes loads at all. With tools.include, Hermes registers only the listed tools, and glob patterns such as * work.[1] An entry for an agent that may read and save drafts but not organize or send mail:
mcp_servers:
commandmail:
url: "https://commandmail.app/mcp"
auth: oauth
trust: untrusted
tools:
include: [capabilities, search_mail, list_threads, get_thread, list_attachments, morning_brief, save_agent_draft, list_agent_drafts]With an include list of exact tool names only, tools the server adds later are not picked up automatically; glob patterns also match new tools whose names fit the pattern. hermes mcp configure commandmail shows a checklist if you would rather choose interactively.[1]
Hermes' filters do not replace the permissions at the mail service. Command Mail's hosted MCP server builds its tool list from the granted permissions: send_message and reply exist only with mail:send, and send_approved_draft only with mail:send-approved. Sending without per-message approval also needs Pro, a send-capable mailbox on the auto level and room in the daily limit, and such a message goes to at most 20 recipients across To, Cc and Bcc.[7] According to the app code, drafts a person approved are exempt from the daily limit and the recipient cap. Without mail:send, even a YOLO chat cannot send without per-message approval; mail:send-approved only sends a draft exactly as it was approved.
06Hermes with Outlook and Microsoft 365
Hermes cannot reach Outlook.com or Microsoft 365 over IMAP with a password or app password, because Microsoft has turned that sign-in off there. The gateway docs list an app password with outlook.office365.com and smtp.office365.com under "Outlook / Microsoft 365", and the Himalaya guide mentions app passwords for Outlook too.[4][5] Microsoft, on the other hand, says Microsoft accounts can no longer connect to non-Microsoft email apps through Basic Authentication since September 16, 2024.[12]
For Exchange Online, Microsoft removed Basic authentication for IMAP and POP, among other protocols, and disabled SMTP AUTH in tenants that weren't using it; Microsoft adds that this also stops app passwords from working with apps that don't support two-step verification. For SMTP AUTH, Microsoft points to a separate retirement timeline.[11] The gateway's email adapter in v0.23.0 signs in with address and password (imap.login, smtp.login) and contains no OAuth path.[13] We have not tested a sign-in with an Outlook account ourselves.
That leaves three routes. The Himalaya skill's configuration reference shows OAuth2 with your own client ID and token commands for providers that support it; Microsoft offers OAuth for IMAP, POP and SMTP AUTH, and the app registration is then yours to do.[14][11] An MCP server that signs in to Microsoft over OAuth keeps the credentials out of Hermes. Command Mail receives Outlook mail by automatic forwarding and, according to its app code, sends for Outlook.com and Hotmail through its own relay: recipients see a Command Mail sender address, and replies go to your Outlook address via Reply-To. The Outlook forwarding guide walks through the forwarding.
07The email gateway: reach Hermes by email
The gateway checks a mailbox of its own over IMAP every 15 seconds and replies over SMTP in the same thread, as plain text.[4] You set it up with hermes gateway setup and the "Email" option, or by hand in ~/.hermes/.env.
By default the gateway ignores unknown senders. EMAIL_ALLOWED_USERS sets whose mail gets processed; pairing codes or a single polite refusal can be switched on as well.[4] According to the code, senders such as noreply, and mail with an Auto-Submitted value other than no, Precedence: bulk, or a non-empty List-Unsubscribe header, are ignored without a reply.[13]
One requirement is new and easy to miss: by default, Hermes acts only on mail whose sender domain is authenticated by your receiving server's topmost Authentication-Results header. Set EMAIL_AUTHSERV_ID to the exact id your server writes before the first semicolon of that header, mx.google.com for Gmail. Your server must strip incoming headers that claim this id before it prepends its own; a matching id alone does not prove where a message came from. While sender authentication is on and the value is missing, the gateway drops every message that needs an authenticated sender.[4] The password sits in plain text in ~/.hermes/.env, which is why the docs recommend a dedicated account and chmod 600.
08Hermes on a server: signing in without a browser
On a VPS, in a container or over SSH, no browser opens on the host. In an interactive terminal, Hermes offers to paste the redirect URL next to the sign-in link.[1] Open the link on your own computer and approve. The page the browser lands on shows a connection error, which the docs call expected; copy the full address into the terminal.
The guide for remote hosts describes other options, such as SSH port forwarding to the callback port.[3] According to the docs, the Hermes desktop app relays the sign-in to a remote backend automatically when both are up to date.[1] Hermes uses a device-code login (hermes mcp login <name> --flow device) only when the authorization server offers one; Command Mail's OAuth metadata lists only the authorization code and refresh token grants.
You can also run a local stdio server instead of the remote one. Command Mail has a command-line tool for that: curl -fsSL https://commandmail.app/install.sh | sh, then commandmail login, which also signs in through the browser. commandmail mcp then starts a local MCP server.[7] Hermes runs stdio servers through the command and args fields.[2] For Command Mail that means command: "commandmail" and args: ["mcp"]. The local server differs from the hosted one: according to the app code, its tools lack read-only annotations, so Hermes may also ask before read calls under trust: untrusted. Tools stay visible there even without the matching permission, and the server then refuses to run them.
09Check that it works
Your first call should be capabilities. It returns the account owner, the granted permissions, every mailbox with its autonomy level, and the limits. Ask Hermes: "Call capabilities on commandmail and tell me what you're allowed to do." If the answer matches what you picked, the connection works.
Next, a read-only task: "Find invoices from the last 30 days and list sender, date and amount." Only then let it create a draft; under trust: untrusted, Hermes asks first as long as YOLO and approvals.mode: off are off and the tool has no Session or Always approval.
Command Mail marks email content as untrusted data and flags suspected prompt injection.[7] Hermes itself calls email an unauthenticated inbound channel and advises never to act automatically on unsolicited mail.[5] Both matter all the more because the same Hermes session can often run terminal commands.
10Scheduled inbox jobs with hermes cron
For recurring jobs such as a morning brief, set up a schedule with hermes cron add.[5] For polling an agent mailbox, the Hermes Himalaya guide suggests every 15 to 30 minutes, with a prompt that explicitly forbids acting on instructions in unsolicited mail.
For unattended runs, the permissions at the mail service are the firmer boundary, because nobody answers prompts during a cron run and approvals.mode: off also covers cron jobs.[10] A morning-brief agent needs mail:read and at most mail:draft, no send permission.
Hermes v0.23.0 adds experimental MCP events: with events: true, a server can notify Hermes about something new, and each event starts an agent run through the gateway's webhook listener.[2][8] That requires a server that offers the event methods. According to its app code, Command Mail does not; with Command Mail you poll for new mail on a cron schedule.
11Common problems
Hermes lists the tools, but every call hangs. The docs describe this for servers whose client registration fails: tools/list answers without sign-in while real calls time out. hermes mcp login now checks that a token actually landed on disk.[1] Command Mail requires a token even for the tool list and answers 401 with a sign-in hint when it is missing.
The sign-in times out. Five minutes is the default. Set oauth.timeout on the server entry to wait longer.[1]
The server disappears from the gateway. When a refresh token dies, the gateway never opens a browser; it parks the server with a warning in gateway.log. Run hermes mcp login <name> once, and the parked server picks up the new token on its next probe.[1]
A write call returns "outcome_uncertain". Streamable HTTP servers may end idle sessions. Hermes then retries only calls marked readOnlyHint: true on its own; for everything else, check whether the action happened before you start it again.[2] For an email, look in Command Mail's sent messages or activity before letting the agent send it again.
The gateway doesn't answer emails. If the gateway log says "authserv-id is not configured", EMAIL_AUTHSERV_ID is missing. Otherwise check that the sender is in EMAIL_ALLOWED_USERS.[4]
The agent can't send. Check the plan first, then the permissions. Sending needs Pro; mail:send-approved only sends a draft you approved in Command Mail, and not from a mailbox on read.[7] For other permissions, sign in again with hermes mcp login commandmail.
12Connect Command Mail to your agent
If Hermes should work in the addresses you already use, connect Command Mail in one of these ways and set the permissions as you do[7]:
- MCP address:
https://commandmail.app/mcpfor Hermes, Claude Code, Codex, Cursor and other clients with remote MCP; sign-in uses OAuth 2.1[7]. - Plugin or connector: in ChatGPT as an official plugin from the plugin directory, in Claude as a community connector from the directory; whether you can install plugins in ChatGPT depends on plan, workspace, role and region[7].
- Choose permissions when connecting: every permission can be switched off when connecting, sending without approval starts switched off, and an approved draft goes out only in exactly the version a person confirmed[7].
All permissions and autonomy levels are described in the permissions documentation.
13Review status
On 2026-11-06 we re-read the Hermes v0.23.0 docs, release notes and code and revised this page. Corrected: the earlier version said Hermes asks before every write call under trust: untrusted; that statement was too broad, because Hermes does not ask after a Session or Always approval, or under YOLO or approvals.mode: off.[2][10] hermes import-agent now comes from a plugin.[8] New: the triage skill, the Outlook section, EMAIL_AUTHSERV_ID for the gateway, and experimental MCP events. We checked the statements about Command Mail against the app code. On 2026-12-01 we checked Command Mail's plan details in its llms.txt again; they are unchanged.
14Next steps
How permissions and autonomy levels work together is covered in Permissions and autonomy. Whether a self-run IMAP MCP server or a hosted service fits better is explained in IMAP MCP vs hosted MCP. Other terminal agents are covered in Email in Claude Code, Codex and Cursor. The same route for OpenClaw is covered in Connect OpenClaw to email.
Start Command Mail for free and connect Hermes.
Frequently asked questions
How do I connect Hermes Agent to an email MCP server?
Add the server to ~/.hermes/config.yaml under mcp_servers with a url and, for OAuth servers, auth: oauth. Then run hermes mcp login <name> in a fresh terminal, approve the sign-in in your browser, and start a new session or type /reload-mcp.
Can Hermes Agent send email?
Yes, in several ways: through an email MCP tool, through the Himalaya skill over IMAP/SMTP, through the Google Workspace skill for Gmail, or as a reply in the email gateway. Whether mail goes out depends on the permissions at the mail service and on Hermes' own approvals. With Command Mail, every send needs the Pro plan; sending without per-message approval also needs the mail:send permission and a mailbox on the auto level.
How do I stop Hermes from sending email without asking?
Set trust: untrusted on the server. Hermes then asks before tool calls that lack readOnlyHint: true, unless you approved that tool for the session or always, or YOLO or approvals.mode: off is active. The firmer limit is not granting a send permission at the mail service and loading only read and draft tools with tools.include.
Does the OAuth sign-in work when Hermes runs on a server?
Yes. In an interactive terminal Hermes offers to paste the redirect URL next to the sign-in link. Open the link on your own computer, approve, and copy the address the browser lands on back into the terminal. Command Mail's OAuth metadata does not offer a device-code login.
Can I connect Hermes to an Outlook mailbox?
Not through the email gateway or Himalaya with a password or app password: Outlook.com has not accepted Basic Authentication since September 16, 2024, and Microsoft 365 has turned it off for IMAP and POP, among other protocols. What remains is OAuth2 in the Himalaya config with your own app registration, or an MCP server that signs in to Microsoft itself or receives the mail by forwarding, like Command Mail.
Do I need a Google Cloud project for Gmail in Hermes?
Only for the Google Workspace skill, which uses OAuth credentials from a project of your own. The Himalaya skill works with an app password, according to the Hermes docs. A hosted MCP server such as Command Mail needs neither; Gmail arrives there by forwarding.
Sources
- Hermes Agent: MCP (Model Context Protocol)
- Hermes Agent: MCP Config Reference
- Hermes Agent: OAuth over SSH / Remote Hosts
- Hermes Agent: Email Setup (gateway, IMAP/SMTP)
- Hermes Agent: Give Your Agent Its Own Email Address (Himalaya)
- Hermes Agent: Google Workspace Skill
- Command Mail: llms.txt with plans, permissions and connection routes
- NousResearch: Hermes Agent v0.23.0 release notes
- Hermes Agent: Email Inbox Triage skill
- Hermes Agent: Security (approvals, YOLO)
- Microsoft Learn: Deprecation of Basic authentication in Exchange Online
- Microsoft: Modern authentication now needed for Outlook.com in non-Microsoft email apps
- NousResearch: email gateway adapter (code, v0.23.0)
- NousResearch: Himalaya skill configuration reference (v0.23.0)
- Hermes Agent: optional AgentMail skill