Enables interaction with a Linux desktop environment using X11, providing tools for screen capture, mouse control (clicking, dragging, scrolling), keyboard input, and retrieving display information.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Computer Use MCP Servertake a screenshot and tell me what's on my screen"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Computer Use MCP Server for Claude Code
An MCP (Model Context Protocol) server that gives Claude Code the ability to see and interact with your Linux desktop — take screenshots, click, type, scroll, drag, and more.
Built on top of xdotool, scrot, and ImageMagick. Designed to run as a stdio MCP server inside Claude Code.
Features
Screenshots — full desktop capture, automatically scaled to fit API constraints
Mouse control — left/right/middle/double/triple click, drag, move, scroll
Keyboard input — type text, press key combinations, hold keys
Screen zoom — capture a region at full (unscaled) resolution for reading small text
Display info — query resolution, scale factor, and coordinate space
All coordinates use a scaled coordinate space that maps to the actual screen resolution. The server handles the conversion transparently.
Prerequisites
Linux with X11 (Wayland is not supported)
Python >= 3.10
System packages:
sudo apt install xdotool scrot imagemagick x11-utilsNote:
xdpyinfois part of thex11-utilspackage on Debian/Ubuntu — there is no standalonexdpyinfopackage.
Installation
git clone https://github.com/SebastianBaltes/claude_code_computer_use_mcp.git
cd claude_code_computer_use_mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Claude Code Configuration
The easiest way is to use the Claude Code CLI:
claude mcp add computer-use --scope user -- /path/to/claude_code_computer_use_mcp/.venv/bin/python -m computer_use_mcp.serverReplace /path/to/ with your actual clone path. Then restart Claude Code — the computer_* tools will be available automatically.
Alternatively, add the server manually to ~/.claude.json under mcpServers:
{
"mcpServers": {
"computer-use": {
"type": "stdio",
"command": "/path/to/claude_code_computer_use_mcp/.venv/bin/python",
"args": ["-m", "computer_use_mcp.server"],
"env": {}
}
}
}Note: The valid
--scopevalues arelocal,user,project,dynamic,enterprise,claudeai, andmanaged. Useuserfor a personal installation available across all projects.
Available Tools
Tool | Description |
| Capture the full desktop |
| Left-click (with optional modifier key) |
| Right-click |
| Double-click |
| Triple-click (select line) |
| Middle-click |
| Move cursor without clicking |
| Click and drag |
| Type a text string |
| Press a key or key combo (e.g. |
| Scroll in any direction |
| Hold a key for N seconds |
| Pause for N seconds |
| Get current cursor position |
| Capture a screen region at full resolution |
| Get display resolution and scale info |
How It Works
The server detects the screen resolution via xdpyinfo and calculates a scale factor to keep screenshots within Anthropic's API image constraints (max 1568px long edge, max 1.15M total pixels). All coordinates passed by Claude are in this scaled space and get converted to actual screen coordinates before executing actions.
License
MIT