Computer Control MCP server

Enables desktop automation through mouse control, keyboard input, screenshots, OCR, and window management for direct interaction with graphical user interfaces
Back to servers
Setup instructions
Provider
AB498
Release date
Apr 10, 2025
Language
Python
Package
Stats
18.2K downloads
47 stars

Computer Control MCP is a server implementing Model Context Protocol (MCP) that provides computer control capabilities through Python. It allows automated control of mouse movements, keyboard input, OCR text recognition, window management, and screenshot functions - similar to Anthropic's 'computer-use' functionality but with zero external dependencies.

Installation Options

Using UVX

The quickest way to set up the Computer Control MCP server is using uvx:

{
  "mcpServers": {
    "computer-control-mcp": {
      "command": "uvx",
      "args": ["computer-control-mcp@latest"]
    }
  }
}

Note: Running uvx computer-control-mcp@latest for the first time will download Python dependencies (approximately 70MB), which may take some time. It's recommended to run this in a terminal before using it as an MCP server.

Using Pip

Alternatively, you can install it globally using pip:

pip install computer-control-mcp

Then run the server with:

computer-control-mcp

Features and Capabilities

Mouse Control Functions

  • Move the mouse cursor to specific coordinates
  • Perform mouse clicks at designated screen positions
  • Drag and drop operations
  • Control mouse button states (press and release)

Keyboard Control Functions

  • Type text at the current cursor position
  • Press individual keyboard keys
  • Press key combinations
  • Control key states (press and release)

Screen and Window Management

  • Take screenshots of the entire screen or specific windows
  • Extract text from screenshots using OCR
  • List all open windows
  • Activate specific windows by title
  • Get screen resolution information

Available Tools

Mouse Control

click_screen(x: int, y: int)  # Click at specified screen coordinates
move_mouse(x: int, y: int)  # Move mouse cursor to specified coordinates
drag_mouse(from_x: int, from_y: int, to_x: int, to_y: int, duration: float = 0.5)  # Drag mouse from one position to another
mouse_down(button: str = "left")  # Hold down a mouse button ('left', 'right', 'middle')
mouse_up(button: str = "left")  # Release a mouse button ('left', 'right', 'middle')

Keyboard Control

type_text(text: str)  # Type the specified text at current cursor position
press_key(key: str)  # Press a specified keyboard key
key_down(key: str)  # Hold down a specific keyboard key until released
key_up(key: str)  # Release a specific keyboard key
press_keys(keys: Union[str, List[Union[str, List[str]]]])  # Press keyboard keys (supports single keys, sequences, and combinations)

Screen and Window Management

take_screenshot(title_pattern: str = None, use_regex: bool = False, threshold: int = 60, scale_percent_for_ocr: int = None, save_to_downloads: bool = False)  # Capture screen or window
take_screenshot_with_ocr(title_pattern: str = None, use_regex: bool = False, threshold: int = 10, scale_percent_for_ocr: int = None, save_to_downloads: bool = False)  # Extract and return text with coordinates using OCR
get_screen_size()  # Get current screen resolution
list_windows()  # List all open windows
activate_window(title_pattern: str, use_regex: bool = False, threshold: int = 60)  # Bring specified window to foreground

Getting Help

If you need assistance with the Computer Control MCP server, you can contact:

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "computer-control-mcp" '{"command":"uvx","args":["computer-control-mcp@latest"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "computer-control-mcp": {
            "command": "uvx",
            "args": [
                "computer-control-mcp@latest"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "computer-control-mcp": {
            "command": "uvx",
            "args": [
                "computer-control-mcp@latest"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later