使用说明
computer-use
MCP server providing computer use capabilities (mouse, keyboard, screenshots, screen recording) on Linux/X11.
Communicates over stdio using the MCP protocol.
Requirements
- Linux with X11 at 1920x1080 resolution
xdotoolandffmpeginstalled- CPU with AVX2 support
Tools
| Tool | Description |
|---|---|
left_click(x?, y?) |
Left click with 3-screenshot flow (pressed, loading, loaded) |
left_double_click(x?, y?) |
Double-click the left mouse button |
right_click(x?, y?) |
Right-click |
middle_click(x?, y?) |
Middle-click |
mouse_move(x, y) |
Smooth mouse move with ease-in-out interpolation |
scroll(x?, y?, amount) |
Smooth scroll (positive = down, negative = up) |
screenshot() |
Capture screenshot |
key(keys) |
Press key combo (e.g. ctrl+c, Return, alt+Tab) |
type(text) |
Type text string |
start_recording() |
Begin screen recording with frame deduplication |
stop_recording() |
Stop recording and return file path |
add_recording_marker(title, description) |
Insert a 3-second marker scene into the recording |
All coordinates are in 1456x819 space (scaled to 1920x1080 internally).
Usage with Claude Code
- Download the latest release binary:
mkdir -p ~/.local/bin
curl -L -o ~/.local/bin/computer-use \
https://github.com/PegasisForever/computer-use/releases/latest/download/computer-use-linux-x86_64
chmod +x ~/.local/bin/computer-use
- Add the MCP server to your Claude Code settings (
~/.claude/settings.json) (note: you need to use full path here):
{
"mcpServers": {
"computer-use": {
"command": "/home/YOUR_USER/.local/bin/computer-use"
}
}
}
- Restart Claude Code. The computer use tools will be available automatically.
Testing locally with MCP Inspector
MCP Inspector lets you interact with MCP servers directly in the browser.
- Build the server:
cargo +nightly build --release
- Launch the inspector, pointing it at the binary:
npx @modelcontextprotocol/inspector target/release/computer-use
- Open the URL printed by the inspector (usually
http://localhost:6274). You can browse the available tools, call them with parameters, and see the returned screenshots.
Building from source
# Requires Rust nightly (for std::simd)
cargo +nightly build --release
The binary is at target/release/computer-use.
Creating a release
./release.sh
This compiles a production binary, strips debug symbols, and creates a GitHub release tagged with the version from Cargo.toml.
