---
title: "Connect an AI agent"
description: "Set up Lookio from Claude Code, Codex, Cursor, ChatGPT or Claude. The CLI when the agent can run commands, with every permission asked at once; the MCP server otherwise."
canonical: "https://lookio.app/docs/get-started/connect-an-agent"
updated: "2026-11-03"
---

# Connect an AI agent

This page is written for the AI agent. The person copies the setup prompt from the app (**Connect your AI agent**), pastes it into their agent, and approves access in their browser. The agent never asks for an API key, a password or a code from an email.

## 1. Choose the route

| The agent can…                                                                                  | Route                                         |
| ----------------------------------------------------------------------------------------------- | --------------------------------------------- |
| Run shell commands: Claude Code, Codex, Cursor, Gemini CLI, Windsurf, any agent with a terminal | **The CLI.** Use it whenever it is available. |
| Only use connectors: Claude.ai, ChatGPT, Claude Desktop without a terminal                      | **The MCP server.**                           |

The CLI reaches everything Lookio does, answers in JSON and uploads files straight from the disk. The MCP server is the route for agents that cannot run commands.

## 2. The CLI (recommended)

1. **Install it**

   ```bash
   npm install --global @lookio/cli
   ```

   It needs Node.js 20 or later. Without a global install, run every command below as `npx @lookio/cli …` instead of `lookio …`.
2. **Sign in with every permission at once**

   ```bash
   lookio auth login --scope account:read,usage:read,resources:read,resources:write,resources:delete,assistants:read,assistants:write,assistants:delete,query,admin,webhooks:write
   ```

   Ask for all of them now: a missing permission later means signing in again. Your browser opens, you choose the workspace and approve. Lookio grants only what your role allows (`admin` needs a workspace admin), and that is expected, not an error.

   On a machine without a browser, add `--device`: the CLI prints an address and a code to open on any device.
3. **Check the connection**

   ```bash
   lookio auth status
   ```

   It shows the workspace, the plan and the permissions granted.
4. **Learn the commands**

   ```bash
   lookio help --json --compact
   ```

   The whole command surface as JSON. `lookio help <command> --json` details one command. See [CLI commands](/docs/cli/commands).

## 3. The MCP server (fallback)

Add a remote MCP server with this URL, over HTTP:

```text
https://mcp.lookio.app/mcp
```

The client opens Lookio in the browser: choose the workspace and approve every permission offered, for the same reason as above. [Connect an AI client](/docs/mcp/connect) gives the setting for Claude, Cursor, ChatGPT and others.

## 4. Then

1. Tell the person what is connected: the workspace and the permissions granted.
2. Ask what they want to do first: add resources (files, web pages, a whole site), create an assistant that answers from them, or ask a question.
3. Before deleting anything, or a job that spends many credits (a large site, many questions), say what it does and wait for their go.

The [Quickstart](/docs/get-started/quickstart) and [Concepts](/docs/get-started/concepts) explain resources, assistants and credits.
