# Computer-Use Agents API

Wires H Company's browser agents into any MCP client. Hand it a task in plain words and get back an answer plus the run's event log.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 45
- Author: hcompai
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/hcompai/hai-agents-python
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/computer-use-agents-api

## What it does

The server exposes H Company's Agents API over MCP. You launch an agent such as `h/web-surfer-pro`, which brings its own browser, and describe what you want done. A session moves through `pending` and `running` before settling as `completed`, `idle`, `failed`, `timed_out` or `interrupted`.

Two ways to drive it. `run_session` opens a session and blocks until it settles, which fits one-shot jobs. `start_session` hands back a handle immediately, so you can follow the steps, send a correction with `send_message`, pause and resume, force an answer from what the agent already has, or cancel. Set `idle_timeout_s` and the session goes `idle` after each answer, holding its context and browser state for your next message. Pass a pydantic model as `answer_schema` to get a validated result; a mismatch raises `AnswerValidationError`.

\`Client.local()` runs the agent on your own machine through a local runtime. Only one agent can drive the desktop at a time — a second process requesting a `desktop` or `workstation` bridge fails right away instead of fighting over the mouse. Inference still goes to the hosted service unless you pass `inference=Inference.self_hosted(...)`. Hosted use needs a key: `HAI_API_KEY`, or the one `hai login` saved.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Remote server: `https://agp.hcompany.ai/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http computer-use-agents-api https://agp.hcompany.ai/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add computer-use-agents-api --url https://agp.hcompany.ai/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "computer-use-agents-api": {
            "url": "https://agp.hcompany.ai/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "computer-use-agents-api": {
            "type": "http",
            "url": "https://agp.hcompany.ai/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http computer-use-agents-api https://agp.hcompany.ai/mcp
```

## When to use it
- pull data from a site that has no API
- run a browser task and get the answer as a typed structure
- watch an agent's steps and step in mid-run
- keep a conversation going without losing browser state
- stop a stuck session and keep the partial answer

## Example prompts
- Find three open ML engineering roles in Paris and return them as a list
- Start the `h/web-surfer-pro` agent and tell me the top stories on Hacker News
- Pause the session and show me how many steps the agent has taken

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
