UiPath Documentation
uipath-cli
latest
false
UiPath CLI ユーザー ガイド
重要 :
このコンテンツは機械翻訳によって処理されています。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

uip mcp

「uip mcp」の構文とオプション - UiPath CLI を MCP 対応クライアント用のモデル コンテキスト プロトコル サーバーとして公開します。

uip mcp では、CLI を モデル コンテキスト プロトコル サーバーとして公開し、MCP 対応クライアント (Claude Desktop、Cursor、VS Code MCP ホストなど) が任意の uip サブコマンドをツールとして呼び出すことができます。

注:

スキルは、AI コーディング エージェントに UiPath CLI の使用方法を教えるための主要なパスです。詳しくは、「uip skillsスキル」と「スキル」をご覧ください。MCPは、スキルをサポートしていないクライアントや、MCPスタイルのツール呼び出しを好むクライアントのための代替手段として提供されています。エージェントがスキルをサポートしている場合は、スキルを優先します。

概要​

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 serve​

stdio (改行で区切られた JSON-RPC) で MCP サーバーを起動します。ネットワークリスナー、HTTP トランスポート、ポート設定はありません — stdio は 1.x でサポートされている唯一のトランスポートです。

引数​

設定はありません。

オプション​

なし。サーバーは、stdio トランスポートがクライアントによって閉じられるまで (通常はホスト アプリケーションが終了するとき) 実行されます。

動作​

  • 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.
  • サーバーは、起動時にインストールされたすべての uip サブコマンドを列挙し、MCPツールの説明にレンダリングされたコマンドカタログを含めます。mcp サブコマンドと help サブコマンドはそのカタログから除外され、クライアントはサーバーに別の 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):.

例 (シェルからサーバーを起動する - 通常、MCPクライアントがこれを起動します):

uip mcp serve
uip mcp serve

MCP クライアントの構成​

すべての構成で同じコマンド/引数が使用されます。サーバー名(下記uipath )は任意です。

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

保存後、Claude Desktop を再起動します。

Claude Code — CLI を使用して追加します。

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

カーソル — .cursor/mcp.json (プロジェクトローカル) またはカーソルグローバル MCP 構成を編集します。

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

VS Code — 編集 .vscode/mcp.json:

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

ライフ サイクル​

MCP サーバーには、スタンドアロンの stop コマンドはありません。MCP クライアントの子プロセスとして存在し、次の場合に終了します。

  • クライアントが stdio 接続を閉じる。
  • ホスト アプリケーションが終了する、または
  • クライアントの構成からサーバー エントリを削除し、リロードします。

認証とテナント コンテキスト​

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.

データシェイプ​

ツールの結果は、MCP のツール呼び出しコントラクトに従います。成功について:

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

考慮事項​

  • 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とmcpはカタログで非表示になりますが、クライアントで呼び出すことはできます。mcp serveが別のrun_commandを介して再帰的に呼び出されることを妨げるものは何もありません。これは、外部サーバーがSTDIOを制御するため、実際には何もしません。
  • uip skills — AI 連携のプライマリ パスです。
  • スキル — エージェントの人間工学において、生の MCP アクセスよりもスキルが好まれる理由。
  • 認証 — run_command 継承するセッションです。
  • グローバル オプション — MCP 呼び出し内の --output json 。

このページは役に立ちましたか?

接続

ヘルプ リソース サポート(opens in new window)

学習する UiPath アカデミー(opens in new window)

質問する UiPath フォーラム(opens in new window)

最新情報を取得