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
9.0K downloads
24 stars

The Computer Control MCP server enables computer automation and interaction through an API-driven interface. It provides capabilities for mouse and keyboard control, OCR text recognition, screenshot capture, and window management using PyAutoGUI, RapidOCR, and ONNXRuntime with zero external dependencies.

Installation Options

Using uvx (Recommended)

Set up the MCP server in your configuration file:

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

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

Using pip

Install globally with pip:

pip install computer-control-mcp

Then run the server:

computer-control-mcp

Features

  • Mouse movement and click control
  • Text typing at cursor position
  • Screenshots (whole screen or specific windows)
  • OCR text extraction from images
  • Window listing and activation
  • Keyboard key presses
  • Drag and drop operations

Using the API

Mouse Control

Click at Screen Coordinates

click_screen(x=500, y=300)

Move Mouse Cursor

move_mouse(x=500, y=300)

Drag and Drop

drag_mouse(from_x=100, from_y=100, to_x=300, to_y=300, duration=0.5)

Keyboard Control

Type Text

type_text(text="Hello, world!")

Press Keys

press_key(key="enter")

Screen and Window Management

Capture Screenshots

Basic screenshot:

take_screenshot()

Screenshot with OCR text extraction:

take_screenshot(with_ocr_text_and_coords=True)

Screenshot of specific window:

take_screenshot(title_pattern="Notepad")

Save screenshot to downloads folder:

take_screenshot(save_to_downloads=True)

Get Screen Size

get_screen_size()

Work with Windows

List all open windows:

list_windows()

Activate a specific window:

activate_window(title_pattern="Chrome", threshold=60)

Platform Compatibility

The server has been tested primarily on Windows but should work on other platforms as well.

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