Better Remote Commander
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Better Remote Commander
Self-hosted remote control of your own computers from Claude and ChatGPT. Files, terminal and processes on any machine you pair — through a relay you host, on your domain.
Claude / ChatGPT ──HTTPS (OAuth 2.0)──▶ relay (your server or PC) ──outbound WebSocket──▶ agent on your machineClaude: add the relay as a custom connector (remote MCP). Works in claude.ai web, desktop and mobile.
ChatGPT: add the relay as a remote MCP connector.
Your infrastructure: run the relay on a VPS, or on your PC behind a Cloudflare Tunnel / ngrok. SQLite, one container, no third-party service.
Many machines: pair Windows, macOS, Linux boxes and containers to one relay; agents only connect outbound.
Control: browser dashboard to pair, pause, rename and remove devices, manage OAuth clients and see an audit log.
Features
Remote MCP relay with OAuth 2.0 (dynamic client registration, PKCE) and API keys, for Claude and ChatGPT.
Device pairing: the agent shows a code, you approve it in the browser. Device tokens are stored hashed.
Multi-device: every tool takes an optional
deviceId. With one device online it is picked automatically.Outbound-only agents: no open ports on your machines. Automatic reconnect, heartbeat and re-pairing.
Admin dashboard (
/admin): rename, pause, resume and delete devices, view the audit log and stats./auth/clientsmanages OAuth clients and/auth/apikeysmanages API keys.Audit log of every tool call, and per-device pause switch.
Encrypted file transfer between devices (see below).
One-shot commands (
run_command): run a command and get exit code, stdout and stderr in a single call, with timeout and process-tree kill.Multi-edit:
edit_blockapplies several find/replace edits to a file in one call, all-or-nothing.Blocking search:
start_searchwithwait: truereturns all results in one call (grep-style).Ranged multi-file reads:
read_multiple_filesaccepts per-file line ranges.Workers (
run_parallel,spawn_job,wait_jobs): the AI splits work into pieces that run in parallel on the device as background jobs, then collects the results. No extra model or API key needed.Safe delete (
delete_file) and git helpers (git_status,git_diff,git_log).Fast agent: heavy document libraries (Excel, PDF, DOCX) load on demand, system info is cached, telemetry work is skipped when disabled and usage stats are saved in batches. Startup is ~3x faster with ~70% less memory, and per-call overhead dropped from ~160 ms to a few ms.
Fast commands and reads: simple commands skip the slow shell start-up. On Windows, a plain
program argscommand for a real.exe/.cmdruns throughcmd.exeinstead of PowerShell (~200 ms -> ~50 ms). On macOS and Linux, the bash/zsh login environment is captured once and reused instead of reloading your profile for every command. Anything that needs the shell itself (pipes, variables, aliases, cmdlets, profile functions) still runs in your shell as before;BRC_FAST_EXEC=0turns this off.read_filefinds lines by scanning bytes, so reads deep into large files are fast and exact, and blocking search returns as soon as ripgrep finishes.edit_block's fuzzy fallback runs inline for small files and in a reused worker for large ones, andlist_directoryreads subdirectories concurrently.OS service install (
--install-service) so the agent starts at login.Security: login rate limiting, signed session cookies, security headers, blocked-command list and
allowedDirectorieson the agent. SeeSECURITY.md.Deployment: Docker Compose profiles for Caddy (auto-TLS), Cloudflare Tunnel, ngrok or localhost.
Android agent (branch
feat/android-agent): native Kotlin agent that exposes Android-specific tools (accessibility automation, screenshots, notifications, contacts, SMS, location, camera/mic capture, screen recording, app install, automation jobs, Shizuku/Device Owner modes). See docs/android-agent.md.
Related MCP server: MCP-MyPC
Tools available to the AI
The relay adds list_devices, search_mcp_registry and request_plugin_install. The agent provides 42 tools,
derived from Desktop Commander plus BRC additions, and any number of plugin tools (see Plugins below).
Category | Tools |
Devices |
|
Plugins |
|
Code structure |
|
Config |
|
Files |
|
Editing |
|
Search |
|
Commands |
|
Processes |
|
Git |
|
Workers |
|
File transfer |
|
Diagnostics |
|
Note: write_pdf downloads Chrome on first use.
Fewer round trips
These cut the number of calls the AI needs for common work (each call crosses the relay):
run_command: run a non-interactive command and get exit code, stdout and stderr in one call. stdin is closed so prompts fail fast; on timeout (default 60s, max 110s) the process tree is killed; output is capped, keeping the beginning and end. Usestart_processonly for REPLs and servers.edit_blockmulti-edit: passedits: [{old_string, new_string, expected_replacements?}, ...]. Edits apply in order; for text files it is all-or-nothing (nothing is written if any edit fails).start_searchwithwait: true: blocks until done and returns grep-style results (stops atmaxResults, default 200, ortimeout_ms, default 30s).read_multiple_filesranges:files: [{path, offset, length}]alongsidepaths.delete_file: deletes a file or directory (recursive: truefor non-empty). Refuses filesystem roots, the home directory and allowed roots.git_status/git_diff/git_log: compact git output with size caps.
All path arguments respect allowedDirectories, and commands respect blockedCommands.
Workers: parallel and background jobs
The AI in your chat (Claude, ChatGPT, ...) stays the only one that thinks. It splits a task into pieces and hands them to workers on the device, which run in parallel and report back. This works through the plain MCP connector: no API key, no second model.
AI plans the task
-> run_parallel / spawn_job x N (workers run at the same time, on one or many devices)
-> wait_jobs (collects each worker's result; call again until all are done)
-> AI reads the results, decides the next steprun_parallel: several tool calls and/or commands at once, all results in one call, in input order. Items:{tool, args}(any BRC tool) or{command, cwd?, timeout_ms?}. Calls still running aftertimeout_ms(default 90s, max 100s) keep going as background jobs (wait_jobs({group})).spawn_job: start a background job and get its id immediately. A job is onecommandor a list ofstepsrun in order (e.g.edit_block-> build -> test); a failed step stops the job unlesscontinue_on_error. Jobs are not limited by the 2-minute call timeout (default 30 min, max 6 h). Up to 4 jobs run at once (BRC_MAX_JOBS), the rest are queued. Usegroupto handle related jobs together.wait_jobs: wait up to 100s for jobs (ids,group, or everything pending).mode: "any"returns as soon as one more finishes. Each finished job's output is shown once.get_job(full output),list_jobs,cancel_job(kills the process tree).
Job steps go through the normal tool dispatcher, so allowedDirectories and blockedCommands apply. Finished
jobs are saved to $BRC_HOME/jobs/ and are still listed after an agent restart.
Encrypted file transfer
Move a file from one paired device to another without routing it through the relay. The encrypted blob is hosted temporarily on tmpfiles.org:
prepare_file_transferon the destination. Returns areceiveIdandrecipientPublicKey.send_file_transferon the source with that public key. The file is encrypted and uploaded; it returns atransferTokenholding the download URL and a wrapped key (never the raw AES key).receive_file_transferon the destination with thereceiveIdandtransferToken. It downloads, authenticates, decrypts and saves the file.
Plugins: extra MCP servers on your devices
The agent can run other MCP servers on the device and pass their tools to your AI through two tools,
list_plugin_tools and call_plugin_tool, so the tool list stays small. Plugins start the first time they are used.
Installed automatically on first start (in the background, once; later starts only check files on disk):
Plugin | What the AI gets | Default |
| Control a real browser (uses your Chrome/Edge if installed) | on |
| Screenshots, mouse and keyboard | on for Windows and Linux (skipped without a display), off on macOS |
| Powers | on |
| Shorter command output in | on |
| Go to definition, find references, symbol edits | on, needs Python |
| PDF, Word, Excel, PowerPoint to Markdown | on, needs Python |
Everything goes into ~/.brc ($BRC_HOME): no Docker, no admin rights, no PATH changes. Versions are pinned and
downloaded programs are checked against a sha256. For the Python plugins the agent uses your Python 3.10+ if it has
one, otherwise it downloads uv and a private Python into ~/.brc. Only if both
fail does it ask you to install Python (the python.org installer is downloaded but never run for you; on Linux it
shows the package-manager command). On macOS, computer-use also needs Screen Recording and Accessibility permission.
Marketplace: /admin/marketplace searches the official MCP Registry
and installs npm, PyPI or hosted (https) servers on the devices you pick; Docker-only servers are not supported.
A Custom form adds any npm package, PyPI package, command or URL. API keys you enter go straight to the device
(stored in ~/.brc/plugins.json, mode 0600) and are never stored on the relay. The AI can search the registry and
request an install with request_plugin_install, but nothing is installed until you approve it in /admin.
Plugins run with your user account's permissions; BRC's allowedDirectories do not apply inside a plugin.
Agent flags: --list-plugins, --add-plugin <id> (or --add-plugin <id> --npm pkg@1.2.3 | --pypi pkg==1.2.3 | --command "cmd args" | --url https://... [--env KEY=VALUE]), --remove-plugin <id>, --enable-plugin <id>,
--disable-plugin <id>, --update-plugins, --no-plugins (or BRC_PLUGINS=none). Set
BRC_PLUGIN_REMOTE_ADMIN=0 on a device to refuse plugin changes from the relay.
Install
1. Relay (once, on a server or your PC)
Docker (recommended)
git clone https://github.com/shahidx0x/better-remote-commander.git && cd better-remote-commander
cp .env.example .env # set PUBLIC_URL, BRC_ADMIN_PASSWORD, BRC_SESSION_SECRET
docker compose --profile cloud up -d # VPS with your domain (Caddy, auto-TLS)
docker compose --profile tunnel --profile cloudflare up -d # your PC via Cloudflare Tunnel
docker compose --profile tunnel --profile ngrok up -d # your PC via a static ngrok domain
docker compose --profile local up -d # localhost only (testing)Images are published to ghcr.io/shahidx0x/better-remote-commander/relay and /agent.
Without Docker
npm i -g brc-relay
PUBLIC_URL=https://rdp.example.com BRC_ADMIN_PASSWORD=... BRC_SESSION_SECRET=... brc-relayPut it behind any HTTPS reverse proxy (Caddy, nginx, Cloudflare Tunnel) that forwards WebSockets, and set TRUST_PROXY=true.
2. Agent (on every machine you want to control)
npm i -g brc-agent # any OS with Node 22.13+
brc-agent --relay https://rdp.example.com --name "My PC"The agent prints a pairing code and opens https://rdp.example.com/device/verify; sign in and approve.
Then make it start at login: brc-agent --install-service.
Docker agent (Linux servers): docker run -d -v brc-agent:/home/rdp/.brc -e BRC_RELAY=https://rdp.example.com -e BRC_NAME=srv1 ghcr.io/shahidx0x/better-remote-commander/agent
Android phone (branch feat/android-agent): build the APK from apps/android-agent, install it, enter your relay
URL and approve the pairing. Full guide, tool list and permissions: docs/android-agent.md.
3. Connect your AI
Claude: Settings → Connectors → Add custom connector → URL
https://rdp.example.com/mcp→ Add → Connect → sign in → Allow.ChatGPT (MCP): Settings → Connectors → add
https://rdp.example.com/mcp.
Useful URLs on your relay: /admin (devices, audit), /device/verify (pairing), /auth/clients, /health.
Build from source
pnpm install && pnpm build && pnpm test
node packages/relay/dist/cli.js # relay
node packages/agent/dist/cli.js # agentRequires Node 22.13+ (uses node:sqlite) and pnpm 11. Design notes: docs/architecture.md. Security notes: SECURITY.md.
License
MIT — see LICENSE.
Credits
The agent's tool implementation (packages/agent/src/core) is derived from
Desktop Commander MCP by Eduard Ruzga and contributors (MIT).
Desktop Commander's hosted remote relay is proprietary; this project provides an open, self-hostable relay with the same
device-agent model, plus OAuth for Claude/ChatGPT, device pairing, and a browser dashboard. See NOTICE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Give your AI hands on every computer you own. Remote control of your Windows, Mac and Linux machines from one ChatGPT, Claude or Cursor chat — even from your phone. Ask it to find out why the office server is crawling, update every PC in the house, sort out your mom's laptop from another city, or ship the site from your work machine while you're on a train. It runs commands and reads and writes files; screenshots are a beta you can request. You decide what each computer allows, and you can cut any of them off in a second.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to securely reach and control tools running on your own computers through a relay and outbound device agent.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants like Claude, Codex and ChatGPT to actually operate a computer — finding files, running commands, taking screenshots and driving a browser — and, after a one-time pairing, to help on family members' computers anywhere. Connections between machines are end-to-end encrypted through a relay, requiring no VPN, port forwarding or router setup.1MIT
- AlicenseNot gradedqualityBmaintenanceConnects ChatGPT and Claude to your own machine so they can read and edit files, search paths and text, run shell, Git, build and test commands, and keep cross-conversation memory and reusable skills. It exposes these capabilities as 14 Model Context Protocol tools over a remote Streamable HTTP endpoint with API key or OAuth authentication, plus an operator dashboard for monitoring and configuration.MIT
- FlicenseNot gradedqualityAmaintenanceConnects web-based AI chat clients such as Claude, ChatGPT, and Grok to a local machine through a single OAuth-gated MCP endpoint so they can browse, read, write, and edit files, run whitelisted shell commands, search content, use Git, query SQLite, drive browsers and DevTools, and manage background tasks, ports, and clipboard. It also exposes localhost and LAN services via a protected HTTP client, letting remote or mobile clients debug and operate local projects without granting unrestricted shell access.-