diff --git a/pyproject.toml b/pyproject.toml index 34eb954..6dd948c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-mcp" -version = "0.0.88" +version = "0.0.89" description = "UiPath MCP SDK" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.10" diff --git a/src/uipath_mcp/_cli/_runtime/_runtime.py b/src/uipath_mcp/_cli/_runtime/_runtime.py index 58c146f..4705c78 100644 --- a/src/uipath_mcp/_cli/_runtime/_runtime.py +++ b/src/uipath_mcp/_cli/_runtime/_runtime.py @@ -259,6 +259,16 @@ async def _handle_signalr_close(self) -> None: async def _register(self) -> None: """Register the MCP server with UiPath.""" + + folder_key = os.environ.get("UIPATH_FOLDER_KEY") + if not folder_key: + raise UiPathMcpRuntimeError( + "REGISTRATION_ERROR", + "No UIPATH_FOLDER_KEY environment variable set.", + "Please set the UIPATH_FOLDER_KEY environment variable.", + UiPathErrorCategory.USER, + ) + initialization_successful = False tools_result = None server_stderr_output = "" @@ -375,14 +385,6 @@ async def _register(self) -> None: logger.info(client_info) - folder_key = os.environ.get("UIPATH_FOLDER_KEY") - if not folder_key: - raise UiPathMcpRuntimeError( - "REGISTRATION_ERROR", - "No UIPATH_FOLDER_KEY environment variable set.", - UiPathErrorCategory.USER, - ) - # Register with UiPath MCP Server await self._uipath.api_client.request_async( "POST",