aboutsummaryrefslogtreecommitdiffstats
path: root/spawn.sh
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-10 11:55:33 +0200
committerblasty <blasty@local>2026-07-10 11:55:33 +0200
commit25590831d851e9e8ab8ff15b4122e01dfafd6d58 (patch)
tree9f26bc179bd407e94217865c13219ba9d7a0c33e /spawn.sh
parentstruct editor: C-style CRUD for local types (Ctrl+T) (diff)
downloadida-tui-25590831d851e9e8ab8ff15b4122e01dfafd6d58.tar.gz
ida-tui-25590831d851e9e8ab8ff15b4122e01dfafd6d58.tar.xz
ida-tui-25590831d851e9e8ab8ff15b4122e01dfafd6d58.zip
server: inject a del_type tool into ida-pro-mcp (enables struct delete)
ida-pro-mcp has no delete-type tool, so struct-editor delete couldn't work. We don't vendor/fork the server; instead server/patch_server.py idempotently appends a del_type @tool to the installed ida_pro_mcp/ida_mcp/api_types.py, which every worker (python -m ida_pro_mcp.idalib_server) imports -> it self-registers on the shared MCP_SERVER. spawn.sh runs the patch before launching, so it's re-applied on each start (survives reinstalls) and tracked in-repo instead of hand-editing site-packages. del_type calls ida_typeinf.del_named_type(get_idati(), name, NTF_TYPE). After a supervisor restart, Program.delete_type() now succeeds; the struct editor's Del removes the type and the list refreshes. Verified end-to-end; pilot 84/84.
Diffstat (limited to 'spawn.sh')
-rwxr-xr-xspawn.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/spawn.sh b/spawn.sh
index 4b0c63c..9db8310 100755
--- a/spawn.sh
+++ b/spawn.sh
@@ -1,5 +1,12 @@
#!/bin/sh
# Start the ida-pro-mcp supervisor. IDA_MCP_MAX_WORKERS raises the ceiling on
# concurrently-open binaries (default 4); idle workers self-exit and free slots.
+
+# Ensure idatui's extra server tools (del_type, needed by the struct editor) are
+# present in the installed ida-pro-mcp. Idempotent; patches the api_types.py that
+# the /usr/bin/python workers import. See server/patch_server.py.
+/usr/bin/python "$(dirname "$0")/server/patch_server.py" || \
+ echo "warn: server patch skipped (del_type may be unavailable)"
+
IDA_MCP_MAX_WORKERS="${IDA_MCP_MAX_WORKERS:-8}" \
uv run idalib-mcp --host 127.0.0.1 --port 8745 $(pwd)/bin/ls