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.4.0/scoperail-0.4.0-py3-none-any.whl"
SCOPERAIL_WORKSPACE_ROOT="$PWD" scoperail stdio
The tagged GitHub wheel is tested with pipx; the same release is on PyPI, so 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:
sandboxedexecution 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.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scoperail-0.4.0.tar.gz | 220.8 kB | With provenance | Details for scoperail-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scoperail-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for scoperail-0.4.0-py3-none-any.whl |
Total release size: 409.1 kB
Release files / scoperail-0.4.0.tar.gz
| Download URL | scoperail-0.4.0.tar.gz |
|---|---|
| Size | 220.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d8bfd5c863f4e0628a1aa68b8ea7528c74525560217e518c55c6d82bd5a94e9
|
|
BLAKE2b-256 checksum How to use checksums |
cdfee6391bf6a189f7090c5c296a68400c98b4956b11aacd17b6cc79897dda83
|
| 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 30, 2026.
Transparency logRelease files / scoperail-0.4.0-py3-none-any.whl
| Download URL | scoperail-0.4.0-py3-none-any.whl |
|---|---|
| Size | 188.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
026b6700119a2965d680d2717cfa9fa59276fe640e51ea7a961d37163cb470e7
|
|
BLAKE2b-256 checksum How to use checksums |
563de44567cfd09b453fe6fc70225014dc80df8967796da2cb8e9f6f7dfbcd8e
|
| 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 30, 2026.
Transparency logSecurity for scoperail 0.4.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.
Attestation for scoperail-0.4.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 30, 2026.
Transparency logA 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.