#269
fix: installer + fast accurate tool detection + MCP handshake/requirements fixes (v6.0.1)
What / Why
This fork had no installer, and the old codebase had three bug clusters that broke fresh setups:
- No installer — README-only manual steps; users guessed which of the 150+ tools to install.
requirements.txtblocked installs — pinned the wrongfastmcppackage (code importsmcp.server.fastmcp) and forced heavy builds (pwntools/angr/mitmproxy/selenium) that fail on Python 3.13+.hexstrike_server.pyalso importedselenium/mitmproxyunconditionally, so a core-only env crashed at import.- Tool detection slow + inaccurate —
/healthran 120+whichcalls through the threadedEnhancedCommandExecutor(with progress logging!), cached only successes, double-counted duplicate names, and missed renamed/cased tools (nxcvscrackmapexec,theHarvester,msfconsole...). - MCP handshake killed on slow machines — 5s
/healthprobe + 3x2s blocking retries at stdio startup ("Connection closed"), plus a placeholderhexstrike-ai-mcp.json.
Changes
install.sh(new) — distro/Python preflight, fastcommand -vscan, installs only missing tools per use-case category (apt/go/cargo/pipx/gem, incl. Go >=1.23 bootstrap), venv + core deps, auto-writes OpenCode MCP config, validation + optional--check-health. Safe to re-run.hexstrike_server.py—/healthnow usesshutil.which+importlibalias-awareresolve_tool()(no subprocess), deduped tool list, extended helper PATH, returnstools_detail/missing_essential_tools/install_hints; old response keys kept.selenium/mitmproxyimports optional with graceful endpoint errors.hexstrike_mcp.py— compatFastMCPimport (mcp v1 -> v2MCPServer->fastmcppkg),/healthprobe 5s -> 15s, startup retries 3x2s -> 2x1s, new--lazy+--health-timeoutflags.requirements.txt— core-only, pinsmcp>=1.9,<2; heavy deps moved to newrequirements-optional.txt(--with-browser/--with-proxy/--with-pwn).hexstrike-ai-mcp.json+ newopencode.json.example— working paths/flags instead of placeholders.README.md— installer-first install docs, fixed client configs, expanded troubleshooting.
Test evidence (clean venv, Python 3.13)
pip install -r requirements.txtsucceeds;mcp.server.fastmcp.FastMCPimports; both filespy_compileclean./healthvia Flask test client: HTTP 200 in ~1s for 122 tools (was 10s+ subprocess storm), 55 detected here,missing_essential_tools: ['john'].- MCP client: lazy init 0.00s, dead-server non-lazy init ~2s (was 6s+),
--helplists new flags. bash -n install.shclean; JSON configs validate.
Backward compatibility
/healthkeeps all old keys (tools_status,all_essential_tools_available,total_*,category_stats); only adds new ones.- Manual install steps in README still work; installer is additive.