From b81e5aebf53498745cb5c61a1c38beb604607361 Mon Sep 17 00:00:00 2001 From: Ricky Chen <124005584+HackedRico@users.noreply.github.com> Date: Fri, 28 Aug 2026 08:23:25 -0400 Subject: [PATCH] fix(mcp): default the CTI Pipeline tool server to off The CTI Pipeline server was ticked on for every new Plan and Execute session, spawning the pipeline subprocess and loading its tools even when the run never touched CTI. Ship it as an opt-in optional server instead: the sidebar checkbox starts unchecked, and the chat view still turns it on automatically when STIX files are selected. --- app/discovery/servers.py | 2 +- app/workflows/plan_execute.py | 10 ++++------ mcp_server.py | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/discovery/servers.py b/app/discovery/servers.py index 15eb4ae..f70d0ea 100644 --- a/app/discovery/servers.py +++ b/app/discovery/servers.py @@ -57,7 +57,7 @@ def discover_mcp_servers(plugins_root: Path) -> dict: if cti_pipeline_path.exists(): cti_metadata = _safe_load_metadata(cti_pipeline_path) or { "display_name": "CTI Pipeline", - "default_enabled": True, + "default_enabled": False, "description": ( "CTI ingest -> STIX -> adversary -> " "-> operation -> detection-validation tools." diff --git a/app/workflows/plan_execute.py b/app/workflows/plan_execute.py index 0cea98a..419e506 100644 --- a/app/workflows/plan_execute.py +++ b/app/workflows/plan_execute.py @@ -188,11 +188,9 @@ async def run(adversary_emulation_task: str, lm_obj=None, rag_context=None, # Resolve which MCP servers to spawn if not enabled_servers: - # Default to both caldera_core and cti_pipeline so the planner has - # the full CTI -> STIX -> deploy -> operation -> detections toolset - # out of the box. cti_pipeline is filtered out below if its server - # file is missing (graceful fall-back to caldera_core-only mode). - enabled_servers = ["caldera_core", "cti_pipeline"] + # Default to caldera_core only. cti_pipeline is opt-in: the GUI ticks + # it on when STIX is selected, and callers can pass it explicitly. + enabled_servers = ["caldera_core"] if server_registry is None: # Fallback used only when run() is invoked without a registry (e.g. tests). # mcp_server.py lives one directory up after the workflows/ split. @@ -210,7 +208,7 @@ async def run(adversary_emulation_task: str, lm_obj=None, rag_context=None, "path": cti_pipeline_server_path, "metadata": { "display_name": "CTI Pipeline", - "default_enabled": True, + "default_enabled": False, "description": ( "CTI ingest -> STIX -> adversary -> " "deploy -> operation -> detection-validation tools." diff --git a/mcp_server.py b/mcp_server.py index 105a47f..c9fc579 100644 --- a/mcp_server.py +++ b/mcp_server.py @@ -111,7 +111,7 @@ def _resolve_pipeline_file(path_value: str, *, data_subdirs: tuple[str, ...] = ( MCP_METADATA = { "id": "cti_pipeline", "display_name": "CTI Pipeline", - "default_enabled": True, + "default_enabled": False, "description": ( "End-to-end CTI ingest tools: PDF/HTML -> STIX 2.1 bundle -> " "adversary -> operation "