Hawa Computer Use
Hawa Computer Use is a cross-platform computer control server for Hawa Code Agent, allowing AI to automate operations on your computer through screenshots, mouse, and keyboard. It supports Windows, macOS, and Linux.
Installation
Install with:
npm install -g @dahawa/hawa-computer-use |
Use as an MCP Server (Recommended)
Add the following configuration in Hawa Code or other MCP-compatible clients:
{ |
Provided MCP Tools
computer
Interact with the computer through mouse and keyboard, and capture screenshots.
Supported actions (action):
| Action | Description |
|---|---|
get_screenshot |
Capture a screenshot and return an image with element annotations and an element list |
mouse_move |
Move the mouse to the specified coordinates |
left_click |
Left-click (optionally move to specified coordinates first) |
right_click |
Right-click |
middle_click |
Middle-click |
double_click |
Double-click |
left_click_drag |
Drag to the specified coordinates |
scroll |
Scroll the wheel, supports up/down/left/right, and can specify pixels such as down:500 |
key |
Press a keyboard key or key combination, such as ctrl+c or alt+tab |
type |
Type text (automatically handles non-ASCII characters such as Chinese) |
get_cursor_position |
Get the current mouse coordinates |
click_element |
Click by element ID (recommended first choice; more accurate than coordinate clicking) |
System Dependencies
Different platforms require the following optional dependencies to unlock full functionality:
Windows
Works directly on Windows.
MacOS
- AX detection: Grant accessibility permission to the host application (such as Terminal or Hawa Code) in “System Settings → Privacy & Security → Accessibility”
- OCR detection (optional): Install Xcode Command Line Tools
xcode-select --install
Linux
- AT-SPI detection:
# Debian / Ubuntu
sudo apt install python3-pyatspi
# Fedora / RHEL
sudo yum install python3-pyatspi - OCR:
# Debian / Ubuntu
sudo apt install tesseract-ocr tesseract-ocr-chi-sim
# Fedora / RHEL
sudo dnf install tesseract tesseract-langpack-chi_sim - Screenshot tools (install at least one):
gnome-screenshot,scrot, or ImageMagickimport
Environment Variables
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT |
Transport protocol, stdio or http |
stdio |
PORT |
Listening port in HTTP mode | 3000 |
COMPUTER_MCP_DISABLE_A11Y |
Set to 1 to disable accessibility detection and use coordinate mode only |
- |
COMPUTER_MCP_DISABLE_OCR |
Set to 1 to disable OCR fallback and use accessibility detection only |
- |