@aroha-sdk/hermes-bridge
v1.2.4
Published
Aroha ↆHermes Agent / ZeroClaw bridge  exposes Aroha agents as MCP stdio servers
Readme
@aroha-sdk/hermes-bridge
Mandate-aware MCP stdio bridge — expose Aroha agents as Hermes/ZeroClaw-compatible MCP servers over stdio.
Install
npm install @aroha-sdk/hermes-bridgeQuick example
import { createHermesBridge } from "@aroha-sdk/hermes-bridge";
import { verifyMandate } from "@aroha-sdk/credentials";
// Bridge an Aroha agent as an MCP stdio server for Hermes/ZeroClaw
const bridge = createHermesBridge({
agentUrl: "http://flight-agent/v1/run",
name: "flight-tools",
tools: ["search-flights", "book-flight"],
// Verify the mandate before any tool is exposed
onConnect: async (mandateToken, issuerPublicKey) => {
const { valid, mandate, reason } = await verifyMandate(mandateToken, issuerPublicKey);
if (!valid) throw new Error(`Mandate invalid: ${reason}`);
return mandate;
},
});
// Run as stdio MCP server (compatible with Hermes and ZeroClaw)
bridge.listen();Why this exists in the mandate chain
Hermes and ZeroClaw MCP hosts expect an stdio transport. @aroha-sdk/hermes-bridge lets a mandate-aware Aroha agent participate in Hermes/ZeroClaw tool chains — so mandate enforcement extends into MCP stdio environments without rewriting the agent.
API
createHermesBridge(opts)— create an MCP stdio bridge for an Aroha agent.opts.agentUrl— the Aroha agent endpoint to proxy tool calls to.opts.tools— list of tool names to expose via MCP.opts.onConnect(mandateToken, issuerPublicKey)— async mandate verification hook.bridge.listen()— start reading from stdin and writing to stdout.
License
MIT
