An MCP server that gives AI agents the ability to control mouse cursor and keyboard with security guardrails.
- Mouse Control: move, click, double-click, right-click, drag, scroll
- Keyboard Control: type text, press keys, hotkey combinations
- Screenshots: capture full screen or regions
- Security: session-based control, kill switch, action logging
pip install -e .cursor-control-mcp [config.yaml]Add to claude_desktop_config.json:
{
"mcpServers": {
"cursor-control": {
"command": "cursor-control-mcp",
"args": ["/path/to/config.yaml"]
}
}
}| Tool | Description |
|---|---|
screenshot |
Capture screen or region |
move_cursor |
Move cursor to coordinates |
click |
Click at position |
double_click |
Double-click at position |
drag |
Drag from one point to another |
scroll |
Scroll mouse wheel |
type_text |
Type text string |
press_key |
Press key with modifiers |
hotkey |
Press key combination |
get_status |
Get session status and screen info |
request_control |
Start control session |
release_control |
End control session |
get_action_log |
Get recent action history |
Press Ctrl+Alt+Escape (configurable) to immediately end the session.
- Sessions have a maximum duration (default: 30 min)
- All actions are logged to SQLite database
- No control without active session (except screenshot)
Every action is logged with timestamp and parameters. View logs:
# Via MCP tool
get_action_log(last_n=50)See config.yaml for options:
max_session_minutes: 30
kill_switch_hotkey: [ctrl, alt, escape]
log_all_actions: true
log_path: "~/.cursor-control-mcp/actions.db"- Python 3.10+
- Windows: Works out of the box
- macOS: Works out of the box
- Linux: Requires X11 display (Wayland partial support)
# Windows
pip install -e ".[windows]"
# Linux
pip install -e ".[linux]"
# macOS
pip install -e .MIT