# Hermes
Source: https://docs.treeship.dev/integrations/hermes

> Integrate Treeship with Hermes agents via skill file and MCP server.

Hermes agents support two integration methods: a skill file for session discipline and the Treeship MCP server for MCP-routed tool-call receipts. The best setup uses both.

<Callout type="warn">
  Hermes does not currently have a Treeship-native in-process hook. Coverage is skill-driven plus MCP-routed, so use `treeship wrap` for important shell commands and session reports as a backstop.
</Callout>

## Method 1: Skill file

<Steps>
  <Step>
    ### Install Treeship CLI

    ```bash
    curl -fsSL https://treeship.dev/install | sh
    treeship init
    ```
  </Step>

  <Step>
    ### Install the Treeship skill

    ```bash
    mkdir -p ~/.hermes/skills/treeship
    curl -fsSL https://raw.githubusercontent.com/zerkerlabs/treeship/main/integrations/hermes/treeship.skill/SKILL.md \
      -o ~/.hermes/skills/treeship/SKILL.md
    ```

    The Hermes agent reads the skill and follows the instructions to start/close sessions, wrap side-effectful shell commands, record approvals and handoffs, and avoid publishing secrets.
  </Step>
</Steps>

## Method 2: MCP server

Add Treeship as an MCP server in Hermes:

```bash
hermes mcp add treeship --command npx \
  --env TREESHIP_ACTOR=agent://hermes TREESHIP_HUB_ENDPOINT=https://api.treeship.dev \
  --args -y @treeship/mcp
```

Then make sure the configured server has the Hermes actor in its environment:

```yaml
# ~/.hermes/config.yaml
mcp_servers:
  treeship:
    command: npx
    args: ["-y", "@treeship/mcp"]
    env:
      TREESHIP_ACTOR: "agent://hermes"
      TREESHIP_HUB_ENDPOINT: "https://api.treeship.dev"
```

`TREESHIP_ACTOR=agent://hermes` is required. Without it, receipts may fall back to a generic MCP identity.

## Recommended setup

```bash
treeship agent register --name hermes --own-key --tools mcp,terminal,file,git --description "Hermes Agent"
treeship session start --name "hermes: first verified session"
```

## What appears in the receipt

| Section         | Skill file                                              | MCP server                                        |
| --------------- | ------------------------------------------------------- | ------------------------------------------------- |
| Commands        | Via `treeship wrap` `[EXPLICIT]`                        | Not applicable                                    |
| Tool calls      | Not applicable                                          | MCP-routed tool calls `[AUTO]`                    |
| Agent identity  | `agent://hermes` in events `[EXPLICIT]`                 | `TREESHIP_ACTOR=agent://hermes` `[AUTO]`          |
| File operations | Session report / git reconcile backstop `[AUTO]`        | Routed file-tool metadata when available `[AUTO]` |
| Approvals       | `treeship approve` + approval nonce `[EXPLICIT]`        | Not applicable                                    |
| Handoffs        | `treeship attest handoff` or session event `[EXPLICIT]` | Not applicable                                    |

<Callout type="info">
  **Expected outcome**: a Hermes session can produce a local-verifiable Treeship receipt and optional Hub report. MCP-routed tool calls can verify as Hermes-owned when the bridge signs with a registered `agent://hermes` key.
</Callout>