MCP Local Agent
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Local Agent
A local-first Model Context Protocol (MCP) server for inspecting, modifying, and validating explicitly approved repositories on your computer.
Current status
Version 0.3.0 — Phase 3: Execution Engine. The server supports repository discovery, safe file reads/search, previewable multi-file changes, recovery snapshots, and opt-in execution of allowlisted npm scripts with timeouts and bounded logs over MCP STDIO.
Related MCP server: Gumi-MCP
Requirements
Node.js 20+
npm 10+
Setup (Windows PowerShell)
git clone https://github.com/thanhtran2005isme-art/MCP_LOCAL_AGENT.git
cd MCP_LOCAL_AGENT
npm install
npm run typecheck
npm test
npm run build
npm run init:configIf you already cloned an earlier phase, update it first:
git pull origin main
npm install
npm run typecheck
npm test
npm run buildEdit the generated config at %APPDATA%\mcp-local-agent\config.json and add your repository roots. The server uses STDIO; configure your MCP client to run node <absolute-path>\dist\index.js.
Enable execution for a repository
Execution is disabled by default. Explicitly enable only repositories whose code you trust:
{
"repositories": [
{
"id": "my-project",
"name": "My Project",
"root": "D:/Projects/MyProject",
"enabled": true,
"execution": {
"enabled": true,
"allowedScripts": ["test", "build", "lint", "typecheck"],
"timeoutMs": 120000,
"maxOutputBytes": 32768,
"envAllowlist": []
}
}
]
}The script names must also exist in the repository's package.json. Only these fixed invocations are supported: npm run <allowlisted-script>. The server does not accept arbitrary commands, arguments, executable paths, npm install, or npm exec.
If a test needs a local environment variable, add its name to envAllowlist; the value is read from the MCP server process environment and is redacted from captured logs when it appears verbatim. Do not add system variables such as PATH, NODE_OPTIONS, or npm configuration variables.
Available MCP tools
Repository and code intelligence
list_repositoriesget_repo_treeget_project_metadataread_file— returns file content and SHA-256search_code
Code modification
prepare_changes— prepare up to 20 file operations and return unified diffsget_change_diff— retrieve a pending previewapply_changes— apply a prepared change set after explicit user approvallist_snapshots— list recovery snapshotsrestore_snapshot— restore the pre-change state after explicit user approval
Execution engine
list_execution_tasks— list configured npm scripts without running themrun_project_check— run one allowlisted npm script after explicit user requestget_execution_run— retrieve the output of a recent runlist_execution_runs— list recent runs
Execution controls:
Per-repository opt-in; disabled by default.
Exact script-name allowlist (up to 20 scripts).
Timeout configurable from 1 second to 5 minutes; default 2 minutes.
Output bounded to 1–64 KiB per stream; default 32 KiB.
At most one active run per repository and two active runs globally.
Only a small base environment is inherited; additional variables must be explicitly allowlisted.
npm pre/post lifecycle scripts are disabled using
ignore-scripts.Recent run history is held in memory (up to 30 runs) and is cleared when the server restarts.
The execution engine runs with the current operating-system user's permissions. An allowlisted npm script is still executable project code: it can read or modify files and may access the network. This is not an OS sandbox. Enable execution only for repositories you trust.
Recommended workflow
Inspect the repository and its package scripts.
Configure the repository execution allowlist.
Use
list_execution_tasksto verify available checks.Use
run_project_checkonly after the user requests execution.Inspect exit status and bounded stdout/stderr.
Diagnose failures, prepare a code diff, and request approval before applying changes.
Re-run the relevant checks to verify the fix.
Security boundaries
Only configured repository roots are accessible.
Absolute paths, traversal, symlinks, sensitive files, generated folders, and unrecognized/binary file types are denied for file operations.
A change set is limited to 20 files, 512 KiB per file, and 2 MiB of total before/after content.
Applying changes creates a recovery snapshot and rechecks for concurrent edits.
Execution is opt-in, allowlisted, time-limited, output-limited, and uses a restricted environment.
No arbitrary user-supplied shell command or remote network listener is exposed.
See SECURITY.md.
Roadmap
Phase 1: repository discovery, metadata, safe reads, and code search
Phase 2: patch-based editing, previews, snapshots, rollback, and conflict detection
Phase 3: allowlisted test/build/lint execution with timeouts and bounded logs
Phase 4: secured remote transport and ChatGPT Web compatibility evaluation
Phase 5: richer code intelligence and multi-step coding workflows
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Deep security scans of repos you own from your editor: dependency CVEs, SAST, git-history secrets.
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Audit GitHub repos for malicious and supply-chain code before you depend on them.
Security reviews, threat models over a repo or website, and remediation tracking, in your editor.
Related MCP Servers
- FlicenseAqualityBmaintenanceEnables coding agents to perform workspace-confined file operations, read-only Git inspection, and structured shell commands, while requiring out-of-band human approval for mutations and external executions and maintaining an audit trail.143-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to safely inspect a local repository's code and metadata while blocking private data from leaving the machine, providing read-only tools for search, change tracking, and integrity verification.MIT
- FlicenseAqualityBmaintenanceEnables AI assistants to securely inspect local Git repositories and perform restricted write operations in isolated worktrees, with sandboxed script execution and limited GitHub repository management.24-
- AlicenseNot gradedqualityCmaintenanceEnables AI coding assistants to inspect local and remote repositories through sandboxed tools that surface project overviews, structure, dependency audits, Git churn hotspots, and a heuristic health score. It also supports safe GitHub issue searching and creation with built-in duplicate preflight checks, while blocking sensitive files, binary content, and path traversal attacks.22 npmMIT