# Virtual Computer MCP server

> Provides an AI agent with a persistent virtual machine featuring a terminal, file system, and a visual Xfce desktop interface.

- Repository: https://github.com/flujo-app/mcp-virtual-computer
- Page: https://hostedmcp.org/servers/flujo-app/mcp-virtual-computer
- Transport: stdio
- Stars: 3
- License: MIT
- Latest version: 0.2.11

## Install

### Claude Code

```sh
claude mcp add --env 'COMPUTER_ID=<COMPUTER_ID>' --env 'FLY_API_TOKEN=<YOUR_FLY_API_TOKEN>' mcp-virtual-computer -- uvx mcp-virtual-computer
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp-virtual-computer": {
      "command": "uvx",
      "args": [
        "mcp-virtual-computer"
      ],
      "env": {
        "COMPUTER_ID": "<COMPUTER_ID>",
        "FLY_API_TOKEN": "<YOUR_FLY_API_TOKEN>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp-virtual-computer": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-virtual-computer"
      ],
      "env": {
        "COMPUTER_ID": "<COMPUTER_ID>",
        "FLY_API_TOKEN": "<YOUR_FLY_API_TOKEN>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp-virtual-computer","type":"stdio","command":"uvx","args":["mcp-virtual-computer"],"env":{"COMPUTER_ID":"<COMPUTER_ID>","FLY_API_TOKEN":"<YOUR_FLY_API_TOKEN>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp-virtual-computer": {
      "command": "uvx",
      "args": [
        "mcp-virtual-computer"
      ],
      "env": {
        "COMPUTER_ID": "<COMPUTER_ID>",
        "FLY_API_TOKEN": "<YOUR_FLY_API_TOKEN>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp-virtual-computer --env 'COMPUTER_ID=<COMPUTER_ID>' --env 'FLY_API_TOKEN=<YOUR_FLY_API_TOKEN>' -- uvx mcp-virtual-computer
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp-virtual-computer]
command = "uvx"
args = ["mcp-virtual-computer"]

[mcp_servers.mcp-virtual-computer.env]
COMPUTER_ID = "<COMPUTER_ID>"
FLY_API_TOKEN = "<YOUR_FLY_API_TOKEN>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'COMPUTER_ID=<COMPUTER_ID>' -e 'FLY_API_TOKEN=<YOUR_FLY_API_TOKEN>' mcp-virtual-computer uvx -- mcp-virtual-computer
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp-virtual-computer": {
      "command": "uvx",
      "args": [
        "mcp-virtual-computer"
      ],
      "env": {
        "COMPUTER_ID": "<COMPUTER_ID>",
        "FLY_API_TOKEN": "<YOUR_FLY_API_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `COMPUTER_ID` | yes | no | Stable identity of the one persistent computer. |
| `FLY_API_TOKEN` | no | yes | Optional Fly API token. A cached flyctl login is also supported. |
| `AUTO_INSTALL_DOCKER` | no | no | On Windows, install and start Docker Desktop lazily when needed. |
| `AUTO_INSTALL_FLYCTL` | no | no | Download flyctl into the user profile when it is missing. |
| `BACKEND` | no | no | Computer provider. Use docker for a local container or fly for a permanent Fly Machine. |
| `DESKTOP_ENVIRONMENT` | no | no | Start the real Xfce desktop instead of the virtual desktop. |
| `EXPOSE_LIFECYCLE_TOOLS` | no | no | Also expose runtime status and network/desktop switching tools to the model. The MCP App can always use them. |
| `NETWORK_ACCESS` | no | no | Allow outbound network access from the computer. |

## FAQ

### What can the model do within the virtual computer?

The model can use the terminal, create, read, and edit files, see the screen, and interact via clicking and typing.

### How does the virtual computer persist data?

When using Fly mode, the root filesystem and /workspace survive MCP restarts.

### Can I control network access for the agent?

Yes, you can unplug the network cable to cut network access.
