forked from Keelrleek/Harbor
Per-agent x64dbg session through debugger()/debugger_tools()
Harbor starts the x64dbg-automate MCP server (stdio) on first use and keeps it for the life of the agent's Harbor process; the debuggee is terminated when that process exits. Configured by debugger_command/_path/_temp in [reverse].
This commit is contained in:
1 parent
7ed914ebdb
commit
584fabeb74
5 files changed
+175
-4
No files matched your search
@@ -0,0 +1,18 @@
|
||||
"""A fake stdio MCP server for the debugger forwarder test: one tool that echoes, one that fails."""
|
||||
import json
|
||||
import sys
|
||||
|
||||
for line in sys.stdin:
|
||||
msg = json.loads(line)
|
||||
if "id" not in msg:
|
||||
continue
|
||||
if msg["method"] == "initialize":
|
||||
result = {"protocolVersion": "2025-06-18"}
|
||||
elif msg["method"] == "tools/list":
|
||||
result = {"tools": [{"name": "echo", "description": "Echo", "inputSchema": {"properties": {"x": {}}}}]}
|
||||
elif msg["params"]["name"] == "echo":
|
||||
result = {"content": [{"type": "text", "text": "echo " + json.dumps(msg["params"]["arguments"])}]}
|
||||
else:
|
||||
result = {"isError": True, "content": [{"type": "text", "text": "no such session"}]}
|
||||
print(json.dumps({"jsonrpc": "2.0", "method": "notifications/message", "params": {}}), flush=True)
|
||||
print(json.dumps({"jsonrpc": "2.0", "id": msg["id"], "result": result}), flush=True)
|
||||
Reference in new issue
Block a user