> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Computer Use MCP Servers

> Delegate a computer-use task from any MCP host — hosted on your workers, or run locally on this machine.

# Computer Use MCP Servers

Two servers expose the Computer Use Agent as delegation tools: the calling model hands over a
whole natural-language task, and the agent drives the browser or desktop itself.

They differ in **where the work runs**, which determines what you need to configure.

|                        | Hosted                                | Local                               |
| ---------------------- | ------------------------------------- | ----------------------------------- |
| Package                | `@stateset/computer-use-agent-mcp`    | `mcp/local-computer-use` (Python)   |
| Binary                 | `stateset-computer-use-mcp`           | —                                   |
| Work runs on           | Your dashboard workers                | This machine                        |
| Needs a tenant API key | **Yes**                               | No                                  |
| Good for               | Fleet jobs, batches, shared templates | Local automation, no account needed |

<Note>
  These are distinct from the MCP servers the agent *consumes* — Shopify, Mirakl, and Dsco — which
  let it call commerce APIs instead of clicking through a UI. See
  [Engines and Commerce MCP](/computer-use-engines-mcp).
</Note>

***

## Hosted server

A thin client for the hosted job API. Work executes on your dashboard workers, so this server
just submits and polls.

### Setup

```bash theme={null}
cd mcp/computer-use-agent
npm install
npm run build
```

| Variable               | Purpose                        |
| ---------------------- | ------------------------------ |
| `STATESET_CUA_API_URL` | Base URL of the hosted job API |
| `STATESET_CUA_API_KEY` | Tenant API key                 |

```json theme={null}
{
  "mcpServers": {
    "stateset-computer-use": {
      "command": "node",
      "args": ["/absolute/path/to/mcp/computer-use-agent/dist/index.js"],
      "env": {
        "STATESET_CUA_API_URL": "https://api.computer.stateset.com",
        "STATESET_CUA_API_KEY": "YOUR_TENANT_API_KEY"
      }
    }
  }
}
```

### Tools

| Tool                           | Purpose                                 |
| ------------------------------ | --------------------------------------- |
| `stateset_cua_preview_task`    | Show what would run, without running it |
| `stateset_cua_trigger_task`    | Submit one task                         |
| `stateset_cua_trigger_batch`   | Submit a batch                          |
| `stateset_cua_wait_for_result` | Block until a job finishes              |
| `stateset_cua_get_job`         | Job status                              |
| `stateset_cua_get_result`      | Job result                              |
| `stateset_cua_list_jobs`       | List jobs                               |
| `stateset_cua_list_templates`  | Available task templates                |
| `stateset_cua_get_template`    | One template                            |

<Tip>
  Call `stateset_cua_preview_task` before `trigger_task` when an agent composed the instruction
  itself. Preview costs nothing and shows exactly what would execute.
</Tip>

***

## Local server

Spawns the agent on the machine running the MCP host. No tenant API key, no account — but it
drives *your* browser and desktop, so it ships its own guardrails.

### Tools

| Tool                        | Purpose                                                            |
| --------------------------- | ------------------------------------------------------------------ |
| `run_computer_use_task`     | Run a task, block until it finishes or times out                   |
| `start_computer_use_task`   | Start in the background, return a `task_id`                        |
| `get_computer_use_task`     | Status and result for a background task                            |
| `cancel_computer_use_task`  | Cancel a running task                                              |
| `list_computer_use_tasks`   | Background tasks, newest first                                     |
| `preview_computer_use_task` | Show the exact command that would run, without running it          |
| `list_engines`              | Which engines are permitted by policy and available on the machine |
| `get_budget_status`         | Spend so far today, and remaining budget                           |
| `get_audit_log`             | Recent tasks — what was asked, cost, outcome, capability set       |
| `doctor`                    | Check the machine can run tasks; reports a remedy per failure      |

### Guardrails

Because tasks run locally with real desktop access, the server exposes policy, budget, and audit
as first-class tools rather than configuration:

* **`get_budget_status`** — a daily spend ceiling, checked before work starts.
* **`list_engines`** — separates *permitted by policy* from *available on this machine*, so a
  policy restriction is visible rather than surfacing as a confusing failure.
* **`get_audit_log`** — every task with its instruction, cost, outcome, and capability set.
* **`doctor`** — run this first on a new machine; it reports a remedy per failure rather than
  just failing.

<Warning>
  The local server drives the actual browser and desktop of the machine it runs on. Run `doctor`
  and review `list_engines` before pointing an agent at it, and keep the budget ceiling set — a
  looping agent otherwise spends real model credits against your desktop.
</Warning>

## Choosing

| If you want…                                      | Use                                                  |
| ------------------------------------------------- | ---------------------------------------------------- |
| Work on shared infrastructure, batches, templates | Hosted                                               |
| No account, automation on your own machine        | Local                                                |
| An audit trail and daily spend ceiling            | Local (built in)                                     |
| Commerce APIs instead of UI clicking              | [Shopify / Mirakl / Dsco](/computer-use-engines-mcp) |

## Related

* [Computer Use Agent](/computer-use-agent) — architecture and agent catalog
* [Engines and Commerce MCP](/computer-use-engines-mcp)
* [All MCP servers](/mcp-servers)
