hermes-utcp-bridge
A Hermes Agent plugin that lets the agent use tools
described by UTCP (Universal Tool Calling Protocol) manuals. A UTCP manual
lists tools and how to call each one directly over its own API, without a wrapper server in
between.
Native UTCP support was declined for Hermes core and suggested as a standalone plugin built on
ctx.register_tool (#151647,
#151174). This is that plugin.
Tools
| Tool | What it does |
|---|---|
utcp_search_tools | Searches the tools of every configured manual by words in their names, descriptions and tags. Returns each tool's full name (manual.tool), description, tags, protocol and input schema. |
utcp_call_tool | Calls one tool by its full name with arguments matching its input schema, and returns the result as JSON (capped at 50,000 characters). A streaming tool returns the events it sent; see Streaming tools. |
Both tools are offered to the model only while at least one manual is configured.
Install
hermes plugins install utcp-bridge --enable
The plugin depends on utcp and utcp-http (declared in pyproject.toml); Hermes asks before
installing them.
Configure
Add manuals under the plugin's settings in config.yaml:
plugins:
entries:
utcp-bridge:
settings:
timeout_seconds: 30 # optional; a search or call, manual discovery included
max_stream_events: 100 # optional; 1-1000, see Streaming tools
manuals:
- name: weather # letters, digits and _; tools appear as weather.<tool>
url: https://api.example.com/utcp # the endpoint serving the UTCP manual
http_method: GET # optional, default GET
headers: {} # optional; values may use a listed secret as $NAME
secrets: [WEATHER_API_KEY] # optional; Hermes secrets this manual may use
allowed_protocols: [http] # optional, default [http]; add sse / streamable_http
A manual or its tools reference credentials as $NAME or ${NAME}. Put the secret in your
profile's .env (or set it however you set other Hermes secrets) and list its name under that
manual's secrets. The plugin reads each listed name through Hermes's profile-scoped secret
lookup and hands it only to that manual.
Streaming tools
A manual is always fetched over plain HTTP, but its tools may use UTCP's streaming call templates:
sse (Server-Sent Events) and streamable_http (a chunked or NDJSON response). They are off by
default. List them under a manual's allowed_protocols to use that manual's streaming tools:
- name: alerts
url: https://alerts.example.com/utcp
allowed_protocols: [http, sse]
A tool whose protocol is not listed is left out of search results and cannot be called.
A streaming call reads the stream event by event and stops at the first of:
- the server ending the stream;
max_stream_eventsevents (default 100);- 50,000 characters of collected output;
timeout_seconds.
It then closes the connection and returns what arrived. The result names the protocol and carries
events (one item per SSE event or NDJSON line) or text (raw chunks, joined and decoded as
UTF-8). If the call was cut short, stopped says why: max_events, max_chars or timeout. A feed
that never closes still returns its first events instead of only a timeout error.
What it does on your machine (disclosure)
- Network calls. Each search or call fetches every configured manual from its
url, and a
call sends the request the manual describes to the endpoint the manual names. Only manuals you
configure are contacted. Their tool endpoints can be any host the manual chooses, so add only
manuals from providers you trust. A streaming call holds its connection open until the stream
ends or a limit above is reached, never longer thantimeout_seconds. - Secrets. Only the secrets a manual lists under
secretsare read, through Hermes
(agent.secret_scope.get_secret, which honours the active profile), and they are sent only where
that manual's templates place them. The UTCP library's own fallbacks, reading.envfiles and
os.environ, are turned off: an unlisted$NAMEfails the call instead of picking up whatever
the process environment holds. - No shell commands. Only the
http,sseandstreamable_httpcall templates are accepted.
UTCP's command-line call template is not installed or accepted, so a manual cannot make the
plugin run programs. - No stored state. Nothing is written to disk. A fresh UTCP client is built for each call and
closed afterwards, so manuals are re-fetched on every search or call.
Limits
- MCP call templates are not offered. Manuals themselves are fetched only over
http. - A streaming tool's result comes back once the call stops, not event by event while it runs.
- Approvals apply as for any plugin tool; this plugin does not classify a UTCP tool as more or less
dangerous by itself.
Development
python -m pip install "utcp>=1.2.0,<2" "utcp-http>=1.1.15,<2" pytest
python -m pytest -c tests/pytest.ini tests
hermes plugins validate --install-deps .
The tests run against a real local HTTP server. Run them inside a Hermes checkout on
PYTHONPATH to use Hermes's own agent.secret_scope; without one, a stand-in records which
secret names were read.
License
MIT
README from the reviewed commit 586df3a; it updates when the author re-pins.

nftpoetrist