Python MCP server for UiPath Orchestrator — 53 tools, async, typed, production-ready
Project description
UiPath Orchestrator MCP Server (Python)
A production-quality Model Context Protocol (MCP) server that connects AI assistants (Claude, Cursor, etc.) to UiPath Orchestrator. Built in Python with full async support, structured retry logic, and 53 tools — significantly more capable than the original JavaScript version.
Why Python? Why better?
| Dimension | JS Version | This Python Version |
|---|---|---|
| HTTP client | node-fetch, no pooling | httpx HTTP/2 + connection pooling |
| Retry logic | None | tenacity exponential+jitter, Retry-After |
| Token caching | Per-instance (race-unsafe) | Module-level asyncio.Lock (thundering-herd safe) |
| Config validation | process.env checks | Pydantic Settings, SecretStr, @model_validator |
| Data models | TypeScript interfaces | Pydantic v2 with field aliases |
| Error types | String errors | Structured UiPathError(message, status_code, error_code) |
| Pagination | None | paginate() async generator + collect_all() |
| Logging | console.log (stdout!) | loguru → stderr, JSON mode for prod |
| Startup errors | Stack traces | rich Panel with actionable instructions |
| Tool count | 30 | 53 (23 new tools) |
| Tests | Unknown | pytest-asyncio + respx transport mocking |
Quick Start
Option A — Install from PyPI (recommended)
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh # macOS/Linux
# or: pip install uv
# Install the package
uv tool install uipath-orchestrator-mcp
# Create your .env file
curl -o .env https://raw.githubusercontent.com/your-org/uipath-orchestrator-mcp/main/.env.example
# Edit .env with your UiPath credentials, then:
uipath-mcp
Option B — From source
git clone https://github.com/your-org/uipath-orchestrator-mcp.git
cd uipath-orchestrator-mcp
uv sync
cp .env.example .env
# Edit .env with your UiPath credentials
uv run uipath-mcp
Inspect with MCP Inspector
uv run mcp dev src/uipath_mcp/server.py
Authentication
Set AUTH_MODE in your .env to one of:
Cloud OAuth2 (AUTH_MODE=cloud) — recommended for Automation Cloud
Create an External Application in Automation Cloud → Admin → External Apps.
AUTH_MODE=cloud
UIPATH_CLIENT_ID=your_client_id
UIPATH_CLIENT_SECRET=your_client_secret
UIPATH_ORG_NAME=your_org_slug
UIPATH_TENANT_NAME=DefaultTenant
On-Premise (AUTH_MODE=on_prem)
AUTH_MODE=on_prem
UIPATH_BASE_URL=https://myserver.company.com/orchestrator
UIPATH_USERNAME=admin@company.com
UIPATH_PASSWORD=your_password
UIPATH_TENANT_NAME=Default
Personal Access Token (AUTH_MODE=pat)
AUTH_MODE=pat
UIPATH_BASE_URL=https://cloud.uipath.com/org/tenant/orchestrator_
UIPATH_PAT=your_personal_access_token
UIPATH_TENANT_NAME=DefaultTenant
Claude Desktop / Cursor Configuration
If installed via PyPI (uv tool install uipath-orchestrator-mcp)
{
"mcpServers": {
"uipath": {
"command": "uipath-mcp",
"env": {
"AUTH_MODE": "cloud",
"UIPATH_CLIENT_ID": "your_client_id",
"UIPATH_CLIENT_SECRET": "your_client_secret",
"UIPATH_ORG_NAME": "your_org",
"UIPATH_TENANT_NAME": "DefaultTenant",
"UIPATH_FOLDER_ID": "1"
}
}
}
}
If running from source
{
"mcpServers": {
"uipath": {
"command": "uv",
"args": [
"run",
"--project",
"/path/to/uipath-orchestrator-mcp",
"uipath-mcp"
],
"env": {
"AUTH_MODE": "cloud",
"UIPATH_CLIENT_ID": "your_client_id",
"UIPATH_CLIENT_SECRET": "your_client_secret",
"UIPATH_ORG_NAME": "your_org",
"UIPATH_TENANT_NAME": "DefaultTenant",
"UIPATH_FOLDER_ID": "1"
}
}
}
}
Available Tools (53 total)
Job Management (12)
list_jobs— Filter by state/process, paginate, orderlist_running_jobs— Shortcut: only Running jobslist_failed_jobs— Shortcut: Faulted jobs with date filterlist_jobs_by_process— All jobs for a process nameget_job— Full details of one jobget_job_output— Parsed output arguments from completed jobget_job_statistics— Success/failure rates for a processget_job_logs— Execution logs for a jobstart_job— Start a process (auto-looks up release key)stop_job— Stop with SoftStop or Killbulk_stop_jobs⭐ — Stop multiple jobs concurrentlywait_for_job⭐ — Poll until terminal state with progress reporting
Queue Management (10)
list_queues,get_queueadd_queue_item,bulk_add_queue_items⭐ (up to 1000 items at once)list_queue_items,get_queue_itemupdate_queue_item_status⭐,delete_queue_item⭐get_queue_stats,retry_failed_items⭐
Robot & Machine Management (8)
list_robots,get_robot,list_available_robots⭐list_robot_sessions⭐,list_robot_logslist_machines,get_machine,get_robot_license_info⭐
Asset Management (7)
list_assets,get_assetcreate_asset⭐,update_asset⭐,delete_asset⭐get_robot_asset,set_credential_asset⭐
Process Schedules (6) ⭐ All new
list_schedules,get_scheduleenable_schedule,disable_schedule,set_schedule_enabledget_next_executions
Folder Management (5) ⭐ All new
list_folders,get_folder,list_sub_folderslist_folder_robots,get_folder_stats
Analytics (6)
get_jobs_stats,get_queue_processing_statsget_license_usage,get_robot_utilizationget_tenant_stats,get_error_patterns⭐
Audit Logs (4)
list_audit_logs,get_audit_log_detail⭐list_robot_logs,export_audit_logs⭐
Webhooks (4) ⭐ All new
list_webhooks,create_webhook,update_webhook,delete_webhook
⭐ = New in Python version (not in JS original)
Resources
Read-only resources available to AI clients:
uipath://config/server— Active server configuration (no secrets)uipath://help/odata-filters— OData filter syntax referenceuipath://help/tool-overview— Quick reference of all tools
Configuration Reference
| Variable | Description | Default |
|---|---|---|
AUTH_MODE |
cloud | on_prem | pat | cloud |
UIPATH_CLIENT_ID |
Cloud app client ID | — |
UIPATH_CLIENT_SECRET |
Cloud app client secret | — |
UIPATH_ORG_NAME |
Organization slug | — |
UIPATH_TENANT_NAME |
Tenant name | — |
UIPATH_BASE_URL |
On-prem Orchestrator URL | — |
UIPATH_USERNAME |
On-prem username | — |
UIPATH_PASSWORD |
On-prem password | — |
UIPATH_PAT |
Personal Access Token | — |
UIPATH_FOLDER_ID |
Default folder ID | — |
MCP_TRANSPORT |
stdio | sse | streamable-http | stdio |
MCP_HOST |
Host for HTTP transport | 127.0.0.1 |
MCP_PORT |
Port for HTTP transport | 8000 |
HTTP_TIMEOUT |
Request timeout (seconds) | 30.0 |
RETRY_MAX_ATTEMPTS |
Max retry attempts | 3 |
LOG_LEVEL |
DEBUG | INFO | WARNING | ERROR | INFO |
LOG_JSON |
Structured JSON logs | false |
Development
# Install with dev dependencies
uv sync --extra dev
# Run tests
uv run pytest
# Run linter
uv run ruff check src/ tests/
# Type check
uv run mypy src/
Architecture
src/uipath_mcp/
├── server.py FastMCP + lifespan (initialises client once)
├── config.py Pydantic Settings (all env vars, cross-field validation)
├── auth.py 3 auth strategies + module-level TokenCache with asyncio.Lock
├── client.py httpx AsyncClient + tenacity retry + ODataParams builder + paginate()
├── models.py Pydantic v2 models (Job, Queue, Robot, Asset, ...)
├── resources.py MCP resources (config, help guides)
└── tools/
├── jobs.py analytics.py
├── queues.py audit.py
├── robots.py schedules.py
├── assets.py folders.py
└── webhooks.py
Token refresh uses double-checked locking to prevent thundering-herd refreshes:
if cache.is_valid: return cache.access_token # fast path (99% of calls)
async with cache._lock: # slow path
if cache.is_valid: return cache.access_token # re-check after lock
token = await _do_refresh() # only ONE coroutine reaches here
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uipath_orchestrator_mcp-1.0.0.tar.gz.
File metadata
- Download URL: uipath_orchestrator_mcp-1.0.0.tar.gz
- Upload date:
- Size: 105.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc55b23b422537b04d1bf1d294c221a791ac1432a5bb598ddde0d7e96d3b78c8
|
|
| MD5 |
777d0b59f98e5a6b7a319aa7ead1ea92
|
|
| BLAKE2b-256 |
4b9941eaa05b31400468f0769edf544963d8d4072d72b6475fd7817abee537a0
|
File details
Details for the file uipath_orchestrator_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: uipath_orchestrator_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 41.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be1e3cad0076eaaa0832208f33d816c4bb23fcc63546dd1405a2a3e5f21dd402
|
|
| MD5 |
208536096b4042ec4dd22a16c3aac186
|
|
| BLAKE2b-256 |
3118e8587f88564523e3bda547bf7fd5d6761d9e1dfa7f32a7a5ead167b6dc9c
|