Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
18 changes: 10 additions & 8 deletions src/uipath_mcp/_cli/_runtime/_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Comment on lines +263 to +268
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The string literal "UIPATH_FOLDER_KEY" is repeated. Extract it into a module-level constant (e.g. FOLDER_KEY_ENV_VAR) to avoid duplication and typos.

Suggested change
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.",
folder_key = os.environ.get(FOLDER_KEY_ENV_VAR)
if not folder_key:
raise UiPathMcpRuntimeError(
"REGISTRATION_ERROR",
f"No {FOLDER_KEY_ENV_VAR} environment variable set.",
f"Please set the {FOLDER_KEY_ENV_VAR} environment variable.",

Copilot uses AI. Check for mistakes.
UiPathErrorCategory.USER,
)

initialization_successful = False
tools_result = None
server_stderr_output = ""
Expand Down Expand Up @@ -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",
Expand Down