diff --git a/gns3server/agent/gns3_copilot/gns3_client/connector_factory.py b/gns3server/agent/gns3_copilot/gns3_client/connector_factory.py index a2144b2b9..e878ae911 100644 --- a/gns3server/agent/gns3_copilot/gns3_client/connector_factory.py +++ b/gns3server/agent/gns3_copilot/gns3_client/connector_factory.py @@ -29,6 +29,10 @@ GNS3 Connector Factory Module This module provides factory functions for creating Gns3Connector instances with JWT token authentication and context-aware configuration management. +⚠️ WARNING: This module is shared with the MCP (Model Context Protocol) service. +The get_gns3_connector() function is used by both gns3-copilot and MCP. +Modifications must be tested with BOTH. + Features: - Context variable based request-scoped data management (JWT tokens, LLM config) diff --git a/gns3server/agent/gns3_copilot/gns3_client/custom_gns3fy.py b/gns3server/agent/gns3_copilot/gns3_client/custom_gns3fy.py index 3f714fd36..6e30af017 100644 --- a/gns3server/agent/gns3_copilot/gns3_client/custom_gns3fy.py +++ b/gns3server/agent/gns3_copilot/gns3_client/custom_gns3fy.py @@ -29,6 +29,10 @@ Adapted gns3fy module for GNS3-Copilot This module is based on the upstream gns3fy project (https://github.com/davidban77/gns3fy). +⚠️ WARNING: This module is shared with the MCP (Model Context Protocol) service. +The Gns3Connector class is used by MCP handlers to make HTTP calls. +Modifications to this file must be tested with BOTH gns3-copilot AND MCP. + Modifications made for GNS3-Copilot: - Adjusted pydantic usages and dataclass configuration to reduce dependency conflicts with langchain (pydantic version/api differences) diff --git a/gns3server/agent/gns3_copilot/gns3_client/gns3_topology_reader.py b/gns3server/agent/gns3_copilot/gns3_client/gns3_topology_reader.py index 5ec0f6935..8ecee9409 100644 --- a/gns3server/agent/gns3_copilot/gns3_client/gns3_topology_reader.py +++ b/gns3server/agent/gns3_copilot/gns3_client/gns3_topology_reader.py @@ -30,6 +30,10 @@ This module provides a LangChain BaseTool to retrieve the topology of a specific GNS3 project by project ID. Returns nodes, links, and project metadata. +⚠️ WARNING: This module is shared with the MCP (Model Context Protocol) service. +GNS3TopologyTool._run() is called by MCP device config handlers. +The jwt_token/url parameters were added for MCP compatibility. +Modifications must be tested with BOTH gns3-copilot AND MCP. """ import copy diff --git a/gns3server/agent/gns3_copilot/tools_v2/config_tools_nornir.py b/gns3server/agent/gns3_copilot/tools_v2/config_tools_nornir.py index 7bce576ee..41ed58f9d 100644 --- a/gns3server/agent/gns3_copilot/tools_v2/config_tools_nornir.py +++ b/gns3server/agent/gns3_copilot/tools_v2/config_tools_nornir.py @@ -26,6 +26,11 @@ This module provides a tool to execute configuration commands on multiple devices in a GNS3 topology using Nornir. + +⚠️ WARNING: This module is shared with the MCP (Model Context Protocol) service. +ExecuteMultipleDeviceConfigCommands._run() is called by the MCP device_config_send handler. +The jwt_token/url parameters were added for MCP compatibility. +Modifications must be tested with BOTH gns3-copilot AND MCP. """ import json diff --git a/gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py b/gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py index 7e0061ceb..8fa056650 100644 --- a/gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py +++ b/gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py @@ -26,6 +26,11 @@ This module provides a tool to execute display commands on multiple devices in a GNS3 topology using Nornir. + +⚠️ WARNING: This module is shared with the MCP (Model Context Protocol) service. +ExecuteMultipleDeviceCommands._run() is called by the MCP device_command_run handler. +The jwt_token/url parameters were added for MCP compatibility. +Modifications must be tested with BOTH gns3-copilot AND MCP. """ import json diff --git a/gns3server/agent/gns3_copilot/tools_v2/vpcs_tools_netmiko.py b/gns3server/agent/gns3_copilot/tools_v2/vpcs_tools_netmiko.py index b7bb3d661..221bf9bed 100644 --- a/gns3server/agent/gns3_copilot/tools_v2/vpcs_tools_netmiko.py +++ b/gns3server/agent/gns3_copilot/tools_v2/vpcs_tools_netmiko.py @@ -26,6 +26,11 @@ """ This module provides a tool to execute commands on VPCS devices in a GNS3 topology using Nornir with Netmiko. + +⚠️ WARNING: This module is shared with the MCP (Model Context Protocol) service. +VPCSCommands._run() is called by the MCP vpcs_config_set handler. +The jwt_token/url parameters were added for MCP compatibility. +Modifications must be tested with BOTH gns3-copilot AND MCP. """ import json diff --git a/gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py b/gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py index a5c950150..597fd9f64 100644 --- a/gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py +++ b/gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py @@ -25,6 +25,11 @@ """ Public module for getting device port information from GNS3 topology + +⚠️ WARNING: This module is shared with the MCP (Model Context Protocol) service. +get_device_ports_from_topology() is called by MCP device config handlers. +The jwt_token/url parameters were added for MCP compatibility. +Modifications must be tested with BOTH gns3-copilot AND MCP. """ import logging