MCP server
Connect AI editors, terminals and coding assistants to your Hermesmail team through the Model Context Protocol (MCP). The hosted MCP server listens over Streamable HTTP at
https://api.hermesmail.app/mcp
and authenticates every request with a team API key.
Every tool call executes through the Hermesmail REST API pipeline, so team rate limits, daily and monthly quotas, suppression checks, verified-domain rules and request logs apply identically whether traffic arrives from an SDK, HTTP client or AI assistant. You can also follow the guided setup inside your dashboard under Settings › Integrations after you sign in.
Copy the configuration block for your client and replace
hm_YOUR_API_KEY
with an API key from your team. When you use the dashboard setup page, you can mint a fresh key inline and copy the ready-to-paste snippet once without storing the secret in the browser.
Run this command in your terminal to register Hermesmail over Streamable HTTP with Bearer key auth.
Configuration target: CLI command (.mcp.json or ~/.claude.json)
claude mcp add --transport http hermesmail 'https://api.hermesmail.app/mcp' --header 'Authorization: Bearer hm_YOUR_API_KEY'
Add this server entry to claude_desktop_config.json and restart Claude Desktop to load Hermesmail tools.
Configuration target: claude_desktop_config.json
{
"mcpServers": {
"hermesmail": {
"url": "https://api.hermesmail.app/mcp",
"headers": {
"Authorization": "Bearer hm_YOUR_API_KEY"
}
}
}
}
Save in .cursor/mcp.json for one project or ~/.cursor/mcp.json for all projects, then reload MCP servers.
Configuration target: .cursor/mcp.json
{
"mcpServers": {
"hermesmail": {
"url": "https://api.hermesmail.app/mcp",
"headers": {
"Authorization": "Bearer hm_YOUR_API_KEY"
}
}
}
}
Add to .vscode/mcp.json inside your workspace (using the top-level servers object and type "http").
Configuration target: .vscode/mcp.json
{
"servers": {
"hermesmail": {
"type": "http",
"url": "https://api.hermesmail.app/mcp",
"headers": {
"Authorization": "Bearer hm_YOUR_API_KEY"
}
}
}
}
Append this table to ~/.codex/config.toml (or a project .codex/config.toml) to connect Codex over HTTP.
Configuration target: ~/.codex/config.toml
[mcp_servers.hermesmail]
url = "https://api.hermesmail.app/mcp"
[mcp_servers.hermesmail.http_headers]
Authorization = "Bearer hm_YOUR_API_KEY"
Add under mcpServers in ~/.gemini/settings.json using httpUrl so Gemini CLI uses Streamable HTTP.
Configuration target: ~/.gemini/settings.json
{
"mcpServers": {
"hermesmail": {
"httpUrl": "https://api.hermesmail.app/mcp",
"headers": {
"Authorization": "Bearer hm_YOUR_API_KEY"
}
}
}
}
The hosted endpoint is stateless: each HTTP POST request carries its own Authorization: Bearer hm_... header rather than relying on server-side session affinity.
- Missing or revoked keys: requests without a valid active key fail with HTTP
401and aWWW-Authenticate: Bearerheader before any tool processing runs. Revoking or deactivating a key in the dashboard blocks MCP access on the very next call, and suspended teams receive the same refusal as the REST API. - Full access (
full_access): lists and invokes every tool supported by your team across emails, domains, API keys, webhooks, suppressions, logs and usage. - Sending access (
sending_access):tools/listexposes onlysend-emailandsend-batch-emailsand rejects calls to any other tool withrestricted_api_key. When a sending key is locked to a single domain, the API enforces that domain restriction onfrom. - Shared limits and quotas: tool calls draw from the same team rate-limit window and sending quotas as REST API traffic (see Limits and Errors). Protocol calls such as
initializeandtools/listdo not spend API quota, though floods are bounded separately. - Remote attachments only: over hosted HTTP, pass attachments as base64
contentor an HTTPSpathURL fetched through the API's SSRF-guarded client. LocalfilePathvalues are rejected on the hosted server because the server never reads files from its own disk.
Actions that cancel a scheduled message, revoke a key, delete a webhook endpoint or lift a suppression cannot be reversed silently. Every destructive tool —
cancel-email, remove-api-key, remove-webhook and remove-suppression
— advertises destructiveHint: true and accepts a boolean confirm argument.
- Preview first (default): omitting
confirmor settingconfirm: falseperforms no API call, creates no request log entry and returns a non-error dry-run summary showing the exact HTTP method and path that would execute. - Explicit execution: passing boolean
confirm: truedispatches the request. Non-boolean values such as the string"true"fail schema validation so accidental coercion cannot trigger deletion. - Read-only annotations: every list and get tool carries
readOnlyHint: true, helping clients distinguish safe inspection calls from state changes.
Tool input schemas are generated directly from the Hermesmail API contracts, using the same snake_case field names (reply_to, scheduled_at, idempotency_key) while also accepting common camelCase aliases on send and reschedule calls.
| Tool | Key permission | Safety | Description |
|---|---|---|---|
send-email |
Sending or full access | Write | Queue a single transactional email for delivery from a verified sender domain or the sandbox sender. |
send-batch-emails |
Sending or full access | Write | Queue up to 100 transactional messages in one request, returning message identifiers in input order. |
list-emails |
Full access | Read-only | Return a paginated list of messages sent by the team, newest first, without message bodies. |
get-email |
Full access | Read-only | Fetch full details for one team email by identifier, including HTML and plain-text bodies when stored. |
update-email |
Full access | Write | Reschedule a pending scheduled email to a new send time before delivery begins. |
cancel-email |
Full access | Requires confirm: true |
Cancel a scheduled email before dispatch. Pass confirm: true to execute; omit it to preview. |
list-domains |
Full access | Read-only | Return a paginated list of active sending domains registered on the team, newest first. |
get-domain |
Full access | Read-only | Fetch one active team domain by identifier along with its DNS verification records and statuses. |
create-domain |
Full access | Write | Register a new sending domain for the team and return the DNS records required for verification. |
verify-domain |
Full access | Write | Start or re-run DNS verification checks for an existing team sending domain. |
list-api-keys |
Full access | Read-only | Return metadata for active team API keys without exposing secret key values. |
create-api-key |
Full access | Write | Mint a new team API key with full or sending access. The secret token is returned once only. |
remove-api-key |
Full access | Requires confirm: true |
Permanently revoke a team API key immediately. Pass confirm: true to execute; omit it to preview. |
list-webhooks |
Full access | Read-only | Return a paginated list of active webhook endpoints configured for the team without signing secrets. |
get-webhook |
Full access | Read-only | Fetch one team webhook endpoint by identifier, including subscribed events and its current signing secret. |
create-webhook |
Full access | Write | Register an HTTPS webhook endpoint for selected event types and return its initial signing secret. |
update-webhook |
Full access | Write | Modify a team webhook endpoint URL, subscribed event list, or enabled state. |
remove-webhook |
Full access | Requires confirm: true |
Delete a team webhook endpoint and clear its signing secrets. Pass confirm: true to execute; omit it to preview. |
list-suppressions |
Full access | Read-only | Return a paginated list of suppressed recipient addresses on the team, optionally filtered by origin. |
get-suppression |
Full access | Read-only | Look up a single team suppression entry by entry identifier or recipient email address. |
add-suppression |
Full access | Write | Add a recipient email address to the team manual suppression list to block future sends. |
remove-suppression |
Full access | Requires confirm: true |
Remove an address from the team suppression list so future sends can reach it again. Pass confirm: true to execute; omit it to preview. |
list-logs |
Full access | Read-only | Return a paginated list of recent API request logs recorded for the team, newest first. |
get-log |
Full access | Read-only | Fetch one recorded team API request log by identifier, including redacted request and response payloads. |
get-usage |
Full access | Read-only | Fetch current team message usage, resource counts, effective plan limits, and API rate limit. |
check-domain |
Full access | Write | Look up one domain, or the domain of one email address, in Hermesmail's records of disposable and risky mail domains. Send domain or email, not both. The answer is allow, block or unknown, with a reason when there is one. Only the domain is used: anything before the @ is dropped before the check is made and is never stored, logged or passed on. An unknown verdict means no answer is available right now; it is not a finding against the domain, so never refuse an address because of it. Each allow or block answer counts against the team's monthly domain-check allowance. |
When your workflow requires a local process over standard input and output — or needs to attach local files from an explicit directory allow-list — run the local hermesmail-mcp stdio server instead of the hosted HTTP endpoint.
The local CLI exposes the same contract-derived tool registry and sends HTTPS requests to
https://api.hermesmail.app
by default (overridable with HERMESMAIL_BASE_URL), authenticated with HERMESMAIL_API_KEY:
--sender: optional defaultfromaddress used whensend-emailomitsfrom.--reply-to: optional default reply-to address applied to outbound sends.--allowed-file-dirs: comma-separated allow-list of local directories from whichfilePathattachments may be read. Leave it unset to disable local file reads altogether; paths escaping outside the allow-list via parent segments or symlinks are refused.
export HERMESMAIL_API_KEY="hm_YOUR_API_KEY"
npx -y hermesmail-mcp \
--sender "[email protected]" \
--allowed-file-dirs "./attachments"
After restarting or reloading your AI client, paste a short test prompt that uses the shared sandbox sender [email protected] and the built-in test recipient [email protected] so no real external mailbox is contacted:
Send a test email using Hermesmail MCP from [email protected] to [email protected] with subject "MCP connection check" and text "Hello from my MCP client." Then report the returned email id.
Once the tool returns an email identifier, open Emails and Logs in the dashboard to confirm the message record and its MCP request log entry.