RunOnMine: Open-Source Local Security Gateway for Model Context Protocol Agents
RunOnMine is an open-source, local-first security gateway for Model Context Protocol (MCP) agents running on macOS, Linux, and Windows. It restricts AI tool access to explicitly designated directories, requires local approval for risky commands, and enforces isolated browser profiles.

Impact: Medium
Why it matters
You can safely grant Claude Code or Cursor MCP terminal and filesystem permissions without risking unapproved file modifications or system execution.
TL;DR
- 01RunOnMine puts an explicit security boundary between MCP AI agents and your operating system.
- 02Root directory selection prevents agents from touching files outside designated project workspace folders.
- 03Emergency Lock (`runonmine lock`) instantly revokes credentials and halts agent actions if rogue behavior is detected.
Key facts
- Supported OS
- macOS, Linux (x86_64, ARM64), Windows
- Implementation Language
- Rust 1.95.0
- Latest Release
- 0.1.0-beta.1
- Default Transport Mode
- stdio (loopback)
Granular Directory Scoping and Execution Rules
RunOnMine restricts agent actions strictly to user-selected roots initialized via the CLI flag --root. Agents cannot escape designated directory roots or execute administrative commands unless explicitly permitted. Commands are validated against active security policy presets: Safe (reads allowed, writes prompt locally), Developer (trusted coding mode), and Automation (broad CLI authority).
Transport Modes and Emergency Lockdown
The tool keeps MCP endpoints on loopback (stdio by default or opt-in authenticated loopback HTTP via --token-output) and routes remote traffic through outbound-managed Cloudflare or OpenAI Secure MCP Tunnels. If an agent behaves unexpectedly, running runonmine lock immediately terminates the agent process, invalidates active OAuth tokens, and clears pending approval queues.
Try it in 2 minutes
runonmine setup --root "/path/to/project"
runonmine mcp stdio --connector local-connector-idbash
✓ When to use
- When delegating filesystem or shell actions to LLM agents using Model Context Protocol
- When running AI agents locally and requiring explicit approval gates for destructive file or system commands
- When exposing local tools to remote agents via Cloudflare or OpenAI Secure MCP Tunnels
✕ When NOT to use
- When running agents inside isolated ephemeral Docker containers or VM sandboxes
- When using cloud-hosted LLM platforms without local environment integration
What to do today
- Install RunOnMine 0.1.0-beta.1 for your OS and initialize it on a project directory using `runonmine setup --root <path>`.
- Configure your local MCP clients (such as Claude Code or Cursor) to communicate via `runonmine mcp stdio`.
Sources