legato

Legato MCP server: cloud desktops for Claude Code, Cursor and other agents

Short answer. legato mcp is an MCP server. It gives any MCP-capable agent a Linux desktop (E2B) to look at and act on. Each action returns as soon as the screen has settled, with the new screenshot attached. The agent never sleeps or asks for extra screenshots.

pip install "legatolabs[e2b,mcp]"
claude mcp add legato -e E2B_API_KEY=your_key -- legato mcp

Cursor, Windsurf, Claude Desktop and other clients:

{"mcpServers": {"legato": {"command": "legato", "args": ["mcp"], "env": {"E2B_API_KEY": "your_key"}}}}

Tools

tool what it does
desktop_open(width=1280, height=800) starts a fresh desktop and returns its id and first screenshot
desktop_act(desktop_id, action, x, y, text, keys, direction, amount, end_x, end_y) click, double_click, right_click, type, key, scroll, drag or wait. It returns the settled screenshot and how long the screen took. Coordinates are pixels of the latest screenshot.
desktop_screenshot(desktop_id) the current screen
desktop_run_task(desktop_id, task, model, base_url, api_key_env, max_steps) hands a whole task to legato.Harness with any OpenAI-compatible model (default: Qwen3.8-27B on OpenRouter, key read from OPENROUTER_API_KEY). It returns the run report and the final screen.
desktop_close(desktop_id) stops the desktop

Measured on E2B from a cloud container:

When to use which

Edit this page on GitHub · Markdown