Legato
MCP server that gives a coding agent a Linux desktop it can see, click and type on
- Pricing
- Open source
- Platforms
- Linux, macOS, Windows
- Runs
- Locally
- Version
- 0.1.8
- Listing updated
- 3 days ago
About Legato
Legato is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
The desktop can be a Docker container on your machine, your own screen, a sandbox you already run over SSH, Daytona or a VM, or a cloud desktop on E2B. The container option needs only Docker and gives the agent a Linux desktop with a terminal and Firefox, with no access to your own screen. With the local option on macOS, Windows or Linux on X11, the agent moves your real mouse and keyboard, and pushing the pointer into a screen corner stops it.
Every action returns a screenshot once the screen stops changing, instead of waiting a fixed sleep. Two modes are offered: desktop_act lets your agent's own model drive, while desktop_run_task hands a whole GUI task to any OpenAI-compatible model, defaulting to Qwen3.8-27B on OpenRouter. A --record option saves every screenshot with a log of actions.
Legato is also an open-source Python computer-use harness. Its README reports Claude Sonnet 5.5 running 1.48x faster than Anthropic's reference loop on 24 office tasks, and Qwen3.8-27B completing 71 of 96 versus 53 of 96 for OSWorld's agent.
Install
Run in a terminal
claude mcp add legato --env OPENROUTER_API_KEY='<OPENROUTER_API_KEY>' -- uvx legatolabsAdd to claude_desktop_config.json
{
"mcpServers": {
"legato": {
"command": "uvx",
"args": [
"legatolabs"
],
"env": {
"OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"legato": {
"command": "uvx",
"args": [
"legatolabs"
],
"env": {
"OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"legato": {
"type": "stdio",
"command": "uvx",
"args": [
"legatolabs"
],
"env": {
"OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"legato": {
"command": "uvx",
"args": [
"legatolabs"
],
"env": {
"OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"legato": {
"command": "uvx",
"args": [
"legatolabs"
],
"env": {
"OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
}
}
}
}Configuration
OPENROUTER_API_KEYOnly for desktop_run_task with its default model
Tools this server provides (5)
Taken from the project documentation; the running server may differ.
- desktop_open
- Open a desktop and return its id and first screenshot
- desktop_act
- Click, type, key, scroll, drag or wait and return the settled screenshot
- desktop_screenshot
- Return the current screen
- desktop_run_task
- Hand a whole task to an OpenAI-compatible model and return the run report and final screen
- desktop_close
- Stop the desktop
What it does
- Choice of desktop
- Docker container, your own screen, your own sandbox or an E2B cloud desktop.
- Settled screenshots
- Each action returns a screenshot once the screen stops changing.
- Agent-driven control
- desktop_act supports clicks, typing, scrolling, dragging and waiting.
- Delegated tasks
- desktop_run_task offloads a whole GUI task to an OpenAI-compatible model.
- Session recording
- Save screenshots and an action log for every desktop.
- Python harness
- Use the same engine from code with the legatolabs package.
Good for
- Test a GUI you are building
- Check a page in a real browser
- Offload a long desktop task to a cheaper open model
- Let a coding agent verify a chart or layout fix visually
- Run computer use on Linux in CI
Pricing
Open source
Open source; cloud desktops and model calls use your own E2B and model-provider accounts.
Prices change. Check legato.computer before you buy.
Legato FAQ
What does the container option need?
Only Docker; the agent gets a Linux desktop with a terminal and Firefox and cannot touch your screen.
Do I need an API key?
Only for desktop_run_task with its default model, which reads OPENROUTER_API_KEY; the E2B cloud option also needs an E2B key.
Which systems can I control directly?
With the local option, macOS, Windows or Linux on X11.
How is it installed?
pip install "legatolabs[mcp,local]", then add it with claude mcp add legato -- legato mcp, plus a sandbox flag.
Is Legato free?
Yes. Legato is open source, so you can use and self-host it for free.
How do I add Legato to Claude Code?
Run this command in your terminal: claude mcp add legato --env OPENROUTER_API_KEY='<OPENROUTER_API_KEY>' -- uvx legatolabs
What are the best alternatives to Legato?
The closest alternatives to Legato are REA, Browser Use, Scrapling MCP Server, Codebase Memory and GitHub.
Alternatives to Legato

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Browser Use
MCP serverBrowser agents and cloud browsers for AI, with an MCP server for web tasks
- 7 tools
- Remote
- Freemium
- 121K GitHub stars
- Browser automation

Scrapling MCP Server
MCP serverMCP server for AI clients to scrape sites with HTTP and stealth browser sessions
Runs locally- 17 tools
- Open source
- 104K GitHub stars
- Web search and scraping

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools