local-mcp-file-editing

Exposes sandboxed local file operations and command execution to AI agents via MCP.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill local-mcp-file-editing-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: local-mcp-file-editing
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/local-mcp-file-editing
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill local-mcp-file-editing-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents often need to read, write, and test files on a local machine, but granting unrestricted filesystem and shell access is risky. This Skill sets up local-mcp, a Rust-based MCP server that gives agents controlled file editing and sandboxed command execution with session-scoped permissions. ## Core Features & Use Cases - Sandboxed File Operations: Read, write, and list files within a session working directory, with unified diffs shown in the monitoring UI. - Isolated Command Execution: Run commands without network access using Landlock (Linux) or Seatbelt (macOS), with approval-gated unsandboxed execution for network tasks. - Background Job Management: Start long-running processes like dev servers, then poll or stop them via job IDs. - Use Case: An agent refactors multiple Rust source files, runs cargo test in the sandbox to verify changes, and only requests approval when deploying over the network. ## Quick Start Start a local-mcp session in my project directory and use the MCP tools to read, edit, and test the files with sandboxed permissions.

Frequently Asked Questions about local-mcp-file-editing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I let an AI agent edit local files with MCP?▼

Run local-mcp mcp to start the server, then run local-mcp start in your project directory to create a session. Give the printed session ID to your agent, which can then call read_file, write_file, and list_directory scoped to that working directory.

How to run sandboxed shell commands from an MCP server?▼

Use the execute tool with a session_id, command, and args. Commands run without network access via Landlock on Linux or Seatbelt on macOS; commands needing network access go through without_sandbox, which requires explicit approval unless yolo mode is set.

Does local-mcp support Windows?▼

No, local-mcp does not yet support Windows. It runs on Linux, which requires bubblewrap and the codex-linux-sandbox helper binary, and on macOS, which uses the built-in sandbox-exec with no extra dependencies.

Why do sandboxed commands fail with permission denied?▼

Commands fail when they touch paths outside the session working directory or need network access. Check the mode with /permissions status, allow extra directories with /permissions allow, or use without_sandbox with approval for network operations.

How do I manage long-running commands like dev servers?▼

Use start_command to launch the process in the background and receive a job_id immediately. Check its status with poll_job and terminate it with stop_job when finished; commands over 30 seconds via execute also return a job_id automatically.