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

# MCP browser task

> Give an agent host Webcompute as a browser subagent through MCP and inspect the result.

Use this example when a coding-agent host should delegate a whole browser goal to
Webcompute.

## What this shows

* Agent mode exposes `run_web_agent` as a browser subagent.
* Runtime mode remains available for exact browser-code follow-up.
* Debug UI and CDP URLs are inspection capabilities, not default transcript data.

## Setup

```bash theme={null}
web model setup --name browsing
web mcp setup claude --surface agent --model browsing --instructions
```

## Ask the host

```text theme={null}
Use Webcompute to find Apple's latest 10-K on sec.gov. Return the filing URL and three risk-factor themes with citations.
```

The host should call `run_web_agent` with the user goal, `startUrl`, and
`allowedDomains` when useful.

## Expected output

```text theme={null}
Apple latest 10-K

Filing URL: https://www.sec.gov/Archives/...

Risk-factor themes
1. ...
2. ...
3. ...
```

## Inspect

* Tool calls in the host transcript.
* `run_web_agent` structured content.
* Browser status and recordings when enabled.
* Debug UI only when live review is needed.

## Cleanup

Agent-mode runs close browsers they create according to the Webcompute
browser-agent harness. If the host later uses runtime tools, ask it to close any
browser it creates with `manage_browsers`.

## Advanced runtime loop

Use [MCP runtime mode](/integrations/mcp-runtime-mode) when the host should call
`manage_browsers` and `execute_playwright_code` directly for each browser step.

## Common failures

* If the host claims it browsed without calling MCP tools, ask it to rerun with tool use visible in the transcript.
* If the task requires proxy setup, create the browser through SDK, CLI browser creation, REST, or quick actions before MCP reuse.
* If the page is blocked, report the blocker and next safe action instead of claiming success.
