computer
Provides integration with OpenAI's CUA model for AI-driven computer control, enabling screen-based task automation via screenshots and actions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@computeropen Safari and search for weather in NYC"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@hasna/computer
Open-source computer use for AI agents. Control your Mac with Anthropic Claude or OpenAI.
CLI + MCP Server + REST API + SDK
What it does
An AI model sees your screen (via screenshots) and controls your mouse and keyboard to complete tasks — like a remote human operator, but powered by AI.
# Tell the AI to do something on your Mac
computer run "open Safari and search for 'weather in NYC'"
# Take a screenshot
computer screenshot -o screen.png
# View past sessions
computer sessionsRelated MCP server: macinput
Features
Multi-provider — Anthropic (Claude computer use) or OpenAI (CUA)
macOS native — Uses
screencapture+cliclickfor zero-dependency screen controlMCP server — Other AI agents can use your computer as a tool
REST API — Integrate from any language
Session logging — Every action logged in SQLite, fully replayable
SDK — Import and use programmatically in TypeScript/Bun
Install
bun install -g @hasna/computerPrerequisites:
macOS (Apple Silicon or Intel)
Bun runtime
cliclick—brew install cliclickAccessibility permissions (System Settings > Privacy & Security > Accessibility)
An API key:
ANTHROPIC_API_KEYorOPENAI_API_KEY
CLI
computer run <task> # Run a computer use task
computer run <task> -p openai # Use OpenAI instead of Anthropic
computer run <task> -s 30 # Limit to 30 steps
computer open <app> [options] # Open an app deterministically via its driver
computer apps # List app drivers + availability
computer screenshot # Capture current screen
computer sessions # List past sessions
computer session <id> # Show session details + action log
computer stats # Usage statisticsApps
Beyond AI-driven tasks (computer run), computer ships deterministic app
drivers that open and arrange desktop apps with zero AI in the loop — windows,
tabs, pane grids, and a command per pane.
computer apps # List registered drivers and availability
computer open <app> [options] # Open/orchestrate an app via its driverOptions for computer open:
Option | Description |
| Split the window into R rows x C cols (panes fill row-major: left-to-right, top-to-bottom) |
| Multiple tabs in one window, each with its own grid (e.g. |
| Command for the next pane in order (repeatable); with |
| Run the single |
| Working directory — every pane |
| Maximize the new window (not native fullscreen) |
Examples:
# 2x2 grid, run codewith in all four panes, maximized
computer open ghostty --grid 2x2 --run "codewith" --all --max
# 2x2 grid with a different command per pane
computer open ghostty --grid 2x2 --run "htop" --run "btop" --run "vim" --run "bun dev"
# Three tabs (2x2, then two 1x2), every pane cd'd into the project
computer open ghostty --tabs "2x2,1x2,1x2" --dir ~/Workspace/myprojectDrivers:
ghostty — Ghostty terminal (macOS, Ghostty 1.3+). Uses Ghostty's native AppleScript dictionary for windows, tabs, and splits. Requires
/Applications/Ghostty.app(orghosttyon PATH).
Drivers are app-generic: each implements available() (with a reason when
unavailable, e.g. on Linux) and open(spec). New drivers register in
src/apps/registry.ts.
The same surface is exposed over MCP via computer_open_app
(params: app, grid, tabs, run[], all, dir, max — falls back to a
plain macOS app launch for apps without a driver) and computer_list_apps.
MCP Server
Add to your Claude Code config:
{
"mcpServers": {
"computer": {
"command": "computer-mcp"
}
}
}HTTP mode
Shared Streamable HTTP transport for multi-agent sessions (stdio remains the default):
computer-mcp --http # http://127.0.0.1:8806/mcp
MCP_HTTP=1 computer-mcp # same via env
computer-mcp --http --port 9000 # override portHealth:
GET http://127.0.0.1:8806/health→{"status":"ok","name":"computer"}MCP endpoint is also mounted on
computer-serveat/mcp.
Available tools:
computer_run_task— Run a full computer use taskcomputer_screenshot— Capture the screencomputer_click— Click at coordinatescomputer_type— Type textcomputer_key— Press keyscomputer_scroll— Scrollcomputer_mouse_move— Move the mousecomputer_open_url— Open a URLcomputer_open_app— Open an appcomputer_screen_size— Get screen resolutioncomputer_list_sessions— List sessionscomputer_get_session— Get session detailscomputer_stats— Usage stats
REST API
computer-serve # Starts on port 19450# Run a task
curl -X POST localhost:19450/run -d '{"task":"open calculator"}'
# Take a screenshot
curl localhost:19450/screenshot
# Execute a single action
curl -X POST localhost:19450/action -d '{"type":"click","point":{"x":500,"y":300}}'
# List sessions
curl localhost:19450/sessionsSDK
import { runTask, captureScreenshot, createMacDriver } from "@hasna/computer";
// Run a full task
const session = await runTask({
task: "open Notes and create a new note",
provider: "anthropic",
maxSteps: 20,
onStep: (step, response, result) => {
console.log(`Step ${step}: ${response.action?.type}`);
},
});
// Or control manually
const driver = createMacDriver();
const screenshot = await driver.screenshot();
const result = await driver.execute({
type: "click",
point: { x: 500, y: 300 },
});How it works
Screenshots your screen
Sends the screenshot to the AI model (Claude or GPT)
The model analyzes what's on screen and returns an action (click, type, scroll, etc.)
The action is executed on your Mac
A new screenshot is taken
Repeat until the task is done (or max steps reached)
Providers
Provider | Model | Tool |
Anthropic | Claude Sonnet 4.5 (default) |
|
OpenAI |
| CUA Responses API |
Data
Sessions and action logs are stored in ~/.hasna/computer/computer.db (SQLite).
Storage Sync
Optional Postgres sync is available through package-local commands:
export HASNA_COMPUTER_DATABASE_URL=postgres://...
computer storage status
computer storage push
computer storage pull
computer storage syncThe MCP server also exposes storage_status, storage_push, storage_pull, and storage_sync.
COMPUTER_DATABASE_URL is accepted as the non-Hasna fallback database URL.
License
Apache-2.0
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hasna/computer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server