# 0x4m4/hexstrike-ai

> Flask server that turns ~150 security CLIs into shell-command endpoints, plus a FastMCP bridge so an external AI client can call them.

- Category: [Open-source AI pentest and offensive-security agents](https://llms-technical-reviews.com/offensive-security-agents/)
- Repository: https://github.com/0x4m4/hexstrike-ai (reviewed at commit `d689933ff579d839c676c82b231f8e98326c5f04`, 2026-08-03)
- Stars: 13298 · Language: Python · License: MIT
- Canonical page: https://llms-technical-reviews.com/p/hexstrike-ai/

## Overview

HexStrike AI is a tool server, not an agent. The repository has two Python scripts. `hexstrike_server.py` (about 17,300 lines) is a Flask app with about 155 REST routes. Most of them build a shell command from JSON parameters and run it on the host. `hexstrike_mcp.py` (about 5,500 lines) is a FastMCP stdio server with about 150 `@mcp.tool()` functions, and each one forwards its arguments to the matching REST route. You connect Claude Desktop, Cursor, Copilot or any other MCP client, and that client's model decides which tool to call next.

The README describes "12+ autonomous AI agents" and an "intelligent decision engine". In the code these are ordinary Python classes with hard-coded tables: tool-effectiveness scores per target type, fixed attack-pattern step lists, and bug-bounty and CTF workflow templates. Nothing in the repository calls an LLM. The planning, the loop and the judgment all live in whichever MCP client you attach.

What you get is a large, convenient catalog of wrapped security tools with caching, timeouts, retry heuristics and colorful logs. You also get, in the code as shipped, no authentication, no scope enforcement and an endpoint that runs arbitrary commands. Treat it as a remote shell with helpers, and isolate it accordingly.

## Architecture

```mermaid
flowchart LR
  LLM["MCP client (Claude, Cursor, ...)"] --> MCP["hexstrike_mcp.py (FastMCP stdio)"]
  MCP --> HC["HexStrikeClient (requests)"]
  HC --> API["Flask routes /api/*"]
  API --> CMD["command string builder"]
  CMD --> EXEC["execute_command / with_recovery"]
  EXEC --> CACHE["HexStrikeCache (LRU, TTL)"]
  EXEC --> POPEN["EnhancedCommandExecutor: Popen shell=True"]
  API --> IDE["IntelligentDecisionEngine (static tables)"]
  API --> WF["Workflow managers (bug bounty, CTF)"]
  API --> FS["FileOperationsManager"]
```

| Component | Path | Role |
|---|---|---|
| MCP bridge | `hexstrike_mcp.py` | `setup_mcp_server` registers ~150 tools; each POSTs to the API via `HexStrikeClient` |
| API server | `hexstrike_server.py` (routes) | `/api/tools/*` (90 routes), `/api/command`, `/api/files/*`, `/api/python/*`, `/api/intelligence/*`, `/api/ctf/*`, `/api/bugbounty/*`, process control |
| Command execution | `hexstrike_server.py` `execute_command`, `EnhancedCommandExecutor` | Runs the command string through a shell, streams output, enforces a timeout |
| Recovery | `hexstrike_server.py` `IntelligentErrorHandler`, `execute_command_with_recovery` | Classifies failures from output text and retries or swaps tools |
| Decision engine | `hexstrike_server.py` `IntelligentDecisionEngine` | Rule tables mapping target type to tools and parameters |
| Workflows | `hexstrike_server.py` `BugBountyWorkflowManager`, `CTFWorkflowManager`, `CTFChallengeAutomator` | Phase templates returned as JSON |
| CVE intel | `hexstrike_server.py` `CVEIntelligenceManager`, `VulnerabilityCorrelator` | NVD and GitHub lookups; partly mock data |
| MCP config | `hexstrike-ai-mcp.json` | Example client config (stdio, `--server` URL) |

## How a request flows

Take an MCP client calling `nmap_scan`:

1. **Startup.** `main()` in the MCP script builds a `HexStrikeClient` for `--server` (default `http://127.0.0.1:8888`). It probes `/health` with retries and then calls `mcp.run()` over stdio. If the server is unreachable it still starts and only logs a warning ([hexstrike_mcp.py](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_mcp.py#L5416-L5470), [L142-L190](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_mcp.py#L142-L190)).
2. **Tool call.** The `nmap_scan` tool packs its arguments into a dict, sets `use_recovery`, and calls `safe_post("api/tools/nmap", data)` ([hexstrike_mcp.py](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_mcp.py#L267-L310)).
3. **Command build.** The Flask route concatenates `scan_type`, `ports`, `additional_args` and `target` into one command string with f-strings. No quoting and no validation happen beyond checking that `target` is non-empty ([hexstrike_server.py](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L10327-L10375)).
4. **Cache.** `execute_command` checks `HexStrikeCache` first. The cache key is an MD5 of the command plus params, with LRU eviction and a 1-hour TTL by default. Only successful results are stored ([L8636-L8662](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L8636-L8662), [L6668-L6700](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L6668-L6700)).
5. **Execute.** `EnhancedCommandExecutor.execute` runs `subprocess.Popen(command, shell=True)`. Reader threads collect stdout and stderr, and the process is terminated after `COMMAND_TIMEOUT` (300 s) ([L6869-L6885](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L6869-L6885)).
6. **Recover.** `execute_command_with_recovery` retries up to three times. Between attempts it asks the error handler to classify the failure (timeout, permission, rate-limit text and so on) and suggest an adjusted command or an alternative tool ([L8664-L8760](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L8664-L8760)).
7. **Return.** Raw `stdout`, `stderr`, return code and timing go back as JSON to the MCP tool, which passes them unchanged to the model.

## Key components

### Tool wrappers

The 90 `/api/tools/*` routes all follow the shape in step 3: read JSON, interpolate it into a command string, execute. They cover network scanning, web discovery, password tools, binary analysis, cloud and container auditors, and forensics. Output is never parsed into structured findings. The model reads raw terminal text. `/health` reports which tool binaries are installed on the host ([L9023-L9060](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L9023-L9060)).

### Generic execution surfaces

Several endpoints go past wrapping. `/api/command` runs any command string it receives ([L9137-L9158](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L9137-L9158)). `/api/python/execute` writes a script to disk and runs it in a managed virtualenv ([L14498-L14530](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L14498-L14530)). `FileOperationsManager` joins the caller-supplied filename onto `/tmp/hexstrike_files` without normalizing it, so the base directory is not a real boundary ([L8928-L8953](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L8928-L8953)).

### "Intelligence" layer

`IntelligentDecisionEngine` holds static dictionaries: effectiveness scores per tool and target type, technology signatures, and attack-pattern step lists ([L572-L600](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L572-L600)). `analyze_target` resolves DNS, and `_detect_technologies` guesses the tech stack from substrings of the target string itself ([L811-L838](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L811-L838), [L880-L892](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L880-L892)). `/api/intelligence/smart-scan` picks up to `max_tools` tools from those tables and runs them through a thread pool of at most five workers. It counts "vulnerabilities" by checking whether words such as `HIGH` or `XSS` appear in the output ([L9672-L9780](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L9672-L9780)).

### Workflows and CVE intel

The bug-bounty and CTF managers return phase plans as JSON. `CTFChallengeAutomator` does not run the tools it lists. A comment marks execution as simulated, and each step is reported as successful ([L3925-L3947](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L3925-L3947)). `CVEIntelligenceManager.fetch_latest_cves` does query the NVD API ([L5955-L5975](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L5955-L5975)), but `VulnerabilityCorrelator` returns hard-coded placeholder CVEs ([L8594-L8605](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L8594-L8605)).

### State

All state lives in memory: the result cache, telemetry counters, process registries and CTF and CVE dictionaries. A restart loses everything, and there is no engagement or session concept to resume.

## Extending it

- **New tool.** Add a Flask route that builds a command and calls `execute_command_with_recovery`, then a matching `@mcp.tool()` function in `setup_mcp_server` that posts to it. Each tool is defined twice, once per file.
- **Decision tables.** Tool rankings and attack patterns are Python dict literals in `IntelligentDecisionEngine`. Change them there.
- **Models.** Not applicable. Model choice, context management and cost all belong to the MCP client.

## Running it

- `pip install -r requirements.txt` in a virtualenv, then `python3 hexstrike_server.py [--port 8888] [--debug]` ([L17256-L17289](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L17256-L17289)). The security tools themselves must already be installed on the host, typically a Kali-style machine.
- Point your MCP client at `python3 hexstrike_mcp.py --server http://HOST:8888` using `hexstrike-ai-mcp.json` as a template. That file's description warns about `alwaysAllow` and ships it empty, so per-call confirmation is left to the client ([hexstrike-ai-mcp.json](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike-ai-mcp.json#L1-L15)).

## Strengths and caveats

- **Strength: breadth.** Roughly 150 security tools are reachable from any MCP client with typed arguments and docstrings, with no glue code to write.
- **Strength: practical execution plumbing.** Timeouts, partial output on timeout, result caching, process listing and termination, and failure-based retries.
- **Caveat: no safety controls in code.** No target allowlist, no RoE, no rate limiting of outbound traffic, no approval step and no sandbox. The only human checkpoint is whatever confirmation your MCP client shows before each call.
- **Caveat: exposed by default.** `API_HOST` defaults to `127.0.0.1` (and the banner prints it), but `app.run` hard-codes `host="0.0.0.0"`, and no route checks credentials ([L98-L99](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L98-L99), [L17256-L17289](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L17256-L17289)). Anyone who can reach the port can run commands as the server user.
- **Caveat: shell injection by construction.** Every wrapper interpolates caller strings into a `shell=True` command. Prompt-injected tool output that steers the model can therefore turn into host commands.
- **Caveat: findings are not validated.** Severity is keyword counting and correlation partly uses placeholder data. Treat any "vulnerabilities found" number as noise.
- **Caveat: marketing versus code.** The "AI agents" are deterministic helpers, and CTF auto-solve is simulated. Judge the project as an MCP tool catalog, which is what it is.

*Sources: code at d689933, verified Q&A.*

## How 0x4m4/hexstrike-ai answers the Open-source AI pentest and offensive-security agents questions

### How is the agent loop and planning implemented? (answered)

**There is no AI agent loop in this codebase.** The "12+ autonomous AI agents" listed in the README (IntelligentDecisionEngine, BugBountyWorkflowManager, CTFWorkflowManager, CVEIntelligenceManager, AIExploitGenerator, VulnerabilityCorrelator, etc.) are all deterministic Python classes with no LLM inference loop. The `IntelligentDecisionEngine` (line 572) uses hardcoded tool-effectiveness ratings per target type and predefined attack patterns (e.g., `web_reconnaissance` has 8 steps from nmap to gobuster) — it selects tools by matching target type to a static dict, not via any planning or decomposition. `BugBountyWorkflowManager` (line 2447) builds phase-based workflows (subdomain discovery → HTTP probing → content discovery → parameter discovery → vulnerability hunting) as static Python dicts with estimated times and tool lists. `CTFChallengeAutomator.auto_solve_challenge()` (line 3864) executes steps sequentially or in parallel, checking if the output contains a flag candidate and breaking early — but execution is simulated (`# In a real implementation, this would execute the command` at line 3939). There is no multi-agent crew, no role-based turn structure, no iteration caps, and no task-decomposition loop. The project is purely an MCP tool server: an external AI client (Claude, GPT, Copilot) connects and drives the interaction loop; HexStrike just provides the tool endpoints.


Citations: [hexstrike_server.py:572-770](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L572-L770) · [hexstrike_server.py:2447-2575](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L2447-L2575) · [hexstrike_server.py:3855-3947](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L3855-L3947) · [hexstrike_server.py:2795-2975](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L2795-L2975) · [hexstrike_mcp.py:267-310](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_mcp.py#L267-L310)

### How are security tools integrated and executed? (answered)

Security tools are integrated entirely through shell-command string construction and subprocess execution. The architecture has two layers. **MCP layer** (`hexstrike_mcp.py`): Each tool is a `@mcp.tool()`-decorated function (e.g., `nmap_scan` at line 284) that accepts typed parameters, logs the invocation, and POSTs a JSON payload to the Flask server's REST endpoint (e.g., `api/tools/nmap`). **Server layer** (`hexstrike_server.py`): Each Flask route (e.g., `@app.route("/api/tools/nmap")` at line 10327) receives the params, builds a raw shell command by string concatenation (`f"nmap {scan_type} -p {ports} {target}"`), and calls `execute_command()` or `execute_command_with_recovery()`. The actual execution is `EnhancedCommandExecutor` (line 6783): it runs `subprocess.Popen(cmd, shell=True)` (line 6876), reads stdout/stderr via threads, and returns the raw text as `{"stdout": ..., "stderr": ..., "return_code": ...}`. There is no output parsing — the raw shell output is passed back to the AI client verbatim. A few tools (BrowserAgent at line 13623, HTTPTestingFramework at line 13281) use Selenium/requests directly instead of shell commands. The `HexStrikeCache` (line 6668) caches results keyed by command+params hash with LRU eviction. The tool map covers 150+ named security tools (nmap, sqlmap, nuclei, hydra, etc.), but the mapping is purely to shell commands with no Docker/Kali sandbox isolation.


Citations: [hexstrike_mcp.py:283-310](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_mcp.py#L283-L310) · [hexstrike_server.py:10327-10375](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L10327-L10375) · [hexstrike_server.py:6783-6982](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L6783-L6982) · [hexstrike_server.py:6668-6734](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L6668-L6734) · [hexstrike_server.py:8636-8662](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L8636-L8662) · [hexstrike_server.py:13623-13722](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L13623-L13722)

### How are scope, authorization and dangerous actions controlled? (answered)

**There are effectively no scope, authorization, or safety controls in the code.** The Flask server binds to `host="0.0.0.0"` (line 17289) with no authentication on any endpoint. The `/api/command` endpoint (line 9137) accepts arbitrary shell commands with no validation or allowlist — it builds the command string from user input and passes it directly to `subprocess.Popen` with `shell=True`. Every tool endpoint (nmap, sqlmap, hydra, etc.) accepts a `target` parameter and injects it unsanitized into a shell command. There is no target allowlist, scope file, domain validation, or IP-range check anywhere in the codebase. The MCP config (`hexstrike-ai-mcp.json`) has `"alwaysAllow": []` (empty) but the comment says "Turn off alwaysAllow if you don't want autonomous execution!" — offering no in-code guard. The `FailureRecoverySystem` (line 4449) has a `RATE_LIMITED` error class (line 1563), but this handles *detecting* rate-limiting errors from tool output (e.g., "429 Too Many Requests") and suggests retry strategies — it does *not* enforce any rate limit on the server's own outgoing requests. The `ThreadPoolExecutor` in the smart-scan endpoint caps concurrent tool execution at 5 workers (line 9776), which is the only implicit throttle. There is no human-in-the-loop approval, no sandboxing (no Docker/Kali isolation), and no network egress control — the server trusts the MCP client entirely.


Citations: [hexstrike_server.py:17256-17289](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L17256-L17289) · [hexstrike_server.py:9137-9158](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L9137-L9158) · [hexstrike_server.py:10327-10375](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L10327-L10375) · [hexstrike_server.py:4449-4541](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L4449-L4541) · [hexstrike_server.py:9776-9780](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L9776-L9780) · [hexstrike-ai-mcp.json:1-14](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike-ai-mcp.json#L1-L14)

### How are findings validated and reported? (answered)

**Vulnerability findings are not validated or confirmed — they are naively counted by keyword matching in raw tool output.** In the smart-scan endpoint (line 9702), after executing each tool, the code scans `result.get('stdout', '')` for a list of keywords: `['CRITICAL', 'HIGH', 'MEDIUM', 'VULNERABILITY', 'EXPLOIT', 'SQL injection', 'XSS', 'CSRF']` — the count is simply `sum(1 for indicator in vuln_indicators if indicator.lower() in output.lower())` (line 9740). There is no second-agent review, no proof-of-concept re-execution, and no structured deduplication. The exploit classes (`SQLiExploit` line 7393, `XSSExploit` line 7522, `GenericExploit` line 7787, etc.) are Python template strings for generating exploit code files, not runtime verification modules — they contain template variables like `{target_url}` embedded in f-string patterns waiting for format substitution. The `VulnerabilityCorrelator` (line 8510) uses hardcoded mock CVE data (`"CVE-2024-1234"` at line 8600) and is described as "simplified implementation" — it does not query any CVE database or correlate real findings. Reports are generated by `create_summary_report()` (line 5929) which renders colored ASCII cards with vulnerability titles and CVSS scores from whatever data is passed in — but since findings are never validated upstream, the report is essentially keyword-matched noise. There are no false-positive filters, no deduplication logic, and no structured report format beyond visual terminal output.


Citations: [hexstrike_server.py:9702-9753](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L9702-L9753) · [hexstrike_server.py:7393-7431](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L7393-L7431) · [hexstrike_server.py:7787-7846](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L7787-L7846) · [hexstrike_server.py:8510-8629](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L8510-L8629) · [hexstrike_server.py:5929-5949](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L5929-L5949)

### How is engagement state and knowledge kept across a long run? (answered)

**State management is purely in-memory with no persistence across server restarts or long-run compaction.** The server initialises several global singleton instances at module level: `cache = HexStrikeCache()` (line 6734) is an `OrderedDict`-backed LRU cache with TTL that stores command execution results keyed by MD5 hash — it resets on server restart. `telemetry = TelemetryCollector()` (line 6781) tracks cumulative command counts and success rates in a simple in-memory dict. `ProcessManager` (line 5576) and `ProcessPool` (line 4877) keep dicts of active PIDs with progress info, all volatile. The `CTFChallengeAutomator` has `active_challenges`, `solution_cache`, and `learning_database` (line 3858) — all plain dicts. The `CVEIntelligenceManager` has `cve_cache` and `vulnerability_db` (line 5754) — also in-memory dicts with no database backend. There is no SQLite, no filesystem persistence for session state, no knowledge graph, and no mechanism to resume an interrupted engagement. The `AdvancedCache` (line 5085) has a background cleanup thread for expired entries but does not survive a restart. Long-running commands are tracked by PID with progress bars and ETA estimates cycled through the spinner animation, but the process state is lost if the server dies. Summarisation or compaction of long sessions does not exist — the system has no concept of a session lifecycle.


Citations: [hexstrike_server.py:6668-6734](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L6668-L6734) · [hexstrike_server.py:6736-6781](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L6736-L6781) · [hexstrike_server.py:3855-3876](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L3855-L3876) · [hexstrike_server.py:5750-5760](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L5750-L5760) · [hexstrike_server.py:5085-5134](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L5085-L5134)

### Which models are supported and how are cost and context managed? (answered)

**The repository has no LLM model configuration, no provider selection logic, and no cost or context-window management.** The project is not an AI agent — it is a tool server that exposes security tools via the Model Context Protocol (MCP). The MCP client configuration (`hexstrike-ai-mcp.json`) shows a `"command": "python3"` stdio transport that an external AI client (Claude Desktop, VS Code Copilot, Cursor) connects to. The `FastMCP` import from `mcp.server.fastmcp` (line 29 of `hexstrike_mcp.py`) provides the MCP transport layer, but the server itself makes no LLM API calls. The README lists "Claude, GPT, or other MCP-compatible agents" as supported, but the code has no model selection, no per-role model routing, no token counting, and no budget enforcement. The external AI client (e.g., the user's Claude Desktop configuration) decides which model to use entirely outside this project. There is no support for local models (Ollama, llama.cpp, etc.), no API key configuration for any LLM provider, and no context-window management logic. The `5000` line count of tool definitions is determined by the number of MCP tool functions registered, not by context limits. The project documentation suggests setting `"timeout": 300` in the MCP config, but that's an HTTP timeout for the tool execution, not an LLM parameter.


Citations: [hexstrike-ai-mcp.json:1-14](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike-ai-mcp.json#L1-L14) · [hexstrike_mcp.py:267-310](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_mcp.py#L267-L310) · [hexstrike_mcp.py:29-29](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_mcp.py#L29-L29) · [hexstrike_server.py:1544-1545](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L1544-L1545) · [README.md:630-648](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/README.md#L630-L648)
