> For the complete documentation index, see [llms.txt](https://docs.cloud.olakrutrim.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloud.olakrutrim.com/mcp/connect-hermes.md).

# Connect Hermes

Connect Hermes Agent to Krutrim Cloud using Hosted MCP or local stdio and an API key.

Connect Hermes Agent to Krutrim Cloud with your API key. Use Hosted MCP without installing a local MCP server, or choose local stdio below.

## Hosted MCP

Install Hermes Agent and create a Krutrim Cloud API key. See [Hosted MCP](/mcp/hosted-mcp.md) for API-key setup.

{% stepper %}
{% step %}

### Add the hosted server

Open `~/.hermes/config.yaml` and merge the `mcp_servers` configuration below with your existing settings. Preserve other server entries. The JSON-formatted example is also valid YAML.

```json
{
  "mcp_servers": {
    "krutrim-cloud": {
      "url": "https://mcp.olakrutrim.com/mcp",
      "headers": {
        "Authorization": "Bearer <krutrim-api-key>"
      },
      "transport": "http"
    }
  }
}
```

Replace `<krutrim-api-key>` with your API key and keep the `Bearer` prefix. Save it only in your private configuration, never in shared files or source control.

Use either the hosted or local configuration for `krutrim-cloud`, not both.
{% endstep %}

{% step %}

### Start Hermes and load tools

```bash
hermes chat
```

Hermes discovers MCP tools at startup. In an existing session, `/reload-mcp` reloads the configuration and tools. Restart Hermes after changing the API key.
{% endstep %}

{% step %}

### Try a read-only request

Ask Hermes:

```
List my VPCs in In-Bangalore-1.
```

Review the proposed tool call and region. This request does not change your resources.
{% endstep %}
{% endstepper %}

## Local MCP (stdio)

### Before you begin

* Install Hermes Agent. Its standard installation includes MCP support.
* Complete the package installation and API-key setup in [Local MCP (stdio)](/mcp/local-mcp-stdio.md) before using the local configuration below.
* Make sure `uvx` is available to Hermes and keep your raw Krutrim Cloud API key private.

{% stepper %}
{% step %}

### Open the Hermes configuration

Open `~/.hermes/config.yaml`. Preserve your existing settings and merge the server below into the top-level `mcp_servers` mapping.
{% endstep %}

{% step %}

### Add the local MCP server

```yaml
mcp_servers:
  krutrim-cloud:
    command: "uvx"
    args: ["krutrim-mcp-server"]
    env:
      KRUTRIM_API_KEY: "YOUR_KRUTRIM_API_KEY"
```

Replace the placeholder only in your private local file. Use the raw key without a `Bearer` prefix or surrounding spaces. Hermes passes these explicit `env` values to the subprocess; do not rely on a secret merely being present in your shell.

> This is a local stdio connection. Do not add a remote URL or OAuth configuration. Keep the secret-bearing YAML file out of source control and shared logs.
> {% endstep %}

{% step %}

### Start Hermes and load tools

```bash
hermes chat
```

Hermes discovers MCP tools at startup. In an existing session, `/reload-mcp` reloads the configuration and tools. Restart Hermes after changing the API key.
{% endstep %}

{% step %}

### Verify with a read-only request

Ask Hermes to use Krutrim Cloud:

```
List my VPCs in In-Bangalore-1.
```

Review the proposed read-only tool call and region. Hermes prefixes MCP tools with the server name; hyphens are normalized to underscores. The VPC tool appears as `mcp_krutrim_cloud_list_vpcs`.
{% endstep %}
{% endstepper %}

## Next steps

Before changing Cloud resources, follow the safety guidance in the [MCP Overview](/mcp/overview.md). Start with a read-only request and review the exact region and resource identifiers.

Need help? Open [Troubleshooting](/mcp/troubleshooting.md) for startup, API-key, and tool-discovery checks.

## Official references

[Hermes Agent: MCP integration](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp)

[Hermes MCP configuration reference](https://hermes-agent.nousresearch.com/docs/reference/mcp-config-reference)
