Why connect Claude Code to UiPath
Teams building automations in UiPath Studio today face two parallel pressures. On one hand, the number of artefacts to maintain keeps growing - XAML workflows, project.json, Config.xlsx, PDDs, SDDs, TDDs, test reports. On the other, clients expect a new process to be designed, documented and handed over to production at a pace that manual analyst and developer effort simply cannot sustain.
Claude Code, combined with UiPath - accessible via the Model Context Protocol (MCP) and the official UiPath CLI - lets you offload to an AI agent the kind of work where hallucination is least dangerous: reading, validation, and generating documentation and reports. It does not replace the Studio developer. It sits alongside them as a reviewer and archivist that knows the project context and SNOK’s AI automation standards.
Below is the exact setup we use internally - from the first terminal command to a working claude + uip workflow in the project directory.

What Claude Code, MCP and the UiPath CLI are
Claude Code is Anthropic’s official CLI - an interactive agent run in the terminal that reads files, edits code and invokes tools within a project directory. A CLAUDE.md file at the root of the repository becomes its starting context - it knows the technology stack, naming conventions and applicable standards before it begins work.
Model Context Protocol (MCP) is an open standard through which Claude communicates with external systems - databases, SaaS tools, automation platform APIs. Each MCP server exposes a set of tools and resources that Claude uses as if they were built in. For an RPA team, this means the agent can read the list of processes in UiPath Orchestrator, check a job’s status, or fetch a workflow definition - without going through a browser.
The UiPath CLI (uip) is the official command-line tool for scripted control of UiPath Studio and Orchestrator - publishing packages, managing queues, running processes, exporting logs. Together with Claude Code, it gives developers an environment where one agent understands the project context, while the other (the CLI) actually performs operations on the platform.
Step 1 - Installing Claude Code
Baseline requirements: Node.js 18 or later and an active npm or npx. If you don’t have them, on macOS we use brew install node, on Windows the official installer from nodejs.org, and on Linux the distribution’s package or nvm.
macOS and Linux:
npm install -g @anthropic-ai/claude-code
claude --version
Windows (PowerShell as administrator):
npm install -g @anthropic-ai/claude-code
claude --version
After installation, run claude in the project directory. The first run will prompt you to log in - for an enterprise team we recommend a Claude Pro or Max account under an SNOK subscription, not an API key (easier access rotation and centralised control).
ISO note: access to Claude Code is subject to the onboarding/offboarding procedure under ISO 27001:2023. Every new user is entered into the access register, and logout is enforced when the engagement ends.
Step 2 - A CLAUDE.md file in the UiPath project
Before Claude Code looks at any workflow, it should know what project it is working in. A CLAUDE.md file at the root of the UiPath repository loads automatically at the start of every session. At SNOK we use a standardised template:
# Project: {Process name}
## Stack
- UiPath Studio 24.10 (Windows, VB.NET)
- REFramework (Dispatcher + Performer)
- Orchestrator: cloud.uipath.com / tenant: DefaultTenant
- .NET Framework 4.6.1
## Target applications
- SAP GUI 7.70 (FI-AP module)
- Outlook desktop
- Internal portal X (Chrome via UiAutomation.Activities)
## SNOK standard
- Naming: PascalCase for workflows, camelCase for arguments
- Logging: Info level for business steps, Trace for diagnostics
- Exceptions: BusinessRuleException -> retry 0, SystemException -> retry 3
- Hard-coded values: prohibited outside Config.xlsx
## What Claude does on this project
- Validates the PDD and generates an SDD/TDD draft
- Reviews XAML in QA mode with a RAG (red/amber/green) report
- Updates Config.xlsx according to the mapping table from the PDD
- Generates a regression test report
## What Claude does NOT do
- Does not generate raw XAML from scratch - risk of hallucinated activities
- Does not modify .nupkg files
- Does not push anything to Orchestrator without explicit confirmation
The last two sections - “What Claude does” and “What Claude does NOT do” - are critical. Without them, the agent will try to generate XAML using activities that are not present in the project package, and the developer wastes time dismantling code that does not work.
Step 3 - Installing and authorising the UiPath CLI
UiPath publishes the official CLI as an npm package:
npm install -g @uipath/cli
uip --version
Configuring the connection to Orchestrator uses environment variables or a .env file in the project directory:
UIPATH_URL = https://cloud.uipath.com
UIPATH_ORGANIZATION_NAME = snok
UIPATH_TENANT_NAME = DefaultTenant
UIPATH_CLIENT_ID = {service account client id}
UIPATH_CLIENT_SECRET = {service account secret - secret manager, not git}
Authorisation uses either a Personal Access Token (developer) or an External Application (service account for CI/CD). Production projects use the second option - a PAT tied to a named individual is entered in the risk register and requires rotation every 90 days.
Once configured, verify the connection:
uip cloud orchestrator list-folders
uip cloud orchestrator list-processes --folder Shared
If the commands return resource lists, the environment is ready.
Step 4 - Connecting UiPath via MCP
MCP gives Claude the ability to query the state of the platform without leaving the session. MCP server configuration depends on the chosen client - for Claude Code, we use an .mcp.json file in the project directory:
{
"mcpServers": {
"uipath": {
"command": "npx",
"args": ["-y", "@uipath/mcp-server"],
"env": {
"UIPATH_URL": "https://cloud.uipath.com",
"UIPATH_ORGANIZATION_NAME": "snok",
"UIPATH_TENANT_NAME": "DefaultTenant",
"UIPATH_CLIENT_ID": "${UIPATH_CLIENT_ID}",
"UIPATH_CLIENT_SECRET": "${UIPATH_CLIENT_SECRET}"
}
}
}
}
After restarting the session, claude detects the server automatically. In the terminal, questions can be asked in natural language - “list the processes in the Shared folder”, “show the last 10 failed jobs”, “give me a list of queues along with the number of pending items” - and the agent calls the relevant MCP tools in the background.
AI Act and NIS2 security note: at SNOK, every MCP server must pass an AI Security review before being admitted to a client project. We check the scope of the service account’s permissions (least-privilege principle), log every tool call, and never connect a server with write access to a production Orchestrator without a Human-in-the-Loop gate.
The full list of official MCP packages for UiPath is evolving dynamically - current package addresses should be checked each time in the UiPath Marketplace and in the agentic AI documentation before installing on a client environment.
Step 5 - The practical workflow in a project
After completing steps 1-4, the UiPath project directory looks as follows:
Invoice-Processing/
├── .claude/
│ ├── qa-gates.md <- QA gate definitions (RAG)
│ └── allowed-activities.md <- activity + NuGet whitelist
├── .mcp.json <- UiPath MCP configuration
├── CLAUDE.md <- project context
├── Main.xaml
├── Framework/
├── Workflows/
├── project.json
├── Data/
│ └── Config.xlsx
└── Documentation/
├── PDD-Invoice-Processing.docx
└── SDD-Invoice-Processing.docx
In a developer’s daily work, the session starts with claude in the project directory. Typical commands during a session:
- “Read the PDD and identify gaps in the business exception specification” - Claude compares the PDD content against the SNOK template and lists missing sections.
- “Generate an SDD draft based on the PDD and my CLAUDE.md” - the agent creates the document structure with a mapping to REFramework, architectural decisions and a Configuration section.
- “Run a QA review on the Process.xaml workflow” - Claude reads the XAML as XML and reports naming-convention violations, missing try/catch blocks, and hard-coded values.
- “Show the status of the Invoice-Processing process in Orchestrator” - via MCP, Claude queries UiPath and responds based on current data.
- “Propose an extension to Config.xlsx for keys needed to handle EUR currency” - the agent reads the existing Excel file, checks consistency with the workflow, and proposes entries.
QA gates - keeping hallucinations out of production
At SNOK we have adopted the principle that Claude Code in UiPath projects acts as a reviewer and documentarian, not an XAML generator. The reason is simple: UiPath activity syntax can be surprising, and a language model will readily propose an activity that does not exist in the selected package. The .claude/qa-gates.md file defines the gates that every artefact must pass before reaching the client:
- Pass 1 - Crash check. Does the XAML open in Studio? Are there any references to enums outside the imported packages?
- Pass 2 - Architecture check. Is the modularisation consistent with REFramework? Are naming and argument directions (In/Out/InOut) consistent with the SNOK standard?
- Pass 3 - Security check. Does the workflow contain hard-coded credentials, paths, or production URLs?
- Pass 4 - Documentation completeness. Are the PDD, SDD, TDD and Config.xlsx consistent? Is every key in Config.xlsx actually used?
Each pass ends with a report in one of three states: red (blocks handover), amber (requires justification from the developer), green (approved for handover). Claude fills in the report; a human - a Tech Lead or Test Manager - approves the result. This is the same pattern we use in automated testing in UiPath Test Cloud.
What’s next
The setup described here is the foundation. The next two steps worth taking after the first week of working with Claude Code on a UiPath project:
- Git pre-commit hooks - automatically running a QA review before every commit. A red status blocks the change from entering the repository.
- The
snok-uipathskill - a catalogue of SNOK rules for UiPath projects (REFramework, agentic AI, AI Trust Layer, governance), loaded by Claude into every session in our tooling. The skill is available to the SNOK team and to partners - it also covers the AI Security procedures required for agentic projects for clients subject to NIS2 and DORA.
The direction is clear: the coding agent is entering the enterprise not as a developer gadget, but as an element of a process with gates, audit trails and accountability. The sooner a team sets its own standards, the less it will have to clean up after AI once regulatory obligations tighten.
Would you like to see this in practice or discuss implementation at your company? Contact us - we respond within 48 hours.