---
title: "Connect Clam to Hermes"
description: "One terminal command adds your Shell to Hermes. Sign in to Clam, click Allow, and Hermes uses your Gmail only as far as your rules allow."
route: /docs/agents/hermes
---

# Connect Clam to Hermes

One terminal command adds your Shell to Hermes. Sign in to Clam, click Allow, and Hermes can use your Gmail only as far as the Shell's rules allow. No Shell yet? Start with the [Quickstart](https://useclam.ai/docs/get-started/quickstart).

Hermes talks to Clam over MCP, the standard way an AI agent plugs in an outside tool. Each Shell is its own MCP server, so a second Shell installs beside the first.

## Connect Hermes

Two ways in. Start with the first; the other is for when it doesn't fit.

### Terminal sign-in (Recommended)

The simplest path: one command, and Hermes opens your browser to sign in. Pick this unless your machine has no browser.

1. Paste this in your terminal

   On the Shell's **Install** tab, pick Hermes and copy the command under **Sign in from the terminal**. It has your server name and address filled in. Then press Enter.

   ```bash
   hermes mcp add <server name> --url <your Shell's address> --auth oauth
   ```

2. Sign in to Clam and Allow

   Your browser opens on Clam, asking to connect your Shell to Hermes. Its window is titled "Let Hermes use a Shell". Sign in if you need to, then click **Allow**.

3. Press Enter to turn on Clam's tools

   Back in the terminal, Hermes lists Clam's tools and asks to enable them all. Press Enter. In a Hermes chat that's already open, run `/reload-mcp` too.

Then click **Check connection** on the Install tab.

### config.yaml file

For a machine with no browser, like a server you reach over SSH. The key works only for Hermes.

1. Add this block to ~/.hermes/config.yaml

   Under `mcp_servers`. Create it if it isn't there. The Install tab shows the block with your key filled in.

   ```yaml
   mcp_servers:
     <server name>:
       url: "<your Shell's address>"
       headers:
         Authorization: "Bearer <your key>"
   ```

2. Run /reload-mcp in Hermes

   Run `/reload-mcp`. No restart needed. Clam's tools appear right away.

Then click **Check connection** on the Install tab.

## Try it

With the starter policy from the Quickstart, ask Hermes:

Ask "Summarize the work email I got this week." Hermes answers from your work email. Ask "Find my latest bank statement." Clam blocks it, and Hermes relays the refusal to you. That refusal is Clam working as intended.

See [What your agent can do](https://useclam.ai/docs/trust/what-your-agent-can-do).

## Remove access

Run `hermes mcp remove <server name>`, or delete Clam's entry from `~/.hermes/config.yaml` and run `/reload-mcp`. That only tidies Hermes. Clam's removal is the one that counts: on the Install tab, under Connected agents, click **Remove access** for Hermes. A sign-in stops at its next request; a key at once. Other agents keep working.

Pausing or deleting the Shell, and stopping Clam's own Gmail access, are in [Remove access](https://useclam.ai/docs/trust/remove-access).

## If it doesn't work

More in [Common issues & solutions](https://useclam.ai/docs/troubleshooting).

### Hermes says Clam doesn't support automatic client registration

That comes from the **Authenticate** button in the Hermes app, which signs in a way Clam doesn't offer. Sign in from the terminal instead: run `hermes mcp login <server name>`, then click **Allow** in the browser.

### Clam's tools don't show up after editing config.yaml

Check the block sits under `mcp_servers`, then run `/reload-mcp`.

### Hermes says it's unauthorized

The key is wrong or was removed in Clam. Regenerate it on the Install tab, paste it into `config.yaml`, and run `/reload-mcp`.
