Use a remote computer through MCP
AnyRemote connects an MCP-capable AI client to a computer running the AnyRemote CLI. Use it to inspect a project on an office workstation, follow a build on a lab machine, or read an attached board’s serial output from the same conversation.
The AI client, the hosted relay and the target computer have different jobs. This guide explains those boundaries and walks through a small task whose results you can check. Use the Quick Start for the client’s current connection screens.
Reviewed · Maintained by Panda Intelligence Software LTD · CLI 0.3.5
Example commands and MCP arguments. Replace device, session and path placeholders with values from your own results.
Where the tools run
The AI client requests tools through the HTTPS /mcp endpoint. The CLI on your target computer connects outward to the relay and executes the file, process, screenshot or serial operation there. The relay is not a second copy of your development environment.
With the hosted service, tool arguments and results travel through the relay and your chosen AI provider. They can contain file contents, terminal output or screenshots. A private relay is an enterprise deployment discussion; it does not by itself keep data away from a cloud AI provider.
AI client ⇄ HTTPS MCP relay ⇄ outbound CLI on your computerLocal MCP and remote MCP serve different connections
| Connection | What to expect |
|---|---|
| Local stdio MCP | The client launches or talks to a local server process. That server’s own tools and configuration determine what it can access. |
| Hosted remote MCP | The client connects to a network endpoint and authenticates. AnyRemote’s local CLI then executes tools on the enrolled computer. |
| Several connected computers | Choose a device from devices.list. Supply its deviceId when several devices are online rather than assuming the assistant picked the intended machine. |
Connect the target computer
Start the CLI where the work should run
Use Node.js 20.9 or later. Run this on the target computer and keep the process open. It is a foreground connection, not an installed background service.
npx @panda-ai/anyremote@latest remoteApprove the device when prompted
Sign in to the AnyRemote account that should own the computer. Follow the browser approval prompt or the URL printed by the CLI. Later starts can reuse a valid saved identity for the same origin; remote --reauth requests authorization again.
Add the remote MCP endpoint to the AI client
Add https://anyremote.dev/mcp in Claude, ChatGPT, Gemini, Cursor or a compatible remote MCP client, then sign in with the same AnyRemote account. Account eligibility and connection screens vary by client. Follow the Quick Start’s official provider links rather than entering a bearer token by hand.
Run a small task and keep the returned handles
These are MCP tool names and their argument objects, not shell commands. Replace DEVICE_ID, PROCESS_ID and ~/project with your real results and project path. Begin with a project file you already expect to exist.
devices.list
Check the name, platform and online state, then keep the exact device ID for the rest of the task. A registered device that is offline cannot execute the next request.
{}files.read
Read a bounded part of a known file. Use nextCursor from the result to continue a large file. If you later write it, use its returned version as expectedVersion to reject a stale replacement.
{ "deviceId": "DEVICE_ID", "path": "~/project/README.md", "maxBytes": 8192 }files.search
Search a chosen directory for a literal text fragment. This example bounds the scan and result count; it is not a promise to scan every file instantly. Continue with nextCursor when present.
{ "deviceId": "DEVICE_ID", "root": "~/project", "query": "TODO", "mode": "content", "maxFiles": 500, "limit": 20 }process.start
Run a known executable with arguments as separate strings. This example uses the Node runtime already required by the CLI and prints its platform. It does not enable a shell or change project files.
{ "deviceId": "DEVICE_ID", "command": "node", "args": [ "-e", "console.log(process.platform)" ], "waitMs": 1000, "maxBytes": 8192 }process.read
Keep processId from process.start to follow the task or retrieve remaining pages, even after it exits. process.start already returns output and nextCursor: use that nextCursor to continue without duplicates. This cursor 0 example rereads the retained buffer from the beginning. Cursors count normalized UTF-8 buffer bytes.
{ "deviceId": "DEVICE_ID", "processId": "PROCESS_ID", "cursor": 0, "waitMs": 1000, "maxBytes": 8192 }screen.capture
Optionally inspect the target desktop. The result is a PNG, not mouse or keyboard control or a video stream. A graphical session and OS permissions are required; a headless server may have no desktop to capture.
{ "deviceId": "DEVICE_ID" }
Decide whether the task actually succeeded
| Result | Next action |
|---|---|
| running: true | The response wait ended while the process continues. Read the same processId again; starting another process is not a refresh. |
| running: false and exitCode: 0 | The command exited normally. Check its output against the specific task; a zero exit code does not prove a board flashed or a GUI looks right. |
| A nonzero exitCode or stderr | Inspect the actual error and fix the command or environment before retrying. Tool transport success and command success are different. |
| truncated: true | Continue with nextCursor. This flag may mean there is another page; it does not by itself establish that output was lost. |
| outputStartCursor greater than the requested cursor | Earlier bytes were evicted from the buffer. Continue with the returned cursor and account for missing output instead of claiming a complete log. |
| An interactive process | Use process.write with that processId only when the program expects stdin; include its required newline. Use process.stop when the task should end. |
Troubleshoot the connection before changing the task
| Symptom | Check |
|---|---|
| Device is offline | Restart the CLI on that computer, keep it open and check its network connection. A browser account session alone does not connect a machine. |
| The client shows no devices or the wrong environment | Use the same AnyRemote account and origin for the CLI and client. Production and Preview are separate environments. |
| The assistant cannot choose between machines | Run devices.list again and pass an explicit deviceId on subsequent tools. |
| New tools are missing in the client | Refresh or reconnect the MCP integration using the client’s supported flow. Client UI and plan availability can change. |
| Screenshot fails | On macOS grant the terminal screen-recording permission. On Linux use a graphical session with grim, gnome-screenshot or scrot. Windows capture uses the primary display. |
Extend the workflow to hardware deliberately
For an ESP32 or another serial device, enable selected ports on the target CLI and use serial.* with the chosen deviceId. Node.js is required on the device side; exposing a computer does not automatically expose every USB device.
The companion ESP32 guide covers port discovery, session handles, UART cursors and board-specific control. First verify a small read-only task, then introduce file changes, long-running commands or hardware actions with a result you can independently check.