Claude Computer Use on Linux: API vs MCP Guide
Claude computer use lets Claude view screens, move the mouse, click, and type text. As of 2026-11-29, the current API version is computer_toolset_20260801, requiring no beta header on current models, while Anthropic notes the feature remains in beta. You can run it through the direct API loop in a reference container or connect MCP clients to self-hosted desktops. The API route suits custom autonomous agents, while the MCP route suits interactive developer tools.

What is the Anthropic API route for Claude computer use?
The official computer use capability from Anthropic operates as a client-side tool. Screenshots and files are captured and stored in your environment, not by Anthropic. Your own application runs each call in order in your own environment, returns one tool_result block for each tool_use block, and calls the API again. That loop is your code, and the Anthropic documentation caps it using a max_iterations parameter. Working directly with the claude computer use api requires you to manage this request and response cycle yourself.
The current implementation uses the computer_toolset_20260801 toolset and requires no beta header when calling Claude Fable 5.2, Claude Mythos 5.2, Claude Opus 5.5, Claude Sonnet 5.5, or Claude Haiku 5.5. These models return a 400 error if sent the older computer_20251124 parameter. Older models, including Opus 4.7, Opus 4.6, Sonnet 4.6, and Opus 4.5, use only computer_20251124 with the beta header computer-use-2025-11-24. Earlier versions like computer_20250124 require the beta header computer-use-2025-01-24.
The computer_toolset_20260801 toolset provides 17 member tools: screenshot, zoom, left_click, right_click, middle_click, double_click, triple_click, left_click_drag, mouse_move, left_mouse_down, left_mouse_up, cursor_position, scroll, type, key, hold_key, and wait. Each action is sent as its own tool_use name with the parameter "toolset_name": "computer". Coordinates are measured in screenshot pixels. The key action accepts a repeat value from 1 to 100, while the wait action accepts a duration up to 300 seconds. Alongside these tools, Anthropic quickstarts typically declare the text editor tool (text_editor_20250728, named str_replace_based_edit_tool) and the bash tool (bash_20250124, named bash) in the same tools array.
Anthropic provides a reference implementation on GitHub. It bundles dependencies into a Docker container running an X11 environment with an Xvfb virtual display, the Mutter window manager, a Tint2 panel, Firefox, and LibreOffice. It includes a Streamlit application that executes the agent loop. The container image ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest publishes four ports:
- Port 5900 for direct VNC connections.
- Port 8501 for the Streamlit web interface.
- Port 6080 for the noVNC desktop view at http://localhost:6080/vnc.html.
- Port 8080 for the combined interface at http://localhost:8080.
In this demo, the agent loop runs inside the container that Claude controls, and it serves one session at a time. Anthropic recommends XGA resolution (1024x768) and advises against screenshots above XGA or WXGA. In the demo container, the WIDTH and HEIGHT environment variables set the screen size. Official documentation for the tool is available on the Anthropic documentation portal.
How does the Screenbox MCP route work?
Screenbox is an open source (AGPL-3.0), self-hosted platform that provides virtual desktops over the Model Context Protocol. You connect Claude Code, Claude Desktop, Cursor or Copilot to a virtual desktop, and the client drives it through MCP tools, so there is no agent loop or API driver to write.
Each virtual desktop runs as an isolated Docker container without bind mounts, and files move only through explicit API calls. Desktops require about 2 GB RAM each and do not require a GPU. The default container image is screenbox:latest (about 920 MB, containing XFCE, Xvnc, xrdp, and Chromium). A second image, screenbox:mate, is about 1.7 GB and provides a full MATE desktop environment. Screenbox runs on Linux using native Docker, macOS using Docker Desktop, and Windows using WSL2.
To set up Screenbox, clone the repository and run the setup script:
git clone https://github.com/dklymentiev/screenbox
cd screenbox
./setup.sh
docker compose up -d
The web dashboard is available at http://localhost:16000, and the MCP endpoint runs at http://localhost:8080/mcp. Connect your desktop client by adding the endpoint to your configuration:
{
"mcpServers": {
"screenbox": {
"url": "http://localhost:8080/mcp"
}
}
}
For single-agent setups without Docker Compose, you can install the package with pip install screenbox-mcp and run MCP over stdio using python3 -m screenbox.
Screenbox provides 23 MCP tools divided into categories: 8 core tools (desktop_screenshot, desktop_look, desktop_click, desktop_type, desktop_key, desktop_shell, desktop_batch, desktop_help), 4 dispatchers (desktop_chrome, desktop_window, desktop_file, desktop_manage), 4 knowledge tools, 2 system tools, 1 debug tool, 2 tools that wait for the screen to change or settle (desktop_wait_change, desktop_wait_stable), and 2 beta tools that list and run saved step recipes without a model (desktop_recipes, desktop_replay).
The recommended interaction loop follows three steps:

- Call desktop_screenshot to inspect the full display.
- Call desktop_look to run OCR across a specific grid cell for precise coordinates.
- Call desktop_click at those coordinates to trigger an action.
By default, desktop_click returns an updated image and OCR text around the click point. In addition, desktop_chrome supports the page_map action, which returns headings, links, forms, and buttons with viewport coordinates so elements can be clicked without a vision model. You can monitor agents live over RDP or noVNC, take manual mouse and keyboard control, and release it back to the agent. Desktops can be saved with snapshot_save and restored with snapshot_restore to preserve browser sessions and file state, or cloned from templates. Idle desktops pause automatically based on idle_pause_minutes (default 20 minutes), and acquired desktops release when lease_ttl expires (default 600 seconds).
How do you secure Claude computer use on Linux?
When hosting these desktops, security boundaries matter. Claude follows instructions found inside content on screen, even when those instructions conflict with system prompts (prompt injection). Classifiers scan returned tool data, including screenshots, to detect potential injections.

Anthropic outlines critical security precautions for computer use:
- Use a dedicated virtual machine or container configured with minimal privileges.
- Avoid giving the model access to sensitive data, including account credentials and login information.
- Restrict internet access to an allowlist of approved domains.
- Require human confirmation before executing decisions that carry meaningful real-world consequences.
- Inform end users of risks and get consent before enabling computer use in your products.
Screenbox desktops provide isolated containers, but they are not hardened sandboxes. Do not expose the MCP API to the public internet; restrict access to localhost or a private VPN. The setup.sh script generates unique API tokens to secure the interface. Do not run untrusted agents without reviewing their actions.
Which route fits your workflow?
The Anthropic reference demo and Screenbox serve different engineering needs. The table below compares the two approaches based on their documented features:
| Feature | Anthropic API demo container | Screenbox MCP desktops |
|---|---|---|
| Primary interface | Anthropic computer use API toolset | Model Context Protocol (MCP) |
| Loop management | Custom application loop (or demo Streamlit app) | Native MCP client orchestration |
| Included tools | 17 computer actions, text editor, bash | 23 MCP tools including OCR and page map |
| Session handling | One session per container | Multiple containers via Docker |
| Memory footprint | Not stated in the demo README | About 2 GB RAM per desktop |
| GPU requirement | Not stated in the demo README | No GPU required |
| State persistence | Not covered in the demo README | Snapshots with snapshot_save and restore |
| Client support | Custom code or reference Streamlit app | Claude Code, Claude Desktop, Cursor, Copilot |
The MCP route plugs into the development tools you already use, so you do not write or maintain the screenshot and tool_result loop yourself. The source is on GitHub.
Frequently asked questions
Which models support the current computer use toolset?
Claude Fable 5.2, Claude Mythos 5.2, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 support computer_toolset_20260801 without requiring a beta header. Older models like Opus 4.7, Opus 4.6, Sonnet 4.6, and Opus 4.5 require computer_20251124 and the computer-use-2025-11-24 beta header.
What screen resolution should be configured for the API?
Anthropic recommends XGA resolution (1024x768) and advises against capturing screenshots above XGA or WXGA. In the reference Docker demo, the WIDTH and HEIGHT environment variables configure the display dimensions.
Does Screenbox run Anthropic's computer use API directly?
Screenbox does not implement Anthropic's computer use API toolset. It implements a set of 23 MCP tools that connect to clients like Claude Desktop, Claude Code, Cursor, and Copilot through the Model Context Protocol.
How does Screenbox locate web elements without computer vision?
The desktop_chrome dispatcher provides a page_map action. This action parses web pages to return headings, links, form inputs, and buttons along with their viewport coordinates, allowing agents to click elements directly.