Computer Use MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
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 .
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add computer-use -- node "<FULL_PATH_TO_CLAUDE_CODE_COMPUTER_USE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_CLAUDE_CODE_COMPUTER_USE_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

Enables Claude Code to interact with Linux X11 desktops

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-utils
    

    Note: xdpyinfo is part of the x11-utils package on Debian/Ubuntu — there is no standalone xdpyinfo package.

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.server

Replace /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 --scope values are local, user, project, dynamic, enterprise, claudeai, and managed. Use user for a personal installation available across all projects.

Available Tools

Tool Description
computer_screenshot Capture the full desktop
computer_left_click Left-click (with optional modifier key)
computer_right_click Right-click
computer_double_click Double-click
computer_triple_click Triple-click (select line)
computer_middle_click Middle-click
computer_mouse_move Move cursor without clicking
computer_left_click_drag Click and drag
computer_type Type a text string
computer_key Press a key or key combo (e.g. ctrl+s)
computer_scroll Scroll in any direction
computer_hold_key Hold a key for N seconds
computer_wait Pause for N seconds
computer_cursor_position Get current cursor position
computer_zoom Capture a screen region at full resolution
computer_display_info 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

Tools (16)

computer_screenshotCapture the full desktop
computer_left_clickLeft-click (with optional modifier key)
computer_right_clickRight-click
computer_double_clickDouble-click
computer_triple_clickTriple-click (select line)
computer_middle_clickMiddle-click
computer_mouse_moveMove cursor without clicking
computer_left_click_dragClick and drag
computer_typeType a text string
computer_keyPress a key or key combo (e.g. ctrl+s)
computer_scrollScroll in any direction
computer_hold_keyHold a key for N seconds
computer_waitPause for N seconds
computer_cursor_positionGet current cursor position
computer_zoomCapture a screen region at full resolution
computer_display_infoGet display resolution and scale info

Configuration

claude_desktop_config.json
{"mcpServers": {"computer-use": {"type": "stdio", "command": "/path/to/claude_code_computer_use_mcp/.venv/bin/python", "args": ["-m", "computer_use_mcp.server"]}}}

Try it

Take a screenshot of the current desktop to see what applications are open.
Type 'Hello World' into the active text editor window.
Move the mouse to the top-left corner and click the application menu.
Press Ctrl+S to save the current file in the open editor.
Zoom in on the terminal window to read the small text output.

Frequently Asked Questions

What are the key features of Computer Use MCP Server?

Full desktop screenshot capture with automatic scaling. Comprehensive mouse control including clicking, dragging, and scrolling. Keyboard input support for typing and key combinations. Screen zoom functionality for high-resolution region capture. Display information querying for resolution and scale factors.

What can I use Computer Use MCP Server for?

Automating repetitive GUI-based tasks on Linux workstations. Enabling AI agents to interact with legacy desktop software that lacks an API. Assisting with remote troubleshooting by allowing Claude to view and manipulate the desktop. Automating data entry into desktop applications.

How do I install Computer Use MCP Server?

Install Computer Use MCP Server by running: 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 .

What MCP clients work with Computer Use MCP Server?

Computer Use MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Computer Use MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare