# Use Molted with Hermes Agent

Source: https://molted.email/docs/hermes-agent

Connect Hermes Agent (Nous Research, open source) to Molted's hosted MCP server so the agent gets its own mailbox instead of the owner's.

[Hermes Agent](https://hermes-agent.nousresearch.com) is Nous Research's open source agent that runs across the terminal, desktop and messaging apps. It connects to Molted's hosted [Model Context Protocol](https://modelcontextprotocol.io) server the same way any other MCP client does: an HTTP endpoint plus a bearer token. Once connected, the agent gets its own mailbox to read and send from, separate from your own inbox.

## Config

Add the server to `~/.hermes/config.yaml`:

```yaml title="~/.hermes/config.yaml"
mcp_servers:
  molted:
    url: "https://mcp.molted.email/mcp"
    headers:
      Authorization: "Bearer ${MOLTED_API_KEY}"
    tools:
      include: [read_inbox, get_thread, list_mailboxes, check_budget, dry_run, draft_email]
```

Hermes substitutes `${MOLTED_API_KEY}` from your environment or from `~/.hermes/.env` at connect time. Put the key there, not in `config.yaml`:

```bash title="~/.hermes/.env"
MOLTED_API_KEY=mm_live_...
```

Get a key from **Settings > Access** in the portal (`/app/settings#access`). See [Authentication](https://molted.email/docs/authentication.md) for scoping a key to one mailbox instead of the whole tenant.

After saving the config, start a new Hermes session or run `/reload-mcp` to load the tools.

## Safe defaults

Sending is opt-in. The `tools.include` list above only reads: it can list threads, read a thread, check budget, and simulate or draft a send, but it cannot dispatch mail. To let the agent send, add `send_email` and/or `reply` to `include`.

The stronger guardrail is the key itself. A mailbox-scoped key created with `read` permission only makes sending impossible on the server side, regardless of what tools the config exposes:

```bash
molted auth keys create --label hermes --mailbox mbx_... --permissions read
```

One exception: `dry_run` simulates a send and needs `send` permission on the mailbox, the same as a real send does. With a read-only key, drop `dry_run` from `include` too.

Inbound mail is screened for prompt injection before Hermes reads it. See [Safety Settings](https://molted.email/docs/safety-settings.md) for how quarantine and the injection-risk signal work.

## Not in the Hermes catalog yet

Hermes' built-in MCP catalog lists OAuth-based servers; Molted's MCP authenticates with an API key today, so it isn't in the catalog and needs the manual config above instead.

## Email gateway

Hermes' own email gateway (IMAP/SMTP) can't point at a Molted mailbox today. Molted works with Hermes as MCP tools the agent calls, not as a mail account the gateway connects to.

## Verify

Ask the agent: "read my Molted inbox". If `read_inbox` returns your threads, the connection works.
