Hermes Agent · YAML · mcp_servers

Image generation in Hermes Agent: MCP server setup

Hermes takes YAML: add the server under mcp_servers with url and headers, and its tools appear prefixed as mcp_imagemcp_<tool_name>. Hermes is a self-improving agent that keeps a curated catalogue of servers, all disabled by default. Adding one is a deliberate act, which suits a server that spends credits.

By the imagemcpserver.com teamPublished Hermes Agent docs checked September 2026

Add the server

Where the config lives
Hermes agent config (YAML) · mcp_servers key
The key it nests under
mcp_servers
  1. 1

    Create an API key. Create a key in the imagemcpserver dashboard.

  2. 2

    Open the Hermes config. Add an entry under the mcp_servers key in the agent configuration YAML.

  3. 3

    Set url and headers. Point url at the endpoint and pass the key as an x-api-key header, referencing an env var.

  4. 4

    Filter the tools. Use tools.include or tools.exclude to decide which of the eleven tools Hermes loads.

hermes agent · recommendeduse this
mcp_servers:
  imagemcp:
    url: "https://mcp.imagemcpserver.com/mcp"
    headers:
      x-api-key: "${IMAGEMCP_API_KEY}"
    enabled: true
    timeout: 120
    tools:
      resources: true
      prompts: true
Load only the tools you want
mcp_servers:
  imagemcp:
    url: "https://mcp.imagemcpserver.com/mcp"
    headers:
      x-api-key: "${IMAGEMCP_API_KEY}"
    tools:
      # Only these reach the model. The expensive ones
      # are not withheld pending approval — they are
      # never loaded at all.
      include:
        - remove_background
        - compress_image
        - convert_format
        - list_models

Tools arrive renamed, and can be filtered before they arrive

Hermes prefixes every tool with its server name — generate_image becomes mcp_imagemcp_generate_image — so a prompt that names tools explicitly needs updating. It also has a genuinely useful include/exclude filter that decides which tools are loaded at all, rather than merely approving them at call time. Excluding the expensive tools is a harder guarantee than an approval prompt.

The endpoint and the key are identical in every client. The wrapper around them is not, and that wrapper is where almost every “correct” config that does nothing goes wrong. Checked September 2026 against Hermes Agent’s own documentation — see the sources below.

Three ways to send the key

The server resolves your API key from any of these, checked in this order. That matters when a client only gives you a URL field and no way to set a header — you are not stuck, and you do not need a bridge process.

Query parameter

?apikey=sk-img-gen-…

Checked first. The fallback for a client whose config is a bare URL field.

x-api-key header

x-api-key: sk-img-gen-…

The documented default, and what every client below uses unless noted.

Authorization header

Authorization: Bearer sk-img-gen-…

Accepted as a bearer token, which is what a client with only a token field will send.

A key in a query string ends up in shell history, process listings and any log the client keeps, so prefer a header where the client allows one. Where it does not, treat the whole URL as the secret and rotate it as freely as you would a password.

What each tool costs

Wherever Hermes Agent lets you approve tools individually, the useful line to draw is not between image tools and other tools — it is between calls with a fixed price and calls that route to a model.

get_user_infolist_models

free

Safe to auto-approve wherever the client supports it. These are how the agent finds out what it can afford before it spends anything.

compress_imageconvert_format

1 credit

Deterministic and cheap. Auto-approving these makes an optimisation pass over a whole folder painless.

remove_backgroundtext_to_svgupscale_image

5–15 credits

Fixed prices, no model routing. Auto-approve once you trust the workflow.

generate_imageedit_imagegenerate_transparent_imagemulticall

model-priced

These route to an image model and are the ones that can run up a bill in a loop. Keep approval on.

Hermes Agent questions

Does Hermes Agent support MCP servers?

Yes — it ships a native MCP client with both stdio and HTTP transports, and reloads automatically when the mcp_servers config changes. Servers in its curated catalogue are disabled by default, so anything you want has to be switched on deliberately. Checked September 2026.

What are the image tools called in Hermes?

Hermes namespaces them as mcp_<server>_<tool_name>. With the server named imagemcp, generate_image becomes mcp_imagemcp_generate_image. Worth knowing if your prompts name tools directly.

How do I stop it loading the expensive tools?

Use the tools.include or tools.exclude filter. Unlike an approval prompt, this decides what is loaded in the first place — an excluded tool cannot be called at all.

Does Hermes handle OAuth?

It supports the MCP OAuth 2.1 PKCE flow and persists tokens under ~/.hermes/mcp-tokens/. This server authenticates by header instead, so that path is not used here.

Is Nous Research the same thing as Hermes Agent?

Nous Research is the lab; Hermes Agent is the agent they ship, and it is the MCP client. The configuration on this page is the agent’s.