opencode-computer-use
Allows AI agents to control the macOS desktop by taking screenshots, reading the accessibility tree, and performing mouse, keyboard, and window-management actions for GUI testing and app automation.
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., "@opencode-computer-useOpen Safari, take a screenshot, and describe what's on screen."
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.
opencode-computer-use
An MCP server that gives opencode hands and eyes on macOS.
Screenshots · Mouse · Keyboard · Accessibility tree · App & window management
Let your agent launch the app, look at the screen, click the right button, type into the field, and verify the result.
Why
Testing an application by using it is the most honest test there is. This MCP server lets opencode drive your Mac the way a human tester would:
See — take a screenshot and reason about what's on screen
Target — read the accessibility tree to get exact coordinates and element values
Act — click, drag, scroll, type, press key combos, trigger menu items
Verify — screenshot again, or re-read the UI tree to confirm the result
Everything runs locally via a small Swift helper that talks to CoreGraphics (events, screen capture) and the macOS Accessibility API.
Related MCP server: macos-desktop-control
Requirements
macOS (Apple Silicon or Intel)
Xcode Command Line Tools (
xcode-select --install) — for the Swift compilerNode.js 18+
Two macOS permissions, granted to whatever app hosts the server (Terminal, iTerm, VS Code, ...):
Permission | Used for | Where to grant |
Accessibility | Mouse clicks, keyboard events, accessibility tree | System Settings → Privacy & Security → Accessibility |
Screen Recording | Screenshots, window titles | System Settings → Privacy & Security → Screen Recording |
Run the
computer_permissionstool (orbin/computeruse perms --prompt) at any time to check status — it can open the right System Settings panes for you.
Install
git clone https://github.com/virajshoor/opencode-computer-use.git
cd opencode-computer-use
npm install && npm run build # compiles Swift helper → bin/ and TypeScript → dist/Configure opencode
Add to ~/.config/opencode/opencode.json:
{
"mcp": {
"computer-use": {
"type": "local",
"command": ["node", "/absolute/path/to/opencode-computer-use/dist/index.js"]
}
}
}Restart opencode — you should see the computer_* tools appear.
Works with any MCP client (Claude Desktop, Cursor, etc.) — the server speaks standard MCP over stdio.
Tools (17)
Eyes
Tool | What it does |
| Capture screen / region / display, returned as an image the model can see (auto-downscaled, JPEG) |
| Connected displays with bounds |
| Check Accessibility & Screen Recording status, optionally open System Settings |
Hands
Tool | What it does |
| Move + click (left/right/middle, single/double/triple) |
| Mouse positioning / hover |
| Smooth press-drag-release (sliders, DnD, text selection, window moves) |
| Wheel events at a point (positive dy = down, dx = right) |
| Unicode text typing into the focused element |
| Key combos: |
Eyes-on-the-inside
Tool | What it does |
| Full accessibility tree of any app — roles, titles, values, frames. The precise-targeting superpower |
| What UI element lives at (x, y)? Check before you click |
| On-screen windows with app, title and bounds |
| Running GUI apps with pids and frontmost state |
Control
Tool | What it does |
| Launch / activate / quit an app by name or bundle id |
| Click any menu path ( |
| Escape hatch — full AppleScript for anything else (dialogs, UI scripting) |
| Sleep between steps |
The workflow
┌─────────────┐ ┌──────────────┐ ┌─────────────┐ ┌──────────────┐
│ screenshot │───▶│ read_screen │───▶│ click / type │───▶│ screenshot │
│ (see it) │ │ (exact x,y) │ │ (do it) │ │ (verify it) │
└─────────────┘ └──────────────┘ └─────────────┘ └──────────────┘Example agent loop:
Agent: "Let me test that the settings save button works."
computer_screenshot→ sees the app ·computer_read_screen→ finds "Save" button at (812, 404) ·computer_click→ clicks it ·computer_read_screen→ confirms the "Saved ✓" toast appeared
How it works
opencode ──MCP/stdio──▶ dist/index.js ──exec──▶ bin/computeruse (Swift)
TypeScript MCP server ├── CGEvent: mouse & keyboard
17 tools, zod-validated ├── screencapture + sips: screenshots
└── AXUIElement: accessibility treeThe Swift helper is a single-file CLI (swift/ComputerUse.swift, ~600 lines) — no external dependencies, no daemon. Each tool call is one short-lived process.
Testing it yourself
A minimal raw-protocol client is included:
node scripts/test-mcp.mjs # drives TextEdit: launch → click → type → verify → cleanupSecurity notes
This tool gives an agent full control of your Mac. It can click, type, and read any app's UI. Only enable it for sessions where you're comfortable with that.
All actions happen on your real user session with your real permissions. There is no sandbox.
The
computer_applescripttool is an arbitrary-code escape hatch — treat it accordingly.Nothing is sent anywhere except between opencode and the local server process.
Known limitations
Menu traversal uses System Events (AppleScript) rather than raw AX — more reliable across macOS versions, but requires the host app to have Automation permission on first use.
macOS 26's SwiftUI apps (e.g. Calculator) expose empty button titles in AX — use
computer_screenshot+ visual coordinates for those.Screenshots are downscaled to 1800px max (pass full-res intent through
full-resin the CLI if you need every pixel).
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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.
Related MCP Connectors
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Drive real Android & iOS devices and web browsers from natural language for mobile + web QA. 290+ tools across device control, app management, automation sessions, browser automation, and flow recording / replay. Bearer-auth — get a token at robotactions.com → Profile → API Tokens.
Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to automate macOS desktop tasks including mouse control, keyboard input, screenshots, window management, and UI interaction.7415MIT
- AlicenseNot gradedqualityDmaintenanceProvides native macOS desktop automation for AI agents, enabling screen capture, mouse/keyboard control, window management, and iOS/Android simulator control in both foreground and background modes without focus stealing.3MIT
- FlicenseNot gradedqualityDmaintenanceEnables GUI automation by capturing screen, controlling mouse/keyboard, and targeting controls via accessibility layer; optionally supports voice commands and synthesis.-
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to control macOS via accessibility and screen recording, providing tools to list apps, observe UI, click, type, press keys, and scroll.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/virajshoor/opencode-computer-use'
If you have feedback or need assistance with the MCP directory API, please join our Discord server