Skip to content

Instantly share code, notes, and snippets.

View EricChen1248's full-sized avatar

Eric Chen EricChen1248

View GitHub Profile
@EricChen1248
EricChen1248 / patch
Last active June 14, 2026 06:38
patch to add approvals to hermes mcp-tool
--- a/tools/mcp_tool.py
+++ b/tools/mcp_tool.py
@@ -2592,6 +2592,31 @@ async def _connect_server(name: str, config: dict) -> MCPServerTask:
# Handler / check-fn factories
# ---------------------------------------------------------------------------
+ALLOWED_TOOLS_FILE_PATH = '/opt/data/allowed_tools.json'
+def check_tool(server_name: str, tool_name: str):
+ if not os.path.exists(ALLOWED_TOOLS_FILE_PATH):
+ with open(ALLOWED_TOOLS_FILE_PATH, 'w') as f: