The Computer Control MCP server provides an interface for automated computer control, allowing you to programmatically control mouse movements, keyboard input, perform OCR, and manage windows. It's designed to work with the Model Context Protocol (MCP) specification.
You can install and run the Computer Control MCP server in two ways:
Add the following configuration to your MCP configuration file:
{
  "mcpServers": {
    "computer-control-mcp": {
      "command": "uvx",
      "args": ["computer-control-mcp@latest"]
    }
  }
}
Note: When running for the first time, this method will download Python dependencies (around 70MB) which may take some time. It's recommended to run this in a terminal before using it with MCP.
Alternatively, you can install the package globally using pip:
pip install computer-control-mcp
Then run the server with:
computer-control-mcp
The Computer Control MCP server provides the following capabilities:
Control the mouse cursor position and actions:
# Click at specific screen coordinates
click_screen(100, 200)
# Move mouse cursor to specific coordinates
move_mouse(300, 400)
# Drag the mouse from one position to another
drag_mouse(100, 100, 300, 300, duration=0.5)
# Hold down a mouse button
mouse_down("left")
# Release a mouse button
mouse_up("left")
Control keyboard input:
# Type text at current cursor position
type_text("Hello, world!")
# Press a specific keyboard key
press_key("enter")
# Hold down a key
key_down("shift")
# Release a key
key_up("shift")
# Press key combinations
press_keys(["ctrl", "c"])  # Copy
Capture and interact with the screen and windows:
# Take a screenshot of the entire screen
screenshot = take_screenshot()
# Take a screenshot of a specific window
screenshot = take_screenshot(title_pattern="Chrome")
# Extract text from screen using OCR
text_data = take_screenshot_with_ocr()
# Get screen resolution
screen_size = get_screen_size()
# List all open windows
windows = list_windows()
# Activate a specific window
activate_window("Notepad")
# Wait for a specified duration
wait_milliseconds(500)  # Wait for 500ms
Extract text from the screen with position information:
# Get text with coordinates from the current screen
text_with_coords = take_screenshot_with_ocr()
# Extract text from a specific window with custom settings
text_with_coords = take_screenshot_with_ocr(
    title_pattern="Chrome",
    use_regex=False,
    threshold=10,
    scale_percent_for_ocr=150,
    save_to_downloads=True
)
Work with multiple windows:
# List all open windows
windows = list_windows()
print(windows)
# Activate a specific window using pattern matching
activate_window("Chrome")
# Use regex for more flexible window matching
activate_window(".*Google.*", use_regex=True)
Perform complex keyboard operations:
# Press Ctrl+Alt+Delete
press_keys(["ctrl", "alt", "delete"])
# Perform a sequence of key presses
press_keys(["alt", "tab", "tab"])
                    
                    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.
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.
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"
            ]
        }
    }
}
                        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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. 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