Provides secure SSH-based control of Ubuntu VMs, enabling command execution, keyboard/mouse simulation, window management, and screen capture for GUI automation.
Ubuntu VM Control MCP Server
A Model Context Protocol (MCP) server that allows an AI assistant to interact with an Ubuntu VM using SSH.
Purpose
This MCP server provides a secure interface for an AI assistant to perform basic GUI operations on a remote Ubuntu machine. It can execute commands, simulate keyboard and mouse inputs, and capture the screen.
This requires that the target Ubuntu VM has a graphical desktop environment running and the necessary tools (xdotool, scrot) installed.
Features
execute_command: Executes any shell command on the remote VM.type_text: Simulates typing text.click: Simulates a mouse click at specified coordinates.get_active_window_title: Retrieves the title of the currently active window.take_screenshot: Captures the screen and returns the image as a base64-encoded string.
Prerequisites
Docker Desktop with MCP Toolkit enabled.
An Ubuntu VM with a desktop environment (e.g., GNOME, XFCE) and an SSH server installed.
The following tools installed on the Ubuntu VM:
xdotoolandscrot(sudo apt-get install xdotool scrot).SSH key-based authentication configured for accessing the VM.
Installation
See the install_instructions.txt file for step-by-step instructions.
Usage Examples
In Claude Desktop, you can ask:
"Open a terminal on my Ubuntu VM."
(This would use
execute_commandwith a command likegnome-terminal)
"Type 'hello world' in the active window on my VM."
"Click on the screen at position 100, 150 on my Ubuntu machine."
"What is the name of the current window on my VM?"
"Show me what's on the screen of my Ubuntu VM."
Security Considerations
SSH Key: The SSH private key is handled as a Docker secret and is stored securely by Docker. It is mounted into the container at runtime and deleted from the container's filesystem upon exit.
Command Execution: The
execute_commandtool is very powerful. Be aware of the commands you are asking the assistant to run.Network: Ensure that the Docker container can reach the Ubuntu VM over the network.
Non-Root User: The Docker container runs as a non-root user for better security.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables AI assistants to interact with Ubuntu VMs via SSH, including executing commands, simulating keyboard/mouse input, capturing screenshots, and controlling GUI applications remotely.