Skip to content
This repository was archived by the owner on Apr 22, 2026. It is now read-only.

Commit a51c495

Browse files
committed
feat(mcp): update application instructions and hub config
1 parent 7924e44 commit a51c495

2 files changed

Lines changed: 549 additions & 6 deletions

File tree

fuzzforge-mcp/src/fuzzforge_mcp/application.py

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,46 @@ async def lifespan(_: FastMCP) -> AsyncGenerator[Settings]:
4747
4848
Typical workflow:
4949
1. Initialize a project with `init_project`
50-
2. Set project assets with `set_project_assets` (optional, only needed once for the source directory)
50+
2. Set project assets with `set_project_assets` — path to the directory containing
51+
target files (firmware images, binaries, source code, etc.)
5152
3. List available hub servers with `list_hub_servers`
5253
4. Discover tools from servers with `discover_hub_tools`
5354
5. Execute hub tools with `execute_hub_tool`
5455
55-
Hub workflow:
56-
1. List available hub servers with `list_hub_servers`
57-
2. Discover tools from servers with `discover_hub_tools`
58-
3. Execute hub tools with `execute_hub_tool`
56+
Agent context convention:
57+
When you call `discover_hub_tools`, some servers return an `agent_context` field
58+
with usage tips, known issues, rule templates, and workflow guidance. Always read
59+
this context before using the server's tools.
60+
61+
File access in containers:
62+
- Assets set via `set_project_assets` are mounted read-only at `/app/uploads/` and `/app/samples/`
63+
- A writable output directory is mounted at `/app/output/` — use it for extraction results, reports, etc.
64+
- Always use container paths (e.g. `/app/uploads/file`) when passing file arguments to hub tools
65+
66+
Stateful tools:
67+
- Some tools (e.g. radare2-mcp) require multi-step sessions. Use `start_hub_server` to launch
68+
a persistent container, then `execute_hub_tool` calls reuse that container. Stop with `stop_hub_server`.
69+
70+
Firmware analysis pipeline (when analyzing firmware images):
71+
1. **binwalk-mcp** (`binwalk_scan` + `binwalk_extract`) — identify and extract filesystem from firmware
72+
2. **yara-mcp** (`yara_scan_with_rules`) — scan extracted files with vulnerability rules to prioritize targets
73+
3. **radare2-mcp** (persistent session) — confirm dangerous code paths
74+
4. **searchsploit-mcp** (`search_exploitdb`) — query version strings from radare2 against ExploitDB
75+
Run steps 3 and 4 outputs feed into a final triage summary.
76+
77+
radare2-mcp agent context (upstream tool — no embedded context):
78+
- Start a persistent session with `start_hub_server("radare2-mcp")` before any calls.
79+
- IMPORTANT: the `open_file` tool requires the parameter name `file_path` (with underscore),
80+
not `filepath`. Example: `execute_hub_tool("hub:radare2-mcp:open_file", {"file_path": "/app/output/..."})`
81+
- Workflow: `open_file` → `analyze` → `list_imports` → `xrefs_to` → `run_command` with `pdf @ <addr>`.
82+
- Static binary fallback: firmware binaries are often statically linked. When `list_imports`
83+
returns an empty result, fall back to `list_symbols` and search for dangerous function names
84+
(system, strcpy, gets, popen, sprintf) in the output. Then use `xrefs_to` on their addresses.
85+
- For string extraction, use `run_command` with `iz` (data section strings).
86+
The `list_all_strings` tool may return garbled output for large binaries.
87+
- For decompilation, use `run_command` with `pdc @ <addr>` (pseudo-C) or `pdf @ <addr>`
88+
(annotated disassembly). The `decompile` tool may fail with "not available in current mode".
89+
- Stop the session with `stop_hub_server("radare2-mcp")` when done.
5990
""",
6091
lifespan=lifespan,
6192
)

0 commit comments

Comments
 (0)