@@ -172,9 +172,16 @@ async def execute_hub_tool(
172172 :return: Tool execution result.
173173
174174 Example identifiers:
175+ - "hub:binwalk-mcp:binwalk_scan"
176+ - "hub:yara-mcp:yara_scan_with_rules"
175177 - "hub:nmap:nmap_scan"
176- - "nmap:nmap_scan"
177- - "hub:nuclei:nuclei_scan"
178+
179+ FILE ACCESS — if set_project_assets was called, the assets directory is
180+ mounted read-only inside the container at two standard paths:
181+ - /app/uploads/ (used by binwalk, and tools with UPLOAD_DIR)
182+ - /app/samples/ (used by yara, capa, and tools with SAMPLES_DIR)
183+ Always use /app/uploads/<filename> or /app/samples/<filename> when
184+ passing file paths to hub tools — do NOT use the host path.
178185
179186 """
180187 try :
@@ -353,7 +360,22 @@ async def start_hub_server(server_name: str) -> dict[str, Any]:
353360 try :
354361 executor = _get_hub_executor ()
355362
356- result = await executor .start_persistent_server (server_name )
363+ # Inject project assets as Docker volume mounts (same logic as execute_hub_tool).
364+ extra_volumes : list [str ] = []
365+ try :
366+ storage = get_storage ()
367+ project_path = get_project_path ()
368+ assets_path = storage .get_project_assets_path (project_path )
369+ if assets_path :
370+ assets_str = str (assets_path )
371+ extra_volumes = [
372+ f"{ assets_str } :/app/uploads:ro" ,
373+ f"{ assets_str } :/app/samples:ro" ,
374+ ]
375+ except Exception : # noqa: BLE001 - never block server start due to asset injection failure
376+ extra_volumes = []
377+
378+ result = await executor .start_persistent_server (server_name , extra_volumes = extra_volumes or None )
357379
358380 return {
359381 "success" : True ,
0 commit comments