# Connect an AI agent

> Add Underpass to Claude, ChatGPT, Cursor, VS Code or any MCP app, let it fix things with your say-so, and try it out.

Connect the AI agent you already use to Underpass, and it can set up your devices, check they reach each other and find what's wrong with a machine. It signs in as you, with your role in each workspace.

The steps below are also in the dashboard: open **Connect your agent** at the bottom of the sidebar and choose your app. The server's address is:

```
https://app.getunderpass.com/mcp
```

Every app ends the same way: a page opens in your browser. Sign in to Underpass if asked, then click **Allow**. If your account has two-factor authentication, you enter your authenticator code first. See [MCP tools → Signing in](/reference/mcp-tools#signing-in).

## Claude (claude.ai and the Claude apps)

1. In Claude, go to **Customize → Connectors** and choose **Add custom connector**.
2. Name it Underpass and paste the URL: `https://app.getunderpass.com/mcp`.
3. If it asks how Claude identifies itself (OAuth client), pick **Register automatically**. Then choose **Add**.
4. Choose **Connect** next to Underpass. Sign in if asked, then click **Allow**.
5. In a chat, click **+**, then **Connectors**, and turn on Underpass.

## Claude Code

1. Add the server, in a terminal:

   ```bash
   claude mcp add --transport http --scope user underpass https://app.getunderpass.com/mcp
   ```

   `--scope user` makes it available in all your projects. Leave it out to add it to this project only.

2. Sign in: start Claude Code, run `/mcp`, pick **underpass** and follow the sign-in in your browser. Or from the terminal:

   ```bash
   claude mcp login underpass
   ```

## ChatGPT

1. In ChatGPT on the web, go to **Settings → Apps → Advanced settings** and turn on **Developer mode**.
2. Back in **Settings → Apps**, choose **Create**. Name it Underpass, paste the URL, set authentication to **OAuth** and create it.
3. ChatGPT opens a sign-in page. Sign in if asked, then click **Allow**.
4. In a chat, click **+**, choose **Developer mode** and turn on Underpass.

> [!NOTE]
> Custom MCP apps are for ChatGPT Business, Enterprise and Edu. In a ChatGPT workspace, an admin may first need to allow them under **Workspace settings → Permissions & roles**.

## Cursor

1. On the **Connect your agent** page, choose **Cursor** and click **Add to Cursor**. Or add this to `~/.cursor/mcp.json` (every project), or `.cursor/mcp.json` in one project:

   ```json
   {
     "mcpServers": {
       "underpass": {
         "url": "https://app.getunderpass.com/mcp"
       }
     }
   }
   ```

2. Cursor lists **underpass** under your MCP servers (Settings, or the Customize page). Choose **Connect** next to it, sign in if asked, then click **Allow**.

## VS Code

1. On the **Connect your agent** page, choose **VS Code** and click **Add to VS Code**. Or add this to `.vscode/mcp.json`:

   ```json
   {
     "servers": {
       "underpass": {
         "type": "http",
         "url": "https://app.getunderpass.com/mcp"
       }
     }
   }
   ```

   Or run **MCP: Add Server** from the Command Palette, choose **HTTP** and paste the URL.

2. Start the server (the **Start** link above it in `mcp.json`, or **MCP: List Servers**). VS Code asks you to sign in. Sign in if asked, then click **Allow**.
3. Open Copilot Chat in **Agent** mode. Underpass's tools are in the tools picker.

## Other apps

The **Connect your agent** page also has steps for Codex, Hermes Agent, Gemini CLI, Devin Desktop (formerly Windsurf) and OpenCode. For any other app that adds remote (Streamable HTTP) MCP servers:

1. Add the server by its URL, `https://app.getunderpass.com/mcp`, or in the JSON most apps use in their MCP config file:

   ```json
   {
     "mcpServers": {
       "underpass": {
         "url": "https://app.getunderpass.com/mcp"
       }
     }
   }
   ```

2. The app finds the sign-in page by itself (OAuth with dynamic client registration). Sign in if asked, then click **Allow**.

An agent app on one of your own computers can also start Underpass as a local MCP server instead, from 0.8.7: see [Agents on your own computer](/features/ai-agents#agents-on-your-own-computer).

## Let it fix things (optional)

Out of the box, agents can **look**: diagnose machines and read their details. To let them also run commands and read or change files, each one allowed by a person first, an owner or admin turns it on:

1. Open **Settings → AI agents**.
2. Set **What agents may do** to **Ask first**.
3. Optional: under **Which machines**, list the machines agents may work on (`tag:servers`, `machine:<id>` or `user:name@example.com`), and click **Save**. Leave it empty for every machine.

When the agent then wants to run something, the request waits for you in the dashboard's bell and on the **Connect your agent** page, with **Allow** and **Deny**. See [AI agents on your machines](/features/ai-agents).

## Try it

Ask your agent:

```
Which of my machines are offline?
```

It lists your machines and says which aren't online. Then try:

- "Why can't my laptop reach my desktop?" (it checks the connection between the two)
- "Is office-pc up to date, and is its clock right?" (it diagnoses the machine)
- "Set up my Underpass network." (it installs on this computer, adds your other devices and checks they reach each other)

If something goes wrong, the agent gets a message saying why: see [MCP tools → Errors](/reference/mcp-tools#errors-and-what-to-do).

## Disconnect an app

Open **Connect your agent** and click **Disconnect** next to the app under **Connected apps**. The same list is in **Settings → Integrations**.
