Hermes Agent can consume a remote MCP server from ~/.hermes/config.yaml. TokConnect provides an HTTP MCP endpoint and requires a bearer key. Copy the key from TokConnect before editing the Hermes configuration.
Add TokConnect to the Hermes configuration
Place this entry under the top-level mcp_servers mapping. Hermes documents url and headers for a remote HTTP MCP server.
mcp_servers:
tokconnect:
url: "https://mcp.tokconnect.com/mcp"
headers:
Authorization: "Bearer ${TOKCONNECT_TOKEN}"
enabled: true
Set TOKCONNECT_TOKEN in the environment Hermes reads for its profile or gateway. Keep the value out of a repository and configuration backup. Hermes documents the header configuration but does not provide an OS-specific gateway-startup secret recipe in the MCP reference, so this guide does not invent one.
Decide how Hermes owns the entry
| Method | Where the definition ends up | Best use |
|---|---|---|
| Manual YAML | ~/.hermes/config.yaml | A reviewed deployment configuration, especially when a gateway or profile supplies secrets. |
hermes mcp add | Hermes-managed configuration | An interactive setup where you can inspect what Hermes writes before relying on it. |
Choose one method for the first attempt. Running the CLI add command after hand-writing YAML can create two definitions or leave you unsure which one Hermes loaded. Keep the server name tokconnect stable, because that name becomes part of Hermes's displayed tool prefix and makes later diagnostics easier to read.
Use the Hermes CLI when it fits
Hermes exposes a discovery-first command for remote servers. Its public CLI source documents --url and --auth header for hermes mcp add.
hermes mcp add tokconnect \
--url https://mcp.tokconnect.com/mcp \
--auth header
Run this only if you want Hermes to manage the entry interactively. Review the generated header and environment-variable name before you accept it. A manual YAML entry gives your deployment the clearest control over where the secret lives.
Start Hermes from the environment that supplies the token, then open a new session or use the reload command below. For a long-running gateway, set the secret in the service environment before the process starts and follow your normal restart process after rotation. A key exported in a separate shell does not retroactively enter a running service.
Reload and inspect tools
In an existing Hermes chat, run /reload-mcp after you edit config.yaml. Hermes documents that a session's tool set stays fixed until reload, a new session, or context compaction. A running gateway watches configuration changes and reconnects added servers on its own schedule.
Hermes registers native MCP tools with a server prefix. A server named tokconnect can expose mcp_tokconnect_keyword_research, mcp_tokconnect_search_videos, and similar names. The include and exclude policy uses original MCP tool names, such as keyword_research, not the prefixed runtime name.
Call mcp_tokconnect_search_users with keyword “walking pad” and count 3. Return uniqueId, nickname, followerCount, verified, hasMore, and nextCursor.
The editorial MCP environment returned three profiles and nextCursor: 3. It included walkingpad.official with followerCount 7667 and verified true. See the protocol fixture. Hermes did not run this call.
Use the returned fields to build a shortlist, not to assume a creator is suitable. A verified flag describes the returned account status and follower count is a point-in-time value. Open the creator-shortlist workflow after the three records return, and record why each candidate fits the research question before requesting more pages with the supplied cursor.
Start without a tool filter
Leave tools.include and tools.exclude out of the first connection. After Hermes lists the tools, add an allowlist if the agent only needs topic research. The filter entry uses the server-native name keyword_research, even though Hermes presents the runtime tool as mcp_tokconnect_keyword_research.
Check the failing stage
| Symptom | Likely stage | Action |
|---|---|---|
| Tools stay absent after an edit | Session still has the old registry. | Run /reload-mcp or start a new Hermes session. |
| HTTP 401 | Credential delivery. | Check TOKCONNECT_TOKEN, the header value, and the process that launches Hermes. |
| Tools missing after a connection | Tool policy. | Inspect tools.include and tools.exclude before changing the endpoint. |
| A query has no topics | Research response. | Try a simpler keyword or a language filter. An empty result differs from a failed connection. |
Remove a stale Hermes server
For the YAML configuration shown here, remove the complete tokconnect mapping under mcp_servers, keep the YAML indentation valid, then run /reload-mcp or start a new session. After reload, inspect the tool list for the absence of mcp_tokconnect_ tools. This page does not prescribe a removal command for an entry created by another Hermes management path; use the configuration owner that created it rather than deleting unrelated settings.
If a tool exists but an agent does not select it, include the exact prefixed name in the task and keep the request small. If it selects the tool and returns no profiles, keep the response as research evidence and adjust the keyword. Connection failures appear before that stage as absent tools, reload issues, or HTTP errors.
Read the Hermes MCP guide for reload behavior and server management. Use TokConnect troubleshooting for credential and empty-result checks, then move returned profiles into the creator-shortlist workflow.
