Windows Remote Control MCP server

Enables remote automation of Windows systems for controlling mouse, keyboard, and screen capture via nut.js.
Back to servers
Provider
Cheffromspace
Release date
Jan 08, 2025
Language
TypeScript
Stats
105 stars

MCPControl is a Windows server implementing the Model Context Protocol (MCP) that enables AI models to control system operations including mouse, keyboard, window management, and screen capture functionality. It bridges the gap between AI models and your desktop, providing programmatic control for automation tasks.

Prerequisites

Before installing MCPControl, ensure you have the following:

  1. Build Tools with VC++ workload

    # Run as Administrator - may take a few minutes to complete
    winget install Microsoft.VisualStudio.2022.BuildTools --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
    
  2. Python (required for node-gyp)

    winget install Python.Python.3.12
    
  3. Node.js

    winget install OpenJS.NodeJS
    

Installation

Install the MCPControl package globally:

npm install -g mcp-control

Configuration

MCPControl works best in a virtual machine at 1280x720 resolution for optimal click accuracy.

Setting Up Your Claude Client

Configure your Claude client to connect to MCPControl via SSE transport using one of these options:

Option 1: Direct SSE Connection

For connecting to an MCPControl server running on a VM or remote machine:

{
  "mcpServers": {
    "MCPControl": {
      "transport": "sse",
      "url": "http://192.168.1.100:3232/mcp"
    }
  }
}

Replace 192.168.1.100:3232 with your server's IP address and port.

Option 2: Local Launch with SSE

To launch MCPControl locally with SSE transport:

{
  "mcpServers": {
    "MCPControl": {
      "command": "mcp-control",
      "args": ["--sse"]
    }
  }
}

Starting the Server

Start the MCPControl server on your VM or local machine:

mcp-control --sse

The server will display:

  • Available network interfaces and their IP addresses
  • The port number (default: 3232)
  • Connection status messages

VM Setup Example

  1. Start your Windows VM with 1280x720 resolution
  2. Install MCPControl on the VM:
    npm install -g mcp-control
    
  3. Run the server with SSE transport:
    mcp-control --sse
    
  4. Note the VM's IP address (e.g., 192.168.1.100)
  5. Configure Claude with the SSE URL:
    {
      "mcpServers": {
        "MCPControl": {
          "transport": "sse",
          "url": "http://192.168.1.100:3232/mcp"
        }
      }
    }
    
  6. Restart Claude and MCPControl will appear in your MCP menu!

CLI Options

MCPControl supports several command-line flags for advanced configurations:

# Run with SSE transport on default port (3232)
mcp-control --sse

# Run with SSE on custom port
mcp-control --sse --port 3000

# Run with HTTPS/TLS (required for production deployments)
mcp-control --sse --https --cert /path/to/cert.pem --key /path/to/key.pem

# Run with HTTPS on custom port
mcp-control --sse --https --port 8443 --cert /path/to/cert.pem --key /path/to/key.pem

Command Line Arguments

  • --sse - Enable SSE (Server-Sent Events) transport for network access
  • --port [number] - Specify custom port (default: 3232)
  • --https - Enable HTTPS/TLS (required for remote deployments per MCP spec)
  • --cert [path] - Path to TLS certificate file (required with --https)
  • --key [path] - Path to TLS private key file (required with --https)

Security Note

According to the MCP specification, HTTPS is mandatory for all HTTP-based transports in production environments. When deploying MCPControl for remote access, always use the --https flag with valid TLS certificates.

Features

Window Management

  • List all windows
  • Get active window info
  • Focus, resize & reposition windows

Mouse Control

  • Precision movement
  • Click & drag operations
  • Scrolling & position tracking

Keyboard Control

  • Text input & key combos
  • Key press/release control
  • Hold key functionality

Screen Operations

  • High-quality screenshots
  • Screen size detection
  • Active window capture

Automation Providers

MCPControl supports multiple automation providers for different use cases:

  • keysender (default) - Native Windows automation with high reliability
  • powershell - Windows PowerShell-based automation for simpler operations
  • autohotkey - AutoHotkey v2 scripting for advanced automation needs

Provider Configuration

Configure the automation provider using environment variables:

# Use a specific provider for all operations
export AUTOMATION_PROVIDER=autohotkey

# Configure AutoHotkey executable path (if not in PATH)
export AUTOHOTKEY_PATH="C:\Program Files\AutoHotkey\v2\AutoHotkey.exe"

Or use modular configuration for specific operations:

# Mix and match providers for different operations
export AUTOMATION_KEYBOARD_PROVIDER=autohotkey
export AUTOMATION_MOUSE_PROVIDER=keysender
export AUTOMATION_SCREEN_PROVIDER=keysender  
export AUTOMATION_CLIPBOARD_PROVIDER=powershell

Known Limitations

  • Window minimize/restore operations are currently unsupported
  • Multiple screen functions may not work as expected, depending on setup
  • The get_screenshot utility does not work with the VS Code Extension Cline
  • Some operations may require elevated permissions depending on the target application
  • Only Windows is supported
  • MCPControl works best at 1280x720 resolution, single screen. Click accuracy is optimized for this resolution.

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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