loading…
Search for a command to run...
loading…
Enables AI services like Claude and Cursor to remotely control a Mac by executing shell commands, managing files, and running AppleScript for UI automation. Acc
Enables AI services like Claude and Cursor to remotely control a Mac by executing shell commands, managing files, and running AppleScript for UI automation. Access is secured through OAuth 2.0 authentication and encrypted tunnels to protect remote interactions.
An MCP server that gives AI services (Claude, Cursor, etc.) remote control of your Mac — execute shell commands, read/write files, and run AppleScript — secured with OAuth 2.0 + PKCE.

Claude searches for a tteok shop on Naver Maps, gets driving directions, takes a screenshot, and emails the result. All done in the Claude app on iOS.
zsh) asynchronously and returns stdout, stderr, and exit codefs.promises — no shell injection surface~/Public/mcp-files/ via browser or any HTTP clientThis server provides remote shell execution on your Mac.
rcmcp auth on your local machine. The PIN is never written to disk and is only accessible via localhost. Anyone who reaches /authorize without the PIN cannot obtain a token.This server is designed for personal, single-user use behind a private tunnel. Do not expose it to untrusted networks.
>=20.16.0 or >=22.3.0setup.sh handles everything interactively — dependencies, .env, build, tunnel, LaunchAgent, and CLI:
git clone https://github.com/hexpy-games/remote-control-mcp
cd remote-control-mcp
./setup.sh
git clone https://github.com/hexpy-games/remote-control-mcp
cd remote-control-mcp
npm install
cp .env.example .env
# Edit .env — set BASE_URI to your tunnel URL
npm run build
npm start
Then set up a tunnel (see below) and add the server URL to your AI client.
Never expose the server over plain HTTP. Always terminate TLS — via a tunnel or a reverse proxy:
setup.shautomates Options 1 and 2 (Cloudflare Tunnel and ngrok).
brew install cloudflared
# Permanent subdomain (requires free Cloudflare account)
cloudflared tunnel login
cloudflared tunnel create remote-control-mcp
cloudflared tunnel route dns remote-control-mcp your-subdomain.yourdomain.com
# Set BASE_URI=https://your-subdomain.yourdomain.com in .env
cloudflared tunnel run remote-control-mcp
One-shot (URL changes each run, useful for testing):
cloudflared tunnel --url http://localhost:3232
brew install ngrok
ngrok config add-authtoken <your-token>
ngrok http 3232
# Copy the https URL and set it as BASE_URI in .env
The ngrok free tier assigns a random URL on each restart — update
BASE_URIin.envafter each restart, then runrcmcp restart server. Paid plans support a fixed static domain.
Only use this if you have proper TLS termination in place:
BASE_URI to your domain or public IP in .env# Example: Caddy as a TLS-terminating reverse proxy
brew install caddy
# Caddyfile:
# your-domain.com {
# reverse_proxy localhost:3232
# }
caddy run
After the server is running and a tunnel is up:
In Claude.ai (desktop or web): go to Settings → Integrations → Add Integration and paste your server URL:
https://your-tunnel-url/mcp
Claude will immediately start an OAuth authorization flow.
A browser window will open asking you to approve the connection. This is where you enter the Server PIN.
Get your PIN:
rcmcp auth
This generates a fresh one-time PIN, copies it to your clipboard, and waits for you to complete the authorization:
Authorization PIN
────────────────────────────────────────
9aRs-VhzM (copied to clipboard)
→ Enter this PIN on the /authorize approval page.
⠙ Waiting for authorization...
Paste the PIN into the browser form and click Approve. The terminal will confirm automatically:
✓ Authorization complete
Once authorized, Claude has access to four tools on your Mac:
| Tool | What it does |
|---|---|
shell_exec |
Run any zsh command |
osascript |
Run AppleScript (UI automation, app control) |
file_read |
Read files or list directories |
file_write |
Write files (creates directories as needed) |
Example prompts to try:
Other clients: Any MCP-compatible client (Cursor, Windsurf, etc.) can connect using the same server URL. The OAuth flow is standard.
Copy .env.example to .env and edit as needed.
| Variable | Default | Description |
|---|---|---|
PORT |
3232 |
Port the MCP server listens on |
BASE_URI |
http://localhost:3232 |
Public URL of this server — must match your tunnel URL |
NODE_ENV |
development |
Set to production when deploying |
BLOCKED_COMMANDS |
(empty) | Comma-separated substrings to block in shell_exec |
REDIS_URL |
(unset) | Redis connection URL — required in production |
REDIS_TLS |
0 |
Set to 1 to enable TLS for the Redis connection |
Redis is required in production for token persistence and expiry. Without it, tokens are stored in memory and lost on restart.
# Docker
docker run -d -p 6379:6379 redis:7-alpine
# Homebrew
brew install redis && brew services start redis
Set REDIS_URL=redis://localhost:6379 in .env.
| Tool | Description |
|---|---|
shell_exec |
Execute a zsh command on the Mac. Runs asynchronously; supports concurrent commands. Returns stdout, stderr, and exit code. |
osascript |
Execute an AppleScript. Scripts are written to a private temp directory to prevent TOCTOU races. Use for UI automation and app control. |
file_read |
Read file contents or list a directory. Uses fs.promises directly — no shell spawning. |
file_write |
Write content to a file. Creates intermediate directories if needed. |
BLOCKED_COMMANDS is a last-resort safeguard, not a security boundary. Security is enforced at the OAuth + tunnel layer.rm -rf /, fork bombs, direct disk writes, etc.).setup.sh installs rcmcp, a management CLI for day-to-day operations:
rcmcp status # server + tunnel + file server status and endpoint URL
rcmcp start [server|tunnel|fileserver|all]
rcmcp stop [server|tunnel|fileserver|all]
rcmcp restart [server|tunnel|fileserver|all]
rcmcp logs [server|tunnel|fileserver|all] [-f]
rcmcp url # print current MCP endpoint URL
rcmcp update # git pull → rebuild → restart server
rcmcp uninstall # remove LaunchAgents, binary, and PATH entry
Targets can be abbreviated: srv, tun, fs.
setup.sh can install an optional lightweight file server (port 3835) that serves files from ~/Public/mcp-files/ over HTTP. Useful for sharing or viewing Mac files from any browser, HTTP client, or AI service.
GET https://your-tunnel-url/files/<filename>
Managed via rcmcp start fileserver / rcmcp stop fileserver.
# Run with live reload
npm run dev
# Type-check without emitting
npm run typecheck
# Lint
npm run lint
# Build
npm run build
[bug]. Include OS version, Node version, reproduction steps, and expected vs. actual behavior.[feat]. Describe the use case, not just the solution.mainfeat/ — new featurefix/ — bug fixdocs/ — documentation onlychore/ — tooling, deps, CInpm run lint and npm run typecheck — both must passmain with a clear description of what and whyUse Conventional Commits:
feat: add Tailscale tunnel option
fix: prevent shell_exec hanging on commands with no output
docs: clarify Redis requirement in README
chore: upgrade MCP SDK to 1.25
MIT — Copyright (c) 2026 Hexpy Games & remote-control-mcp contributors
See LICENSE for the full text.
This project is not affiliated with, endorsed by, or sponsored by Anthropic, Claude.ai, or any other AI service provider.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"remote-control-mcp": {
"command": "npx",
"args": []
}
}
}Extract design specs and assets
An Open-Sourced UI to install and manage MCP servers for Windows, Linux and macOS.
Build, validate, and deploy multi-agent AI solutions on the ADAS platform. Design skills with tools, manage solution lifecycle, and connect from any AI environm
MCP Bundles: Create custom bundles of tools and connect providers with OAuth or API keys. Use one MCP server across thousands of integrations, with programmatic