File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
src/uipath_mcp/_cli/_runtime Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11[project ]
22name = " uipath-mcp"
3- version = " 0.0.87 "
3+ version = " 0.0.88 "
44description = " UiPath MCP SDK"
55readme = { file = " README.md" , content-type = " text/markdown" }
66requires-python = " >=3.10"
@@ -83,4 +83,4 @@ addopts = "-ra -q"
8383name = " testpypi"
8484url = " https://test.pypi.org/simple/"
8585publish-url = " https://test.pypi.org/legacy/"
86- explicit = true
86+ explicit = true
Original file line number Diff line number Diff line change @@ -375,16 +375,25 @@ async def _register(self) -> None:
375375
376376 logger .info (client_info )
377377
378+ folder_key = os .environ .get ("UIPATH_FOLDER_KEY" )
379+ if not folder_key :
380+ raise UiPathMcpRuntimeError (
381+ "REGISTRATION_ERROR" ,
382+ "No UIPATH_FOLDER_KEY environment variable set." ,
383+ UiPathErrorCategory .USER ,
384+ )
385+
378386 # Register with UiPath MCP Server
379387 await self ._uipath .api_client .request_async (
380388 "POST" ,
381389 f"mcp_/mcp/{ self ._server .name } /runtime/start?runtimeId={ self ._runtime_id } " ,
382390 json = client_info ,
391+ headers = {"X-UIPATH-FolderKey" : folder_key },
383392 )
384393 logger .info ("Registered MCP Server type successfully" )
385394 except Exception as e :
386395 logger .error (f"Error during registration: { e } " )
387- if ( e .status_code == 400 ) :
396+ if e .status_code == 400 :
388397 logger .error (f"Error details: { e .response .text } " )
389398
390399 raise UiPathMcpRuntimeError (
You can’t perform that action at this time.
0 commit comments