Skip to main content

ScopeRail

ScopeRail is a scoped local execution runtime for MCP clients that need to work on a real Mac without receiving unrestricted host access by default. Files, processes, browser sessions and native desktop UI are exposed through one workspace capability model with explicit grants and auditable actions.

It is not just a shell MCP. Shell access is one surface inside a broader permission model: a caller starts from a registered workspace, receives only the profiles and grants the operator enabled, and uses retry-safe primitives that return provenance and observable results.

Maintainer: Hanpu Li / 李函璞 · portfolio / project index

Install and run

Python 3.12+ and pipx on macOS:

brew install pipx  # skip if pipx is already installed
pipx install "https://github.com/HanpuLi/scoperail/releases/download/v0.3.0/scoperail-0.3.0-py3-none-any.whl"
SCOPERAIL_WORKSPACE_ROOT="$PWD" scoperail stdio

The tagged GitHub wheel is the current working install path and is tested with pipx. PyPI Trusted Publishing is prepared but the first PyPI upload still requires the maintainer's one-time PyPI login; after that, pipx install scoperail is equivalent.

Or register once, then start stdio:

scoperail init "$PWD"
scoperail stdio

For the full OAuth HTTP service, launchd installation and optional reverse-proxy/Tailscale deployment, see docs/install.md.

Security: sandboxed execution is the default. trusted-host, desktop control, Git publishing and similar capabilities are explicit operator choices. Read SECURITY.md and docs/security-model.md before enabling them.

What is different

Surface Boundary
Files Workspace-confined paths, symlink-aware resolution, conflict-checked writes
Commands / PTY macOS Seatbelt sandbox by default; explicit trusted-host profile for full user authority
Persistent shells Named zsh sessions built on the same job/process boundary
Browser Managed Playwright profile plus explicit attachment to loopback Chromium CDP sessions
Native UI macOS Accessibility semantic tree and fingerprinted refs, with coordinate fallback
Git publish Read operations are separate from parameter-bound publish grants
Audit/state Request IDs, provenance, audit records, persistent workspace state

ScopeRail does not embed a model. The connected client decides what to do; ScopeRail enforces and records the execution boundary.

MCP client
   |
   +-- local stdio --------------------------------+
   |                                               |
   +-- OAuth 2.1 / remote HTTPS -- public plane ---+
                                                   v
                                      workspace + grant policy
                                      |      |       |
                           +----------+      |       +----------+
                           v                 v                  v
                       files/git        jobs/shells        browser/native UI
                           |                 |                  |
                           +-------- audit + provenance --------+

Platform and client status

ScopeRail is macOS-first. Native Accessibility control and the Seatbelt sandbox are macOS features. Pure policy/file/package tests may run on Linux CI, but Linux and Windows are not currently advertised as complete runtime platforms.

  • Generic MCP clients: local stdio transport is supported.
  • ChatGPT: remote OAuth/streamable-HTTP is the primary deployed integration and is exercised by the project.
  • Claude / Codex / other MCP clients: the stdio server uses the standard MCP SDK transport; client-specific setup is documented as integration work rather than claimed as continuously tested compatibility.

Native semantic UI

The native desktop path prefers Accessibility over coordinate-only clicking. Observation returns semantic elements and bounds; element actions use fingerprinted ax: refs and fail closed when the target becomes stale, ambiguous or materially moves. Secure values are redacted and secure fields reject semantic value-setting.

Screenshot, mouse and keyboard primitives remain available for apps with incomplete Accessibility trees.

Browser sessions

The managed browser uses a ScopeRail-owned profile. A trusted-host workspace may also attach to an already-running Chromium-family browser only through an operator-configured loopback DevTools endpoint. Existing tabs are treated as external resources: detaching the bridge does not close them.

The launchd service owns one managed browser that every local client shares through a broker. Coding agents that have their own shell can ask for a browser-only tool surface (SCOPERAIL_TOOL_GROUPS=browser). Sign-ins and CAPTCHAs are handed to the user's phone with browser_takeover rather than typed by the agent. See docs/browser.md.

Remote service

A source checkout can run the full HTTP service with OAuth 2.1, PKCE, dynamic client registration, token rotation/revocation and DNS-rebinding protections. The admin plane listens separately on loopback and is not exposed through the public MCP route.

See docs/quickstart.md, docs/permissions.md, docs/workspaces.md, docs/files.md, and docs/audit.md.

Development

python3 -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
python -m unittest discover -s tests -p 'test_*.py' -v
ruff check --select E9,F63,F7,F82 bridge tests scripts
python -m build
twine check dist/*

The maintainer's operational repository may contain machine-specific acceptance evidence. Release candidates are produced as an allowlisted fresh-history tree before they reach this public repository. scripts/verify_public_tree.py, CI secret scanning and package checks enforce the public-tree invariants; the private operational Git history is never imported here.

Contributing

Start with CONTRIBUTING.md, the architecture and the security model. Issues intended for contributors describe the problem and acceptance criteria; the project does not create trivial work to inflate contributor counts.

License

Apache-2.0. See LICENSE and THIRD_PARTY_NOTICES.md.

Metadata

Release files for scoperail 0.3.0

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

Source distribution (sdist)

Source distribution for scoperail 0.3.0
File Size Uploaded Provenance Actions
scoperail-0.3.0.tar.gz 214.0 kB With provenance Details for scoperail-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 396.7 kB

Release files / scoperail-0.3.0.tar.gz

Download URL scoperail-0.3.0.tar.gz
Size 214.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8421a9a6e335d44fa370e4c59fb9f77f70d9d086dd892d93c88d73df8e1ae427
BLAKE2b-256 checksum
How to use checksums
5b20612db766a0d5a0a15abf7bb85f059933d28df65ebbc126f55a025cf0a23e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 29, 2026.

Transparency log

Release files / scoperail-0.3.0-py3-none-any.whl

Download URL scoperail-0.3.0-py3-none-any.whl
Size 182.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b57029f969f491c40aebbac14fc409db63ee0b7130d476c8a011ed665fa4a65a
BLAKE2b-256 checksum
How to use checksums
6034f379da5a0833df6e9ad51b86cd8cf8a6897ba8453fd5e5d01ff6763df7fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 29, 2026.

Transparency log

Security for scoperail 0.3.0

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 scoperail-0.3.0.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 29, 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

0.3.0 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