UiPath Documentation
uipath-cli
latest
false
UiPath-CLI-Benutzerhandbuch
Wichtig :
Dieser Inhalt wurde maschinell übersetzt. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

UIP-MCP

Syntax und Optionen für „uip mcp“, der UiPath CLI als Model Context Protocol-Server für MCP-fähige Clients verfügbar macht.

uip mcp macht die CLI als Modellkontextprotokollserver verfügbar, sodass MCP-fähige Clients (Claude Desktop, Cursor, VS Code MCP-Hosts usw.) einen beliebigen uip -Unterbefehl als Tool aufrufen können.

Hinweis:

Fähigkeiten sind der Hauptpfad, um KI-Codierungsagenten die Verwendung der UiPath CLI beizubringen – siehe uip skills und Fähigkeiten. MCP wird als Alternative für Clients bereitgestellt, die keine Fähigkeiten unterstützen oder einen MCP-Stil-Aufruf für Tools bevorzugen. Wenn Ihr Agent Fähigkeiten unterstützt, bevorzugen Sie Fähigkeiten.

Zusammenfassung​

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 tools it exposes to clients run any CLI command and return its output. Exit codes follow the standard contract.

UIP-MCP-Server​

Startet den MCP-Server auf Studio (JSON-RPC durch Newline-Delimited). Es gibt keinen Netzwerk-Listener, keinen HTTP-Transport und keine Portkonfiguration – Studio ist der einzige unterstützte Transport in 1.x.

Argumente​

Keine.

Optionen​

Keines. Der Server wird ausgeführt, bis der Studio-Transport vom Client geschlossen wird (normalerweise, wenn die Hostanwendung beendet wird).

Verhalten​

  • The server advertises two tools:
    • run_command, for AI models, takes one argument:
      • command (string) — The CLI command to run, without the uip prefix. Example: "login status --output json". The server splits the string on whitespace, keeping quoted runs together, and appends --output json.
    • run_argv, for programs that already hold the command as an argument list, takes one argument:
      • args (array of strings) — The command's arguments, one per element, without the uip prefix. Example: ["is", "connections", "list", "--output", "json"]. Each element is passed through as given, so values with spaces or quotes are safe. Nothing is appended, so pass your own --output.
  • Der Server listet jeden installierten uip -Unterbefehl beim Start auf und enthält einen gerenderten Befehlskatalog in der Beschreibung des MCP-Tools. Die Unterbefehle mcp und help werden von diesem Katalog ausgeschlossen – der Client kann den Server nicht auffordern, einen anderen MCP-Server zu starten.
  • Calls to both tools run one at a time.
  • On each run_command call, the CLI runs the requested command 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 flagged isError: true and prefixed with Error (exit code N):.

Beispiel (Starten des Servers über eine Shell – normalerweise startet Ihr MCP-Client dies für Sie):

uip mcp serve
uip mcp serve

Konfigurieren eines MCP-Clients​

Alle Konfigurationen verwenden denselben Befehl/jede Argumente. Der Servername (uipath unten) ist beliebig.

Claude Desktop – Bearbeiten Sie 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"]
    }
  }
}

Starten Sie Claude Desktop nach dem Speichern neu.

Claude Code – über die CLI hinzufügen:

claude mcp add uipath -- uip mcp serve
claude mcp add uipath -- uip mcp serve

Cursor – Bearbeiten Sie .cursor/mcp.json (projekt-lokal) oder die globale MCP-Konfiguration des Cursors:

{
  "mcpServers": {
    "uipath": {
      "command": "uip",
      "args": ["mcp", "serve"]
    }
  }
}
{
  "mcpServers": {
    "uipath": {
      "command": "uip",
      "args": ["mcp", "serve"]
    }
  }
}

VS-Code – .vscode/mcp.json bearbeiten:

{
  "servers": {
    "uipath": {
      "command": "uip",
      "args": ["mcp", "serve"]
    }
  }
}
{
  "servers": {
    "uipath": {
      "command": "uip",
      "args": ["mcp", "serve"]
    }
  }
}

Lebenszyklus​

Der MCP-Server hat keinen eigenständigen Stoppbefehl. Er ist ein untergeordneter Prozess des MCP-Clients und wird beendet, wenn:

  • Der Client schließt die Studio-Verbindung,
  • Die Hostanwendung wird beendet oder
  • entfernen Sie den Servereintrag aus der Konfiguration des Clients und laden Sie neu.

Authentifizierung und Mandantenkontext​

uip mcp serve does not manage credentials. Every run_command and run_argv 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. Refer to Exit codes.

Datenform​

Toolergebnisse folgen dem MCP-Tool-Aufrufvertrag. Bei Erfolg:

{
  "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 command's JSON output.

A run_argv result returns stdout, stderr, and the exit code as separate fields, both as structuredContent and as the same object serialized in text. A non-zero exit is reported in exitCode, and isError is never set:

{
  "content": [
    { "type": "text", "text": "{\"stdout\":\"…\",\"stderr\":\"\",\"exitCode\":0}" }
  ],
  "structuredContent": { "stdout": "…", "stderr": "", "exitCode": 0 }
}
{
  "content": [
    { "type": "text", "text": "{\"stdout\":\"…\",\"stderr\":\"\",\"exitCode\":0}" }
  ],
  "structuredContent": { "stdout": "…", "stderr": "", "exitCode": 0 }
}

Überlegungen​

  • Request JSON from run_argv calls. run_command appends --output json to every command. run_argv appends nothing, so include --output json in args when the caller parses the output.
  • No filtering of destructive commands. The run_command and run_argv tools can invoke any uip subcommand, including logout, tools uninstall, and tools that mutate Orchestrator state. Treat the MCP server as an authenticated shell and scope the agent accordingly.
  • help und mcp sind im Katalog ausgeblendet , können aber dennoch vom Client aufgerufen werden. Nichts verhindert, dass mcp serve rekursiv durch ein anderes run_command aufgerufen wird; Dies ist in der Praxis ein No-OP, da der äußere Server Studio steuert.
  • uip skills – Der primäre KI-Integrationspfad.
  • Fähigkeiten – warum Fähigkeiten für die Erneuerung von Agents dem unformatierten MCP-Zugriff vorzuziehen sind.
  • Authentifizierung – Die Sitzung run_command erbt diese.
  • Globale Optionen – --output json innerhalb von MCP-Aufrufen.

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support(opens in new window)

Möchten Sie lernen? UiPath Academy(opens in new window)

Haben Sie Fragen? UiPath-Forum(opens in new window)

Auf dem neuesten Stand bleiben