mirror of
https://github.com/GH05TCREW/pentestagent.git
synced 2026-03-07 14:23:20 +00:00
tui: instantiate MCPManager at startup to auto-connect and register MCP tools
This commit is contained in:
@@ -1316,10 +1316,18 @@ class PentestAgentTUI(App):
|
||||
# MCP: automatic install/start has been removed. Operators should
|
||||
# run the scripts in `third_party/` manually to install and start
|
||||
# any vendored MCP servers (e.g., HexStrike, MetasploitMCP) and
|
||||
# then configure `mcp_servers.json` accordingly. No automatic
|
||||
# background installs or starts will be performed.
|
||||
self.mcp_manager = None
|
||||
mcp_server_count = 0
|
||||
# then configure `mcp_servers.json` accordingly. If a config is
|
||||
# present, `MCPManager` will auto-connect and register tools so
|
||||
# the TUI can display MCP-provided tools.
|
||||
try:
|
||||
from ..mcp import MCPManager
|
||||
|
||||
self.mcp_manager = MCPManager()
|
||||
# connected servers are available synchronously
|
||||
mcp_server_count = len(self.mcp_manager.get_all_servers())
|
||||
except Exception:
|
||||
self.mcp_manager = None
|
||||
mcp_server_count = 0
|
||||
|
||||
# Runtime - Docker or Local
|
||||
if self.use_docker:
|
||||
|
||||
Reference in New Issue
Block a user