Quickstart Guide: UiPath Coded MCP Servers¶
Introduction¶
This guide provides instructions for setting up and running a UiPath coded MCP Server.
Prerequisites¶
You need:
- Python 3.11 or higher
pip
oruv
package manager- A UiPath Automation Cloud account with appropriate permissions
- A UiPath Personal Access Token with Orchestrator API Access scopes
Creating a New Project¶
Use uv
for package management. To create a new project:
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
# Activate the virtual environment# For Windows PowerShell/ Windows CMD: .venv\Scripts\activate# For Windows Bash: source .venv/Scripts/activatesource .venv/bin/activate# Install the uipath packageuv add uipath-mcp
Create Your First UiPath Coded MCP Server¶
Create your first MCP server
β Created 'server.py' file.
β Created 'mcp.json' file.
β Created 'pyproject.toml' file.
π‘ Initialize project: uipath init
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Start 'math-server' as a self-hosted MCP server
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π‘ 1. Set UIPATH_FOLDER_PATH environment variable
π‘ 2. Start the server locally: uipath run math-server
Warning
uipath new command deletes all previous .py
files in the current directory.
This command creates the following files:
File Name | Description |
---|---|
server.py |
A sample MCP math server using FastMCP |
mcp.json |
Configuration file needed for coded UiPath MCP Servers. |
pyproject.toml |
Project metadata and dependencies as per PEP 518. |
Initialize Project¶
β Created '.env' file.
β Created 'uipath.json' file.
This command creates the following files:
File Name | Description |
---|---|
.env |
Environment variables and secrets (this file is not packed & published). |
uipath.json |
Input/output JSON schemas and bindings. |
Authenticate With UiPath¶
π If a browser window did not open, please open the following URL in your browser: [LINK]
π Select tenant:
0: Tenant1
1: Tenant2
Select tenant number: 0
Selected tenant: Tenant1
β Authentication successful.
Run the MCP Server¶
There are two ways to run your coded MCP server:
1. Running Locally (On-Prem)¶
When running the server locally, JSON-RPC requests are tunneled from UiPath servers to your local server. During startup, the local server automatically registers itself with UiPath.
Since MCP servers are folder-scoped in Orchestrator, you need to set the UIPATH_FOLDER_PATH
environment variable. To do this:
- Copy the folder path from your Orchestrator interface
- Add it to the
.env
file (created duringuipath init
) as:
HTTP Request: GET https://***/orchestrator_/api/FoldersNavigation/GetFoldersForCurrentUser?searchText=Agents&skip=0&take=20 "HTTP/1.1 200 OK"
Folder key: ***
Initializing client session...
Initialization successful
Registering server runtime ...
...
Verifying the Server¶
Once started successfully, your MCP server will appear in Orchestrator. Navigate to the MCP Servers tab in your configured folder:
You can inspect the available tools by clicking on the server:
Now we can connect to the server using any MCP client. See the Connecting to the MCP Server section.
2. Running on UiPath Automation Cloud¶
Info
This quickstart guide provides instructions for deploying the MCP Server in My Workspace folder. Choosing this folder simplifies the configuration process, as you wonβt need to manually handle the following:
-
Serverless machine allocation
-
Unattended robot permissions
-
Process creation (processes are automatically provisioned when a package is published to
My Workspace
)
If you prefer to deploy the MCP Server in a different folder, additional steps are required:
-
Create a process from the MCP Server package.
-
Ensure a serverless runtime (machine) is assigned to the target folder in Orchestrator.
-
Confirm that a user with unattended robot permissions is assigned to the target folder.
To deploy your MCP server to UiPath Automation Cloud, follow these steps:
(Optional) Customize the Package¶
Update author details in pyproject.toml
:
Package Your Project¶
Name : math-server
Version : 0.0.1
Description: Description for math-server project
Authors : John Doe
β Project successfully packaged.
Publish The MCP Server Package¶
β Package published successfully!
β ¦ Getting process information ...
π Process configuration link: [LINK]
π‘ Use the link above to configure any environment variables
After publishing, you can configure and manage your MCP server through the UiPath Automation Cloud interface:
Configure in UiPath Automation Cloud¶
- In
My Workspace
, navigate to the MCP Servers tab and click Add MCP Server
- In the configuration dialog:
- Select
Coded
as the server type - Choose the
math-server
process - Click Add to deploy the server
Once deployed, the server automatically starts and registers its available tools. You can monitor the job status in the MCP Server side panel.
Connecting to the MCP Server¶
You can connect to your MCP server using any MCP client. Here's what you need:
- MCP Server URL: Copy this from the UiPath MCP Servers page in Orchestrator
- Authentication: Use your Personal Access Token (PAT) with Orchestrator API Access scopes as authorization header
- Transport: Configure the client to use HTTP Streamable transport
Next Steps¶
Congratulations! You have successfully set up, created, published, and run a coded UiPath MCP Server. π
For more coded MCP samples, please refer to our samples section in GitHub.