# MCP tool reference

LiveTerminal's MCP server is at `https://app.liveterminal.ai/mcp` (Streamable HTTP). Most AI apps
connect with the URL alone and a browser sign-in: see [Connect your AI](/connect-your-ai/). Nothing
is installed on your computer or your machine.

## Connect with an API token

An app that can't sign in through a browser sends an API token instead. Make one in the dashboard
under **API tokens**, or with the [CLI](/install/):

```sh
lt auth token create --name agent --role write
```

```sh
claude mcp add --transport http liveterminal https://app.liveterminal.ai/mcp \
  --header "Authorization: Bearer <token>"
```

Other clients take the same two things: the URL and the `Authorization: Bearer <token>` header.

## What the agent can do

The tools the agent sees follow the token's scopes (`lt auth token create --help`): a token made with
`--role read` sees only the read tools, one made with `--scope services.use` only the service
tools. Every call is checked like the same request to the API: your permissions in the team, and
on a teammate's VPS only its creator, an owner, or a member given Manage on it (`lt vps access
grant`) may stop, delete or resize it.

| Tool                                            | What it does                                                                                              | Needs                                                           |
| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `account_list`                                  | Your own account and the teams you belong to; tools use your own account unless given another             | `vps.read`                                                      |
| `vps_list`, `vps_get`                           | List VPSs, read one                                                                                       | `vps.read`                                                      |
| `vps_create`                                    | Create a VPS (the default OS and size, or the ones you name)                                              | `vps.create`                                                    |
| `vps_start`, `vps_stop`                         | Start or stop a VPS                                                                                       | `vps.start`, `vps.stop`                                         |
| `vps_hibernate`                                 | Sleep a VPS: save its memory; `vps_start` wakes it                                                        | `vps.stop`                                                      |
| `vps_resize`                                    | Change vCPUs and memory, grow the disk                                                                    | `vps.start`                                                     |
| `vps_delete`, `vps_undelete`                    | Delete a VPS (kept 7 days, restorable), bring it back                                                     | `vps.delete` or `vps.delete.own` (only VPSs this token created) |
| `snapshot_create`, `snapshot_restore`           | Save a snapshot, roll a stopped VPS back to one                                                           | `image.write`, `vps.delete`                                     |
| `vps_access`                                    | Who may use a VPS, and what the VPS itself may do                                                         | `vps.read`                                                      |
| `vps_access_grant`, `vps_access_revoke`         | Give a member Connect or Manage on one VPS, or remove it (its creator or an owner)                        | `vps.read`, and `vps.connect` or `account.manage`               |
| `vps_role_set`                                  | Raise (an owner), lower or turn off (its creator or an owner) what a VPS itself may do                    | `vps.read`, and `vps.create` or `account.manage`                |
| `share_create`, `port_add`                      | Share a port over HTTPS, open a public port                                                               | `vps.connect`                                                   |
| `account_limits`, `usage`                       | Team limits, CPU/memory/disk use                                                                          | `vps.read`                                                      |
| `operation_wait`                                | Wait until a create, start, stop or delete has finished                                                   | `vps.read`                                                      |
| `term_create`, `term_list`                      | Start a terminal session on a VPS, list its sessions                                                      | `vps.connect`                                                   |
| `term_type`, `term_read`                        | Type keys into a session and read its screen                                                              | `vps.connect`                                                   |
| `term_delete`                                   | End a terminal session                                                                                    | `vps.connect`                                                   |
| `ssh_key_add`, `ssh_key_list`, `ssh_key_remove` | Add, list and remove public keys in the VPS user's `~/.ssh/authorized_keys`                               | `vps.connect`                                                   |
| `ssh_config`                                    | The `~/.ssh/config` blocks for plain `ssh` to your VPSs                                                   | `vps.connect`                                                   |
| `vps_exec`                                      | Run one bash command on a VPS as its user and return its output (up to 120 s)                             | `vps.connect`                                                   |
| `screen_open`, `screen_stop`                    | Turn the VPS's screen on (optionally opening a page in its Chrome), or stop it                            | `vps.connect`                                                   |
| `dashboard_link`                                | The dashboard URL of a page (home, a VPS, its screen, Claude web, Billing, CI, Help), for your AI to open | `vps.read`                                                      |
| `list_services`, `get_docs`, `call`             | Paid web services, below                                                                                  | `services.use`                                                  |
| `services_usage`                                | The paid calls made, who made them and what they cost                                                     | `services.use`                                                  |
| `ci_connections`, `ci_jobs`                     | The team's CI connections, and its recent CI jobs with each job's GitLab link; read only                  | `ci.read`                                                       |

The `term_*` tools give the agent terminals on a VPS that keep running between calls, like SSH with tmux. They suit
what a single command can't do: answering `[Y/n]` in `sudo apt-get install`, programs with a full-screen interface, a
login such as `claude`, and long jobs it checks on later. `term_type` takes text and keys (`enter`, `tab`, `esc`, `up`,
`f5`, any key or character with `ctrl-`, `alt-`, `shift-` in front such as `ctrl-c`, `alt-enter`, `shift-up`), waits until the screen has stopped changing (up to 30 s) and returns it; `term_read`
returns the screen, optionally after waiting for a change, with up to 2000 lines of scrollback. These are the same
sessions as the dashboard's Claude web page and `lt term --session NAME`, so you can open one (also on a phone),
answer its prompt with a button or type a password yourself while the agent waits. Plain `lt term` opens your own
session `main`; the agent's sessions get numbers unless it names them, and it types into `main` only when you ask.

`vps_exec` suits short commands. Programs with a window appear on the screen while it runs, and the
agent drives the screen's Chrome with `agent-browser` through `vps_exec`.

`screen_open` only turns the screen on ("turn on the screen of first-box"). To show you a page,
the screen included, the agent calls `dashboard_link` and opens the URL ("open the screen for
first-box"). The screen needs about 2 GB of memory; a smaller VPS gets `screen_needs_memory`.

`ssh_key_add` takes the one line of a `.pub` file, refuses private keys, and registers the key with
the jump host, which admits only registered keys and only to that Account's VPSs (at most 64 keys
per Account); `ssh_config` returns
the `~/.ssh/config` blocks that reach your VPSs through `ssh.liveterminal.ai`. See
[SSH and IDEs](/ssh/).

`vps_access_grant`, `vps_access_revoke` and `vps_role_set` follow the same rules as `lt vps
access` and the dashboard's **Access** section: only an owner lets a VPS do more, its creator can
lower or turn off its role, and only its creator or an owner gives or removes a member's access.
A member's own role is the most they get, so a member with the read role can't be given access.

`vps_delete` works like `lt vps delete` and the dashboard: the VPS is kept with its disk for 7 days,
and `vps_undelete` brings it back until then. `now: true` deletes it for good at once, with no undo.

Changes return an Operation; the agent calls `operation_wait` to wait for it. A change tool
takes an optional `idempotencyKey`: an agent that retries with the same key after an error gets
the first result, never a second VPS.

An error says whether it is safe to try again. `unknown_outcome` means the request reached the VPS
or the vendor but its answer was lost, so it may have happened: a `term_type` may already have
typed its keys, a `vps_exec` command may have run. The agent checks first (`term_read`,
`ssh_key_list`, the files the command writes) instead of repeating it. `vps_busy` (the VPS or its
host was busy, or it was still waking) and `screens_unavailable` mean the request never reached the
VPS, so trying again is safe. `vps_not_running` means the VPS is recorded as not running (a VPS whose state is `unknown` for a moment while its host is busy, with no Operation in progress, still counts as running).
`too_many_sessions` from `term_create` means the VPS already runs as many terminal sessions as its
memory allows (one per 64 MiB of memory above 384 MiB, at least 2): end one with `term_delete` or resize the VPS.

Example: "make a VPS called test-run, share port 3000, and delete it when the tests pass" runs
`vps_create`, `operation_wait`, `share_create` and later `vps_delete`.

## Paid web services

Some outside web APIs can be called through LiveTerminal with LiveTerminal's own key, billed on
your invoice: no account with the vendor and no vendor key on your machines.

| Service                                                                       | Operations                                                         | Price                |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------ | -------------------- |
| `firecrawl` (Firecrawl)                                                       | `scrape` a page as markdown, `search` the web, `map` a site's URLs | per Firecrawl credit |
| `twitterapi` (X search, through twitterapi.io, a third-party X data provider) | `search_tweets`, `user_info`                                       | per post or profile  |

`list_services` shows the current prices; they are the vendor's price plus a margin.

Services are off until a team owner turns them on, with a monthly cap in USD. An owner can also
set a daily cap, a limit on what one call may cost, and which operations are on:

```sh
lt services enable firecrawl --cap 20 --daily-cap 2 --max-call 0.01 --operations scrape,search
```

or on the dashboard's **Services** page. A call to a service or operation that is off, over a cap
or over the per-call limit is refused with a clear error before anything is sent to the vendor.
A token that may only call services, and only the ones you name, is:

```sh
lt auth token create --name scraper --scope services.use --services firecrawl
```

`--services` takes services (`firecrawl`) or single operations (`firecrawl.scrape`); a call to any
other tool with that token is refused (`service_not_allowed`).

Every call is in the call log, with the time, the tool, who made it (member, token, and the VPS
when it came from one of your VPSs over IPv6), units, cost, status and duration:

```sh
lt services calls --tool firecrawl --since 7d
```

the **Services** page shows the same log with totals per tool, and an agent reads it with
`services_usage`.

The agent reads `get_docs` for a service's inputs, then calls, for example
`call` with service `firecrawl` and request
`{"operation": "scrape", "input": {"url": "https://example.com"}}`.

The services are not yet open to every team; `list_services` shows the ones your team can use.

## Without MCP

The same is plain HTTP: `GET /v1/services`, `POST
/v1/accounts/{accountId}/services/{service}/calls` with an `Idempotency-Key` header and `GET
/v1/accounts/{accountId}/service-calls` for the log, or
`lt services call firecrawl scrape --input '{"url":"https://example.com"}'`.