mcp-osascript
About
Let Claude control your Mac — 12 typed tools for windows, menus, keyboard, clipboard, browser tabs
Details
- Author
- m0rvayne
- Categories
- Other, Automation, Productivity
Jump to
Setup
Install mcp-osascript in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/m0rvayne/mcp-osascript
Follow the installation instructions in the repository README, then restart your MCP client.
Let Claude control your Mac.Move windows, click menus, type text, read clipboard, manage browser tabs — 12 typed tools with input validation and security guardrails.
{ "mcpServers": { "osascript": { "command": "npx", "args": ["-y", "mcp-osascript"] } } }
Add this to your Claude Desktop config (Settings → Developer → Edit Config), restart Claude, and you're ready.
{ "mcpServers": { "osascript": { "command": "npx", "args": ["-y", "mcp-osascript"] } } }
claude mcp add osascript -- npx -y mcp-osascript
git clone https://github.com/m0rvayne/mcp-osascript.git cd mcp-osascript && npm install # then use: "command": "node", "args": ["/path/to/mcp-osascript/server/index.js"]
12 typed tools, each with input validation, error classification, and permission-aware error messages.
When Claude tries to click a menu item that doesn't exist, the server automatically returns the list of available items at that level — so Claude can retry with the correct name. No other MCP server does this.
User: "Click File → Export as PDF in Preview" Claude: calls app_menu click ["File", "Export as PDF"] Server: "Menu item 'Export as PDF' not found in 'File'. Available: ['New from Clipboard', 'Open...', 'Close', 'Save', 'Duplicate', 'Rename...', 'Export...', 'Export as PDF...']" Claude: calls app_menu click ["File", "Export as PDF..."] Server: "Clicked: File > Export as PDF..."
- No permission needed— clipboard, notifications, URLs, apps. Works immediately.
- Automation— browser tabs, frontmost app. macOS prompts once per browser.
- Accessibility— keyboard, windows, menus. Grant once inSystem Settings → Privacy & Security → Accessibility.
When a permission is missing, the server tells you exactly what to do:
"Accessibility permission required. Grant access to 'osascript' in System Settings > Privacy & Security > Accessibility."
41 integration tests covering all 12 tools — input validation, security boundaries (URL scheme blocking, prototype pollution, script size limits), timeout enforcement, and permission error handling.
- run_osascriptexecutes arbitrary code — this is by design. The MCP client (Claude) is the trust boundary.
- Scripts piped via stdin to/usr/bin/osascript— no temp files, no TOCTOU race conditions.
- Script size: 50 KB max. Output: 50K chars max (truncated).
- Error messages sanitized — filesystem paths, tokens, and passwords are stripped.
- Child processes get minimal env:PATH,HOME,LANGonly — no API keys or secrets leak.
- URL scheme allowlist —file://,smb://,vnc://,javascript:all blocked.
- Handler dispatch usesObject.create(null)— no prototype pollution.
- Process group kill on timeout — SIGTERM → 2s grace → SIGKILL. No orphaned processes.
- Concurrency semaphore — max 5 simultaneous osascript processes.
- Graceful shutdown —server.close()with 10s force-exit safety net.
- Error classification — parses macOS error codes (-1728, -1743, -25211) into actionable messages. Supports English and Russian locales.
- macOS 13+ (Ventura or later)
- Node.js 18+
GNOME Shell extension + Python MCP server giving AI assistants 30 tools to automate the Linux desktop: screenshots, window management, mouse/keyboard injection, clipboard, and workspaces.
A Python server for remote macOS control via VNC, featuring an AI-powered chat web interface.
A local office automation assistant for file system operations, system command execution, and browser control.
A TypeScript server for automation and integration, featuring Microsoft OAuth, browser control, and basic utilities.
Plugin-based MCP server that gives AI agents access to web applications through the user's authenticated browser session. Chrome extension with 100+ plugins for Slack, Discord, GitHub, Reddit, and more.
An open-source MCP server that allows AI to fully control a remote macOS system.
List, open, and run shortcuts from the macOS Shortcuts app.
Hosted remote MCP server with managed OAuth for a growing list of 15+ toolkits, including Google Workspace, Last.fm, MusicBrainz, Fitbit, Oura, Kalshi, and Polymarket.
Zo is your personal vibe server in the cloud with 50+ tools and integrations. Add texting, email, calendar, research and more to your harness easily.
the local MCP server for safe desktop control
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


