> ## Documentation Index
> Fetch the complete documentation index at: https://docs.danubeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hermes Agent

> Connect Hermes Agent by Nous Research to the Danube MCP Server

[Hermes Agent](https://hermes-agent.nousresearch.com/) is Nous Research's open-source, self-improving agent. It runs in the terminal, on messaging platforms and as a desktop app, and it connects to remote MCP servers such as Danube from one config file.

## Prerequisites

Install Hermes Agent (Linux, macOS, WSL2, Termux):

```bash theme={null}
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
```

Windows (PowerShell):

```powershell theme={null}
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
```

Verify the installation:

```bash theme={null}
hermes --version
```

## Setup

<Steps>
  <Step title="Add the Danube MCP Server">
    `hermes mcp add` registers a remote server, prompts for its credential and probes it for tools:

    ```bash theme={null}
    hermes mcp add danube --url https://mcp.danubeai.com/mcp
    ```

    Answer **yes** when asked whether the server requires authentication, then paste your Danube API key at the `API key / Bearer token` prompt. Hermes writes the key to `~/.hermes/.env` as `MCP_DANUBE_API_KEY` and sends it as `Authorization: Bearer`, which Danube accepts in place of the `danube-api-key` header.

    Hermes then connects, lists Danube's tools and asks which to enable. Choose **Enable all** unless you want a smaller surface (see [Fewer tools per session](#fewer-tools-per-session)).
  </Step>

  <Step title="Verify Connection">
    ```bash theme={null}
    hermes mcp test danube
    ```

    The test connects and prints the tools it found. `hermes mcp list` shows every configured server and whether it is enabled.
  </Step>

  <Step title="Use it">
    Start a session and ask for something Danube can do:

    ```bash theme={null}
    hermes chat
    ```

    ```text theme={null}
    Search Danube for a tool that sends email, then send a test message to me.
    ```

    Hermes registers MCP tools with a server prefix, so Danube's appear as `mcp__danube__search_tools`, `mcp__danube__execute_tool` and so on. You never need to type those names; Hermes picks them during normal reasoning.
  </Step>
</Steps>

***

## Edit the config directly

Hermes reads MCP servers from `~/.hermes/config.yaml` (`%LOCALAPPDATA%\hermes\config.yaml` on Windows) under `mcp_servers`. This block is equivalent to the CLI setup above, using Danube's own header instead of a bearer token:

```yaml theme={null}
mcp_servers:
  danube:
    url: "https://mcp.danubeai.com/mcp"
    headers:
      danube-api-key: "YOUR_API_KEY"
```

To keep the key out of the config file, reference an environment variable instead. Hermes resolves `${VAR}` in `headers` at connect time from `~/.hermes/.env` (falling back to the process environment):

```yaml theme={null}
mcp_servers:
  danube:
    url: "https://mcp.danubeai.com/mcp"
    headers:
      danube-api-key: "${DANUBE_API_KEY}"
```

```bash theme={null}
# ~/.hermes/.env
DANUBE_API_KEY=YOUR_API_KEY
```

If a Hermes session is already running, type `/reload-mcp` to reconnect with the new config. Otherwise the next `hermes chat` picks it up.

***

## OAuth instead of a pasted key

Danube's MCP server also supports the MCP OAuth 2.1 flow with PKCE and dynamic client registration, which Hermes handles automatically:

```yaml theme={null}
mcp_servers:
  danube:
    url: "https://mcp.danubeai.com/mcp"
    auth: oauth
```

On first connect Hermes opens your browser to Danube's authorization page, where you enter your API key once. Tokens are cached at `~/.hermes/mcp-tokens/danube.json` and refreshed automatically. On a headless host, run `hermes mcp login danube` and follow the printed URL, or paste the redirect URL back at the prompt.

***

## Coming from Claude Code?

`hermes import-agent claude-code` migrates the `mcpServers` block from `~/.claude.json` (along with skills and instructions) into `mcp_servers` in Hermes' config. If Danube is already connected in Claude Code, the import carries it over; credentials are never imported, so re-add the key as shown above.

***

## Fewer tools per session

Danube exposes 31 MCP tools and Hermes registers every enabled one at session start, which costs context. Two ways to trim the list:

* Ask Danube for a tool group on the connection URL. `?tools=core` keeps search, execute, describe, fetch\_result, store\_credential, report\_tool and set\_parameter\_defaults; a comma list such as `?tools=core,workflows` adds a group (`skills`, `workflows`, `wallet`, `feedback`):

  ```yaml theme={null}
  mcp_servers:
    danube:
      url: "https://mcp.danubeai.com/mcp?tools=core"
      headers:
        danube-api-key: "${DANUBE_API_KEY}"
  ```

* Or filter on the Hermes side with `tools.include` / `tools.exclude`. `hermes mcp configure danube` reopens the interactive checklist you saw at install time.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Command not found: hermes">
    The installer links `hermes` into `~/.local/bin` (`/usr/local/bin` when run as root). Open a new shell, or add it to your `PATH`:

    ```bash theme={null}
    export PATH="$HOME/.local/bin:$PATH"
    ```
  </Accordion>

  <Accordion title="401 Unauthorized">
    * Verify your API key is correct
    * For the header form, ensure the header name is exactly `danube-api-key` (lowercase)
    * For the `hermes mcp add` form, check `MCP_DANUBE_API_KEY` in `~/.hermes/.env` holds the bare key (Hermes strips a leading `Bearer ` on save, but a wrapped or truncated paste still fails)
    * Generate a new API key from [danubeai.com/dashboard/api-keys](https://danubeai.com/dashboard/api-keys)
  </Accordion>

  <Accordion title="Connection timeout">
    * Check your internet connection
    * Verify the URL is correct: `https://mcp.danubeai.com/mcp`
    * Test the health check: `curl https://mcp.danubeai.com/health`
    * Raise `connect_timeout` (default 60 s) on the server entry in `config.yaml`
  </Accordion>

  <Accordion title="Tools not appearing">
    * Run `hermes mcp test danube` to confirm the server connects and lists tools
    * Run `hermes mcp list` and check the server is not `enabled: false` (a failed `hermes mcp add` offers to save the entry disabled)
    * Type `/reload-mcp` in a running session after editing `config.yaml`
    * If you filtered tools, check `tools.include` in `config.yaml` or re-run `hermes mcp configure danube`
  </Accordion>

  <Accordion title="Saved with a Bearer header but I want the danube-api-key header">
    Both work. `hermes mcp add` always writes `Authorization: Bearer ${MCP_DANUBE_API_KEY}`; replace the `headers` block in `config.yaml` with `danube-api-key: "${MCP_DANUBE_API_KEY}"` if you prefer Danube's native header. The key in `~/.hermes/.env` stays the same.
  </Accordion>
</AccordionGroup>
