LocalForge MCP
Provides structured Git operations (status, diff, log, show, branch, root) and generic Git argument arrays for repository management and inspection.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LocalForge MCPsearch the workspace for TODO comments and show the results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LocalForge MCP
Local execution and repository runtime for MCP coding agents on Windows.
LocalForge MCP gives an MCP client structured access to a real workspace, files, code search, Git, foreground commands, and long-running development processes. It runs on the host machine under the current Windows user account. It does not create a fake filesystem or hide projects inside a virtual sandbox.
Beta software with powerful host access. Read Security model before use.
Disclaimer: This is a small, quick project that was partially vibe-coded. While I used AI agents to assist with development, I personally reviewed, tested, and validated the code rather than relying on generated output without verification. This project is primarily for personal use, especially to make Amazon Quick more useful in my company and bring it closer to the experience of a real coding agent.
Features
Workspace root, current directory, and Git-root discovery.
Real filesystem list, stat, bounded read, atomic write, guarded text replacement, move, mkdir, and delete operations.
Ripgrep-backed code and filename search with Python fallback.
Structured Git operations plus generic Git argument arrays.
Foreground execution with separate stdout/stderr, timeout, truncation, duration, and exit metadata.
Long-running process IDs, incremental split-stream logs, stdin, status, restart, stop, and process-tree cleanup.
Canonical path checks with separate read/write roots and denied paths.
Explicit environment inheritance, secret-name filtering, and basic output redaction.
Six stable MCP tools rather than many command wrappers.
No runtime approval tool; approval remains the responsibility of the MCP host such as Amazon Quick.
Related MCP server: Windows Local MCP
Requirements
Windows 10 or Windows 11.
Python 3.11 or newer.
Git for Git tools.
Ripgrep is optional but recommended for fast search.
Developer tools required by your projects, such as Node.js, .NET SDK, Python, Java, or Docker.
Repository layout
localforge-mcp/
├── agent_runtime/
│ ├── capabilities.py
│ ├── config.py
│ ├── errors.py
│ ├── processes.py
│ ├── security.py
│ └── server.py
├── tests/
├── localforge.example.json
├── pyproject.toml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── SECURITY.md
└── LICENSEInstall on Windows
cd D:\Repositories\localforge-mcp
py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install -e .
Copy-Item localforge.example.json localforge.json
notepad localforge.jsonSet workspace_root, allowed_read_roots, and allowed_write_roots before starting.
For one repository:
{
"workspace_root": "D:\\Repositories\\MyApp",
"allowed_read_roots": ["D:\\Repositories\\MyApp"],
"allowed_write_roots": ["D:\\Repositories\\MyApp"]
}For multiple repositories under one parent:
{
"workspace_root": "D:\\Repositories",
"allowed_read_roots": ["D:\\Repositories"],
"allowed_write_roots": ["D:\\Repositories"]
}Keep the other properties from localforge.example.json.
Amazon Quick setup
Create a Local MCP connection with these values.
ID
localforge-mcpName
LocalForge MCPCommand
D:\Repositories\localforge-mcp\.venv\Scripts\python.exeArguments
-m agent_runtime.serverDescription
Local Windows coding runtime with workspace files, code search, Git, command execution, and long-running development processes.Add environment variable:
LOCALFORGE_CONFIG=D:\Repositories\localforge-mcp\localforge.jsonSet startup timeout to 60 seconds, save, then toggle the MCP connection off and on after configuration changes.
The older environment variable WIN_AGENT_RUNTIME_CONFIG remains accepted for compatibility.
Manual smoke test
Start server:
$env:LOCALFORGE_CONFIG = "D:\Repositories\localforge-mcp\localforge.json"
.\.venv\Scripts\python.exe -m agent_runtime.serverA blank terminal means the server is waiting for newline-delimited JSON-RPC input. Press Ctrl+C to stop it.
MCP tools
workspace
get: return workspace root, current directory, and detected Git root.set_cwd: change current directory inside read policy.
filesystem
list,stat,readwrite,replace_text,mkdir,move,delete
read supports byte offset and bounded output. replace_text defaults to exactly one expected occurrence, preventing accidental broad replacements.
search
Search text or filenames recursively with include/exclude globs, case control, fixed-string or regex matching, and result limits.
git
Presets: status, diff, log, show, branch, and root.
Use run with an argument array for other operations:
{"action":"run","args":["add","src/app.py"]}execute
Prefer argument arrays:
{"command":["npm","test"],"cwd":".","timeout":600}String commands automatically use the configured shell:
{"command":"npm test | Select-String failed"}Pass shell explicitly only to force array commands through the shell. Argument arrays bypass shell parsing and stay preferred.
process
Actions: start, read, write, status, list, restart, and stop.
Use after with the previous next_after value for incremental log reads. cursor_lost=true means older output was evicted from the bounded buffer.
Quick examples
{"action":"get"}
{"action":"read","path":"src/app.py","line_start":1,"line_end":80}
{"query":"UserService","glob":["*.py"],"context_lines":2}
{"action":"status"}
{"command":["npm","test"],"cwd":".","timeout":600}
{"action":"start","command":["npm","run","dev"]}Configuration
Modes
READ_ONLY: filesystem inspection only.WORKSPACE: workspace filesystem changes, but no process execution.DEVELOPMENT: workspace access and process execution.FULL_ACCESS: dedicated filesystem tools may access paths outside configured roots, while denied paths still apply.
Network
unrestricted: runtime does not block recognized network commands.disabled: blocks recognized package, Git, and URL-oriented commands.
This is command classification, not packet filtering. Use Windows Firewall, a controlled proxy, AppContainer, container, or VM for enforceable network restrictions.
Shells
Supported default_shell values:
powershellpwshcmdsh
execute.timeout is seconds. process.wait_ms is milliseconds (max 60000). limit_bytes, max_bytes, and max_file_read_bytes are bytes. filesystem offset is a byte offset in legacy read mode; use line_start/line_end for line mode.
Security model
LocalForge MCP provides application-level mediation, not an OS security boundary.
Dedicated filesystem tools canonicalize paths and resolve existing links before checking roots. However, once command execution is allowed, the child process has the current Windows user's rights. Build scripts, package lifecycle hooks, Git hooks, interpreters, native binaries, and child processes can access anything that user can access.
For untrusted agents or repositories, run LocalForge MCP under a dedicated low-privilege Windows account and add OS-level isolation. See SECURITY.md for remaining reparse-point race and network limitations.
Development
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe -m pytest -q
.\.venv\Scripts\python.exe -m compileall -q agent_runtimeStatus and limitations
Windows-native process-tree behavior requires Windows testing; cross-platform tests cover portable logic.
Process state is in-memory and does not survive runtime restart.
Shell command network detection is intentionally conservative and cannot inspect arbitrary scripts.
File writes are atomic at replacement time but cannot preserve every filesystem-specific metadata attribute.
MCP transport is stdio only.
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
A MCP server built for developers enabling Git based project management with project and personal…
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceExposes a secure, path-confined bridge to a local workspace and git remotes, enabling MCP clients to search, read, write, reset files, and perform git operations.-
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT to securely operate a single Windows development workspace via a local MCP server, offering file editing, Git status, static analysis, approved test/build, and limited ADB operations with audit logging.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to control local Windows development tools by exposing project files, code search, file editing, test execution, Git operations, and resource viewing through a secure MCP interface with permission controls.10Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI clients to securely control and interact with a local Windows machine through 218 configurable tools for files, Git, processes, Windows UI, browser automation, WSL, Office, recovery, skills, and child MCP servers.5 npmMIT