- Überblick
- Erste Schritte
- Konzepte
- Using UiPath CLI
- Anleitungen
- CI/CD recipes
- Befehlsreferenz
- Überblick
- Exitcodes
- Global options
- uip codedagent
- uip docsai
- add-test-data-entity
- add-test-data-queue
- add-test-data-variation
- analyze
- build
- Ein Projekt erstellen
- diff
- find-activities
- get-analyzer-rules
- get-default-activity-xaml
- get-errors
- get-manual-test-cases
- get-manual-test-steps
- get-versions
- get-workflow-example
- indicate-application
- indicate-element
- inspect-package
- install-data-fabric-entities
- install-or-update-packages
- list-data-fabric-entities
- list-workflow-examples
- pack
- restore
- run-file
- search-templates
- start-studio
- stop-execution
- uia
- uip traces
- Migration
- Reference & support
UiPath CLI user guide
uip mcp exposes the CLI as a Model Context Protocol server, letting MCP-aware clients (Claude Desktop, Cursor, VS Code MCP hosts, etc.) invoke any uip subcommand as a tool.
Skills are the primary path for teaching AI coding agents to use the UiPath CLI — see uip skills and Skills. MCP is provided as an alternative for clients that do not support skills or that prefer MCP-style tool invocation. If your agent supports skills, prefer skills.
Synopsis
uip mcp serve
uip mcp serve
uip mcp serve honors the global options (--output, --output-filter, --log-level, --log-file) for the server process itself; the tool it exposes to clients accepts any CLI command string and returns its combined stdout/stderr. Exit codes follow the standard contract.
uip mcp serve
Starts the MCP server on stdio (newline-delimited JSON-RPC). There is no network listener, no HTTP transport, and no port configuration — stdio is the only supported transport in 1.x.
Arguments: none.
Options: none. The server runs until the stdio transport is closed by the client (usually when the host application quits).
Behavior:
- The server advertises a single tool,
run_command, which takes one argument:command(string) — The CLI command to run, without theuipprefix. Example:"login status --output json".
- The server enumerates every installed
uipsubcommand at startup and includes a rendered command catalog in the MCP tool's description.mcpandhelpsubcommands are excluded from that catalog — the client cannot ask the server to start another MCP server. - On each
run_commandcall, the CLI runs the requested command in a child invocation and returns the combined stdout/stderr. If the child exits non-zero, or if it wrote an error envelope to stderr with a zero exit code (a rare case where a command reports failure without changing the exit code), the result is flaggedisError: trueand prefixed withError (exit code N):.
Example (starting the server from a shell — normally your MCP client launches this for you):
uip mcp serve
uip mcp serve
Configuring an MCP client
All configurations use the same command/args. The server name (uipath below) is arbitrary.
Claude Desktop — edit claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"uipath": {
"command": "uip",
"args": ["mcp", "serve"]
}
}
}
{
"mcpServers": {
"uipath": {
"command": "uip",
"args": ["mcp", "serve"]
}
}
}
Restart Claude Desktop after saving.
Claude Code — add via its CLI:
claude mcp add uipath -- uip mcp serve
claude mcp add uipath -- uip mcp serve
Cursor — edit .cursor/mcp.json (project-local) or the Cursor global MCP config:
{
"mcpServers": {
"uipath": {
"command": "uip",
"args": ["mcp", "serve"]
}
}
}
{
"mcpServers": {
"uipath": {
"command": "uip",
"args": ["mcp", "serve"]
}
}
}
VS Code — edit .vscode/mcp.json:
{
"servers": {
"uipath": {
"command": "uip",
"args": ["mcp", "serve"]
}
}
}
{
"servers": {
"uipath": {
"command": "uip",
"args": ["mcp", "serve"]
}
}
}
Lifecycle
The MCP server has no standalone stop command. It lives as a child process of the MCP client and exits when:
- the client closes the stdio connection,
- the host application quits, or
- you remove the server entry from the client's config and reload.
Authentication and tenant context
uip mcp serve does not manage credentials. Every run_command invocation reads the same stored session as an interactive shell would — so you must have run uip login separately before asking the agent to call commands that require auth. If no session exists, the tool result will contain the usual AuthenticationError payload (see Exit codes).
Data shape
Tool results follow the MCP tool-call contract. On success:
{
"content": [
{ "type": "text", "text": "<combined stdout/stderr>" }
],
"isError": false
}
{
"content": [
{ "type": "text", "text": "<combined stdout/stderr>" }
],
"isError": false
}
On failure, isError is true and text is prefixed with Error (exit code N):. The inner text is the normal CLI output (JSON if the caller requested --output json, otherwise the default format).
Überlegungen
- Always request JSON from inside MCP calls. Pass
--output jsonin thecommandstring so the agent receives structured data instead of tables. - No filtering of destructive commands. The
run_commandtool can invoke anyuipsubcommand, includinglogout,tools uninstall, and tools that mutate Orchestrator state. Treat the MCP server as an authenticated shell and scope the agent accordingly. helpandmcpare hidden from the catalog but can still be invoked by the client. Nothing preventsmcp servefrom being called recursively through anotherrun_command; this is a no-op in practice because the outer server controls stdio.
Related
uip skills— primary AI integration path.- Skills — why skills are preferred over raw MCP access for agent ergonomics.
- Authentication — the session
run_commandinherits. - Global options —
--output jsoninside MCP calls.