Skip to main content

RemotePaw

Give your AI agent hands on another computer.

RemotePaw (远程爪) provides remote shell, file transfer and Windows desktop control for AI agents. Use CLI + MCP, powered by the Python standard library, to run commands, move files and operate another computer's desktop from an agent on your laptop.

Source version: v1.3.1. Check GitHub releases and PyPI availability. See Install for installation and identity checks; use source if no verified package is available.

Trusted machines only: the server defaults to all IPv4 interfaces and unencrypted HTTP. Never expose it directly to the internet; use your generated token, not the example below.

# install from a source checkout on each machine first: python -m pip install .
# on the remote machine
remotepaw serve

# on your laptop
remotepaw add box 192.168.1.20:8765 --token=7fK2mQ9xLpA3vN8sR4tYuE1b
remotepaw exec "npm test"        # runs on `box`, output streams back live

One file, zero dependencies, no SSH server required on the remote side.

Python 3.8+ License CI

English · 简体中文


The problem

You build with an AI agent on your laptop. But the thing you're building only runs on that other box — the Windows machine with the GPU, the licensed software, the weird driver.

So you copy commands into RDP, one long line at a time. Every iteration costs you a manual round-trip, and the agent that wrote the code can't see whether it works.

remotepaw closes that loop. The agent gets a shell on the other machine — plus file transfer, background jobs, screenshots, and a control tree for clicking real buttons.

Install

Install from the official source repository on each machine that needs the CLI:

git clone https://github.com/jiaqinq/remotepaw
cd remotepaw
python -m pip install .

Alternatively, only when the official project version is available on PyPI and verified against GitHub releases, the reviewed source and jiaqinq/remotepaw repository identity, install with:

python -m pip install remotepaw

If unavailable or unverified, use the source install above. A same-name package is not proof of identity, and a missing PyPI project page does not mean the name is reserved.

Or skip pip entirely — remotepaw.py is a single self-contained file. Copy it to the other machine and run python remotepaw.py serve. That's the whole deployment.

Requires Python 3.8+. No third-party packages, on either side.

Check the installed command without contacting a remote machine:

remotepaw --version
remotepaw --help

remotepaw selftest is an optional local integration check, not a read-only diagnostic: it starts a loopback server, executes commands and creates temporary files. On Windows it also captures the screen and inspects windows/accessibility trees. Run it only on an authorized, disposable test desktop.

Quickstart

Before starting: the default bind is 0.0.0.0 (all IPv4 interfaces), and traffic is unencrypted HTTP. Use only a trusted LAN or an encrypted VPN/tunnel, restrict firewall access, and never forward this port directly to the internet. --cwd is not a filesystem sandbox. All addresses and tokens below are examples: use the freshly generated token, not the sample. Read the security policy.

On the remote machine (B):

remotepaw serve --cwd D:\work\myproject

It prints a ready-to-paste command with its IP and a generated token:

$ remotepaw serve
...
   remotepaw add b 192.168.1.20:8765 --token=7fK2mQ9xLpA3vN8sR4tYuE1b

Windows may show a firewall prompt. Allow access only for trusted peers on the intended private network; do not enable public-network access merely to fix connectivity.

On your laptop (A):

remotepaw add b 192.168.1.20:8765 --token=7fK2mQ9xLpA3vN8sR4tYuE1b
remotepaw exec "npm test"

Output streams back while the command runs; the exit code is passed through unchanged, so your agent can tell success from failure without parsing text.

A successful result requires a valid final exit event. A disconnected or malformed stream is an error, not exit code 0. If the result is unknown, check the remote state before retrying: the command may already have made changes. Ctrl+C closes the connection but does not confirm that the remote process has stopped; use --timeout for a server-side time limit, or use job start / job stop for work that needs explicit lifecycle control.

What it can do

Run commands streaming stdout/stderr, real exit codes, timeouts, --stdin piping
Move files push / pull whole directories, read / write, tail -f logs
Background jobs start a dev server, follow its log, stop it — without blocking
Screen capture screenshots, record a GIF, crop or scale (Windows)
GUI control click by element name via UI Automation, or fall back to coordinates
AI-native works as a plain shell tool, and as an MCP server

File transfer behavior

  • Single-file pull and read -o preserve file bytes, including UTF-8 BOM and LF/CRLF line endings.
  • CLI/MCP pull defaults to the basename of the server-resolved path, including when Windows and POSIX hosts differ. A single file pulled to an existing local directory is saved inside it. Directory pulls instead merge their contents directly into the selected local path, without another nested source directory. Existing files may be overwritten; review the destination first. For a single file, create missing local parent directories yourself; a trailing local separator requires an existing directory. Remote roots or names invalid on the local OS require an explicit local path.
  • Directory transfers preserve empty directories and share the same skip rules across CLI and MCP. Common generated directories and .DS_Store are excluded by default; CLI push --all / pull --all disables these exclusions. These rules are not a secret scanner: review the source tree yourself.
  • Directory transfer supports ordinary files and directories only. Links (including hard links), device files and FIFOs cause an explicit error; they are not silently skipped or followed. Archive paths must be relative, without .. components, backslashes or colons. Gzip checksums/trailers are validated before extraction writes any destination files.
  • Unreadable files and failed directory scans fail the transfer instead of reporting partial success. Extraction is not transactional: disk/permission errors can leave files already written. Check the destination before retrying. Archive checks are not a filesystem sandbox and cannot protect against another process concurrently changing destination paths.

For a Windows target named b, in PowerShell or a POSIX shell (create downloads first):

remotepaw -t b pull 'C:\work\report.txt'                 # saves ./report.txt
remotepaw -t b pull 'C:\work\report.txt' downloads/      # saves downloads/report.txt
remotepaw -t b pull 'C:\work\project' ./snapshot        # merges contents into ./snapshot

Hook it up to your agent

The CLI is the whole integration for any agent that can run shell commands. Give it the contract:

<!-- append to AGENTS.md / CLAUDE.md / .cursorrules -->
The machine "b" is reachable via the `remotepaw` CLI. Anything that must run on b
goes through `remotepaw exec "..."`, not your local shell. To read or edit files on b,
use `remotepaw read` / `remotepaw pull` / `remotepaw write` / `remotepaw push` — your own file
tools only see this laptop. Full command reference:
https://github.com/jiaqinq/remotepaw/blob/main/AI-INSTRUCTIONS.md

AI-INSTRUCTIONS.md is a ready-made prompt covering the traps (your file tools are local, don't use exec for long-running servers, coordinate scaling, …).

Or use MCP — for clients that support it, remotepaw exposes 15 tools directly. Integration is opt-in; installing RemotePaw does not edit AI client settings.

The transport is newline-delimited UTF-8 JSON over stdio, with diagnostics on stderr only. RemotePaw negotiates MCP 2024-11-05 rather than claiming support for an arbitrary version requested by a client. The client must support the returned version to continue (version negotiation). Malformed messages receive JSON-RPC errors without ending the session; batches run sequentially, and notifications never execute tools. The snippets below are optional, manual configuration:

// Claude Code (.mcp.json) / Claude Desktop (claude_desktop_config.json)
{
  "mcpServers": {
    "remotepaw": {
      "command": "remotepaw",
      "args": ["-t", "b", "mcp"]
    }
  }
}
# Codex (~/.codex/config.toml)
[mcp_servers.remotepaw]
command = "remotepaw"
args = ["-t", "b", "mcp"]

remotepaw_exec, remotepaw_read, remotepaw_write, remotepaw_ls, remotepaw_push, remotepaw_pull, remotepaw_job_start, remotepaw_job_logs, remotepaw_job_stop, remotepaw_info, remotepaw_screenshot, remotepaw_ui, remotepaw_mouse, remotepaw_keyboard, remotepaw_windows.

Tool discovery lists the remotepaw_* names. Legacy portal_* calls remain accepted as deprecated compatibility aliases but are not duplicated in the tool list. For target selection, use REMOTEPAW_TARGET; PORTAL_TARGET remains a fallback when the new variable is not set. Temporary host:port targets use REMOTEPAW_TOKEN, with PORTAL_TOKEN as the legacy fallback. Both token variables contain secrets; do not print or publish them.

Driving the GUI

When there's no CLI for the job, there's usually still a window. Two ways in, in order of reliability:

1. By element name (recommended). Apps that expose an accessibility tree let you locate supported buttons and fields by name:

remotepaw ui tree --title "Notepad"       # see what's there
remotepaw ui click "Save"                 # click by name — no coordinates involved
remotepaw ui set "File name" "out.txt"    # fill an input
remotepaw ui read "Status"                # read text off a control

Pattern-based actions do not depend on screen coordinates. Clicks use InvokePattern or another supported accessibility action where possible; unsupported controls may fall back to coordinates, which still depend on visibility, focus and screen layout.

2. By coordinates (fallback). For canvas UIs, games, and anything without a control tree:

remotepaw screen -o shot.png              # screenshot to your laptop
remotepaw mouse click 1240 86             # then click a pixel
remotepaw type "hello"                    # Unicode text, Chinese included
remotepaw key "ctrl+s"                    # key combos

remotepaw record -o demo.gif --seconds 5 captures the whole session if you want to watch what the agent did afterwards.

Security

Read this before exposing it to anything.

  • The token is the only credential. It's generated on first serve, stored in ~/.portal/server_token, and compared in constant time. Use the generated token; server tokens require at least 16 printable, non-whitespace ASCII characters. Old custom tokens outside that format must be replaced. Invalid token text is rejected locally without echoing its value. For generated URL-safe tokens, use --token=VALUE (with =), including when the token starts with -; the startup command uses this form. If a custom token contains shell-special characters, omit --token from remotepaw add and enter it at the token prompt instead (the prompt is not hidden). Anyone with it can run commands and drive your mouse. Treat it like an SSH private key.
  • There is no TLS. Traffic is plain HTTP. Use it on a trusted LAN, or wrap it in a tunnel: Tailscale (easiest), WireGuard, or ssh -L.
  • Never expose the port directly to the internet.
  • The default is 0.0.0.0; bind to the intended interface, e.g. remotepaw serve --host 192.168.1.20, and restrict firewall access. Binding an interface is not encryption.
  • Client tokens are stored in plaintext in ~/.portal/config.json; startup output prints the server token. Protect file permissions, terminal history and logs. Do not commit them. State writes use private temporary files and atomic replacement; POSIX files are owner-only. On Windows, secure the state directory ACL; replacement does not preserve file-specific ACLs. Avoid concurrent configuration edits/server starts sharing one state directory. Invalid client configuration stops the command rather than silently discarding registrations; back up and repair it.
  • If exposed, stop the server, remove or securely replace its saved token, restart without an old explicit --token, and register clients again. Previously started processes need a separate check.
  • --cwd does not restrict file access or commands. /health is unauthenticated and includes the version, hostname and OS family. See the security policy for details.

This is a tool for machines you own, talking to each other. It is not a multi-tenant service.

How it works

A — your laptop                         B — the other computer
AI agent                                remotepaw serve
  └─ remotepaw exec "npm test"  ───────►   └─ cmd / sh
                               HTTP + token / NDJSON
                               ◄───────   live output + exit code
  • B runs a ThreadingHTTPServer. /exec responds with newline-delimited JSON events (start / out / err / exit), one per chunk, flushed as it happens. Connection: close gives a natural EOF boundary, so no chunked encoding is needed.
  • A is a CLI with a tiny state file (~/.portal/config.json): targets, tokens, and the current working directory per target. The server keeps background-job records in memory, not a persistent shell session.
  • Every command is a fresh process. cd is tracked client-side, which is more reliable than keeping a long-lived shell alive.
  • The GUI layer uses GDI for capture and SendInput for input. Performance depends on the machine, screen size and content; there is no fixed screenshot latency or GIF size guarantee. The control tree comes from Windows UI Automation, which cannot hold element references across processes, so each call does find + act in one shot.

Why one file? Because the deployment story matters more than the module layout: copy it, run it. pip install is a convenience on top, not a requirement.

Limitations

  • CLI messages are currently Chinese-only. Subcommands, flags, exit codes, --json output and MCP payloads are language-neutral, so agents work fine — but a human reading remotepaw serve needs a little Chinese. Localization is on the roadmap.
  • Desktop features (screen, ui, mouse, key, type, win, record) and the built-in autostart installer are Windows only. Command execution and file transfer also support Linux and macOS. Windows GUI control needs a logged-in interactive desktop.
  • Accessibility support varies by app and version. Chromium, WPF, UWP and Qt apps may expose useful trees; games and custom-drawn canvases may require coordinate-based input.
  • No interactive TTY. stdin is empty unless you pass --stdin.
  • Background-job records live in memory and are lost when the server restarts. Graceful shutdown attempts to stop jobs; a crash or forced termination may leave processes running.
  • No TLS, by design — see above.

FAQ

Why not just SSH? SSH gives you a terminal. An agent needs something slightly different: per-command exit codes, live output, file transfer, background jobs, and GUI access — on Windows, without installing an SSH server. remotepaw is that interface. If you already have SSH and only need shells, use SSH.

Does it need admin rights? No. It runs as your user, which is also why GUI automation works (services run in a session with no desktop).

Can two people share one server? It is not designed for safe multi-user sharing. Requests can arrive concurrently, but all clients share one token, one operating-system account and one desktop; there is no isolation.

What happened to portal / portal-remote? The project is now RemotePaw (远程爪), at jiaqinq/remotepaw. The PyPI package name and primary CLI are both remotepaw, and the primary source module is remotepaw.py. Source version 1.3.1 does not establish PyPI publication; verify the official project and release identity as described under Install.

The old portal CLI and portal.py module remain deprecated compatibility aliases. Prefer remotepaw / remotepaw.py for new commands and deployments. Existing ~/.portal configuration, including config.json and server_token, stays in place and is shared by both entry points; there is no automatic migration to another directory. Do not install alongside unrelated packages that provide the same commands or modules.

Development

git clone https://github.com/jiaqinq/remotepaw
cd remotepaw
python -m pip install -e ".[dev]"
python -B -m unittest discover -s tests -v
python remotepaw.py --version

See the contribution guide for safe tests, packaging checks and the release checklist. Tests use loopback networking and temporary files; they must not contact configured remote targets. Do not run GUI self-tests on an active user desktop.

Releases require a matching version tag and a configured PyPI trusted publisher for this GitHub repository, publish.yml and its configured publishing environment. Configure GitHub private vulnerability reporting and review the exact release commit and fresh artifacts before authorizing any tag or upload. Production publish jobs run only on a matching vVERSION tag push or a manual pypi dispatch on that tag; a manual pypi dispatch on main does not publish to production. Editing the version alone is not a release. The publishing workflow also supports optional TestPyPI validation with a separate publisher. Never upload old local artifacts or reuse a version already uploaded to the selected index.

License

MIT — see LICENSE.

Metadata

Release files for remotepaw 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remotepaw 1.3.1
File Size Uploaded Provenance Actions
remotepaw-1.3.1.tar.gz 132.8 kB With provenance Details for remotepaw-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for remotepaw 1.3.1
File Interpreter ABI Platform Actions
remotepaw-1.3.1-py3-none-any.whl Python 3 none any Details for remotepaw-1.3.1-py3-none-any.whl

Total release size: 189.9 kB

Release files / remotepaw-1.3.1.tar.gz

Download URL remotepaw-1.3.1.tar.gz
Size 132.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f9ed89fa4aa9d1eeaea5df32db3989f79f58a775b6e02bcb722b6b3081a2ea52
BLAKE2b-256 checksum
How to use checksums
e0b74b7fc8d4384add7d5dcd1d04b945d5cb6068568e046e97f75d09a0bcb901
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / remotepaw-1.3.1-py3-none-any.whl

Download URL remotepaw-1.3.1-py3-none-any.whl
Size 57.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb87e20faa17121b9d10a4deede83d3c10ca5d081a8a5ec39ffa7905cce1e7e5
BLAKE2b-256 checksum
How to use checksums
211f8c27756b8dca02d9e35207967985cb2922f305105f342b9142bc288aaca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for remotepaw 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for remotepaw-1.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page