# Authenticating with the MCP OAuth flow

> MCP clients that implement the [MCP Authorization specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization) can authenticate automatically through OAuth. The client handles the full discovery and authorization flow, so no manual token management is needed.

MCP clients that implement the [MCP Authorization specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization) can authenticate automatically through OAuth. The client handles the full discovery and authorization flow, so no manual token management is needed.

This authentication method is suitable for IDE-based MCP clients such as VS Code with GitHub Copilot.

## Prerequisites

* You have an MCP client that supports the MCP Authorization specification.
* You have the UiPath MCP Server URL.
* You have an account with the **Automation User**, **Automation Developer**, or **Folder Administrator** role in the folder containing the MCP Server.

## Configure VS Code or GitHub Copilot

1. Add the MCP Server to your VS Code settings or `mcp.json` file:

   ```json
   {
     "servers": {
       "my-server": {
         "type": "http",
         "url": "https://cloud.uipath.com/{org}/{tenant}/agenthub_/mcp/{folderKey}/{slug}"
       }
     }
   }
   ```

2. Open Copilot Chat, select **Configure tools**, and select your server.
3. The browser opens. Log in to UiPath.

## Result

The MCP client is authorized to call the MCP Server. Authorization persists across sessions because the IDE handles token refresh automatically.

## Other MCP clients

Support for additional MCP clients (such as Claude Desktop or Cursor) is being progressively added. For clients that are not yet supported through OAuth, use a [personal access token](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/authenticating-with-a-personal-access-token) with a Bearer token header instead.
