Computer-Use Agents API — Claude Code MCP server: what it does
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.
claude mcp add --transport http computer-use-agents-api https://agp.hcompany.ai/mcpWhat Computer-Use Agents API 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.
What it helps with
- 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 for the agent
- Find three open ML engineering roles in Paris and return them as a list
- Start the
h/web-surfer-proagent and tell me the top stories on Hacker News - Pause the session and show me how many steps the agent has taken
How to install Computer-Use Agents API
Platform CLI: remote server
claude mcp add --transport http computer-use-agents-api https://agp.hcompany.ai/mcpPlatform CLI: remote server
codex mcp add computer-use-agents-api --url https://agp.hcompany.ai/mcpConfig file
{
"mcpServers": {
"computer-use-agents-api": {
"url": "https://agp.hcompany.ai/mcp"
}
}
}Config file
{
"servers": {
"computer-use-agents-api": {
"type": "http",
"url": "https://agp.hcompany.ai/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http computer-use-agents-api https://agp.hcompany.ai/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Computer-Use Agents API
How do I install Computer-Use Agents API in Claude Code?
Run claude mcp add --transport http computer-use-agents-api https://agp.hcompany.ai/mcp.
What does Computer-Use Agents API do?
It gives an MCP client access to H Company agents that operate a browser themselves. You describe the task, and you get an answer along with the session's events.
What do I need before using it?
An API key, either in HAI_API_KEY or saved by hai login. Local mode also needs the agent runtime on the machine.