nakasyou/local-mcp

Local file editing with MCP

What it solves

It provides a secure way for AI agents to interact with a local machine's filesystem and execute commands. It bridges the gap between an LLM's capabilities and local system access while mitigating the risks of giving an agent full, unrestricted access to a host computer.

How it works

The project implements the Model Context Protocol (MCP) to expose local capabilities as tools. It uses a session-based system where each session is tied to a specific working directory. To ensure security, it employs sandboxing (using Landlock/bubblewrap on Linux and Seatbelt on macOS) to isolate commands and deny network access by default. For operations requiring higher privileges, it uses an approval system where the user can manually grant or revoke permissions for specific actions or enter a "yolo" mode for unrestricted access within a session.

Who it’s for

Developers and users who want to integrate AI agents with their local development environment and filesystem without compromising system security.

Highlights

  • Secure Command Execution: Uses OS-level sandboxing to isolate commands on Linux and macOS.
  • Session Management: Supports multiple independent sessions, each with its own working directory and permissions.
  • Local Machine Capabilities: Provides tools for reading files, reading images (supporting multiple formats), listing directories, and writing files.
  • Interactive Approvals: Includes a UI for managing permissions and monitoring live activity, including unified diffs for file edits.
  • Background Job Handling: Supports long-running commands via job IDs, allowing agents to poll or stop background tasks.

Related

  • Project
  • Project
  • Project
  • Project
  • Project