Hermes Agent Archive / Skills

Calling MCP servers from plugins

From Official Docs · October 5, 2026

ctx.call_mcp() lets a plugin call a tool on one of the user's configured MCP servers - synchronously, from any hook or tool handler - routing through Hermes' existing native MCP client (same connections, trust-tier gates, circuit breaker, and reconnect logic as model-invoked MCP tools; never a parallel client). Signature: ctx.call_mcp(server: str, tool: str, arguments: dict | None = None, timeout: float = 30) -> dict Returns a stable envelope: {"ok": True, "result": ...} (plus structuredContent when the server provides it) or {"ok": False, "error": "..."} . Results over ~64 KB are truncated and flagged with "truncated": True .

From the official Hermes Agent documentation.

result = ctx.call_mcp(
    "knowledge_rag",            # server name from mcp.servers
    "query_knowledge",          # tool on that server
    {"query": "deploy runbook"},
    timeout=30,                 # seconds; clamped to 1–600
)
if result["ok"]:
    print(result["result"])
else:
    print("MCP error:", result["error"])