UiPath Documentation
uipath-cli
latest
false
Guía del usuario de UiPath CLI
Importante :
Este contenido se ha traducido mediante traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

mcp de uip

Sintaxis y opciones para `uip mcp`, que expone UiPath CLI como un servidor de protocolo de contexto de modelo para clientes compatibles con MCP.

uip mcp la CLI como un servidor de protocolo de contexto de modelo , lo que permite a los clientes compatibles con MCP (Claude Desktop, Cursor, hosts MCP de VS Code, etc.) invocar cualquier subcomando uip como herramienta.

Nota:

Las habilidades son la ruta principal para enseñar a los agentes de codificación de IA a utilizar UiPath CLI — consulta uip skills y Habilidades. MCP se proporciona como una alternativa para los clientes que no admiten habilidades o que prefieren la invocación de herramientas de estilo MCP. Si tu agente admite habilidades, da preferencia a las habilidades.

Sinopsis​

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.

servicio de mcp de uip​

Inicia el servidor MCP en stdio (JSON-RPC delimitado por saltos de línea). No hay escucha de red, transporte HTTP ni configuración de puertos: stdio es el único transporte compatible en 1.x.

Argumentos​

Nada.

Opciones​

Ninguno. El servidor se ejecuta hasta que el cliente cierra el transporte stdio (normalmente cuando se cierra la aplicación host).

Comportamiento​

  • 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.
  • El servidor enumera cada subcomando uip instalado al inicio e incluye un catálogo de comandos representados en la descripción de la herramienta MCP. Los subcomandos mcp y help se excluyen de ese catálogo: el cliente no puede pedir al servidor que inicie otro servidor MCP.
  • 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):.

Ejemplo (iniciar el servidor desde un shell; normalmente tu cliente MCP inicia esto por ti):

uip mcp serve
uip mcp serve

Configurar un cliente MCP​

Todas las configuraciones utilizan el mismo comando/argumentos. El nombre del servidor (uipath a continuación) es arbitrario.

Claude Desktop — editar 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"]
    }
  }
}

Reinicia Claude Desktop después de guardar.

Claude Code : añadir a través de su CLI:

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

Cursor : edita .cursor/mcp.json (proyecto-local) o la configuración global de MCP del Cursor:

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

VS Code — editar .vscode/mcp.json:

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

Ciclo de vida​

El servidor MCP no tiene un comando de detención independiente. Vive como un proceso secundario del cliente MCP y sale cuando:

  • el cliente cierra la conexión stdio,
  • la aplicación host se cierra, o
  • eliminas la entrada del servidor de la configuración del cliente y vuelves a cargar.

Contexto de autenticación y tenant​

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.

Forma de datos​

Los resultados de la herramienta siguen el contrato de llamada de herramienta de MCP. En caso de éxito:

{
  "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 }
}

Consideraciones​

  • 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 y mcp están ocultos en el catálogo , pero el cliente puede seguir invocándolos. Nada impide que mcp serve se llame de forma recursiva a través de otro run_command; esto es un no-op en la práctica porque el servidor externo controla stdio.
  • uip skills : ruta de integración de IA principal.
  • Habilidades : por qué se prefieren las habilidades al acceso MCP sin formato para la ergonomía del agente.
  • Autenticación : la sesión run_command hereda.
  • Opciones globales : --output json dentro de las llamadas de MCP.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte(opens in new window)

¿Quiere aprender? UiPath Academy(opens in new window)

¿Tiene alguna pregunta? Foro de UiPath(opens in new window)

Manténgase actualizado