local-repo-mcp
This server provides controlled, security-oriented access to a single Git repository through MCP tools, with support for file operations, Git actions, and allowlisted command execution.
File Operations: List allowed files, read file contents (UTF-8 text with metadata), and perform bounded fixed-string code search with line numbers.
Git Inspection: View repository status (current branch, filtered changes) and retrieve bounded unified diffs (unstaged or staged) with sensitive-file filtering.
Repository Modification: Atomically apply validated unified patches and create local commits for allowlisted changes (when explicitly enabled; never pushes).
Test Execution: Run allowlisted test/build/lint commands in
testmode, with structured output (exit codes, stdout/stderr, optional artifacts) and batch execution up to 8.Security & Permissions: Read, write, and test modes; bearer authentication; host/origin restrictions; sensitive-path filtering; cross-process mutation locking; audit logs.
Transports & Remote Access: STDIO, Streamable HTTP, and Secure MCP Tunnel; remote connections via HTTPS/mTLS or reverse proxy.
Additional Tools: GUI for configuration and connection management, structured logging with multiple views, and integration with MCP-enabled clients (ChatGPT, IDEs, agents, automation).
Provides tools for interacting with local Git repositories, enabling operations like reading files, searching code, preparing and applying patches, and running tests in a sandboxed environment.
Click on "Install 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., "@local-repo-mcpstart a write session for the repository"
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.
Local Repo MCP 1.4.0
A focused, security-oriented MCP server for exactly one configured Git repository.
Primary constraint: provide only controlled repository access, allowlisted test/build/check execution, and verifiable result return. Keep the server lightweight, single-repository, and fixed-surface; do not evolve it into an Agent, orchestration platform, or general remote shell.
Capabilities
Seven fixed MCP tools for file listing, UTF-8 reads, fixed-string search, filtered Git status/diff, atomic unified patches, and allowlisted verification commands.
Three permission modes:
read,write, andtest.STDIO, OpenAI Secure MCP Tunnel, and Streamable HTTP transports.
Remote HTTP through native HTTPS/mTLS or a trusted TLS-terminating reverse proxy.
Bearer authentication, Host/Origin restrictions, bounded requests and outputs, sensitive-path filtering, audit records, and cross-process repository mutation locking.
Desktop GUI with automatic configuration persistence. STDIO uses Connect; HTTP uses Start/Stop.
Structured log center with MCP, Tunnel, Audit, and Security views; searchable readable summaries, raw JSON details, live refresh, credential redaction, and bounded rotation.
Related MCP server: codex-web-bridge
Start from a source checkout
Windows:
start_gui.batLinux/macOS:
./start_gui.shThe bootstrap script creates .venv and refreshes dependencies whenever requirements.txt changes.
Package entry points
pip install .
local-repo-mcp-gui
local-repo-mcpInstalled and source-checkout layouts both use the packaged mcp_app.launcher; they do not depend on a repository-root wrapper being present.
Remote HTTP
Remote HTTP is not cloud-specific. It supports self-hosted servers, VMs, containers, Kubernetes, reverse proxies, and cloud load balancers.
Use either:
Native TLS with
HTTP_TLS_CERTFILEandHTTP_TLS_KEYFILE; optionally setHTTP_TLS_CLIENT_CAfor mTLS.A trusted TLS reverse proxy with
HTTP_TLS_TERMINATED_PROXY=true,HTTP_PUBLIC_URL=https://host/mcp, and explicitHTTP_PROXY_TRUSTED_IPS.
Wildcard bindings such as 0.0.0.0 are supported, but require an HTTPS HTTP_PUBLIC_URL whose path matches HTTP_PATH.
See docs/DEPLOYMENT.md and docs/SECURITY.md.
Tests
python -m pytest -q -p no:cacheproviderLocal Repo MCP never performs checkout, reset, rebase, merge, pull, push, or amend. Local git commit is off by default and requires an explicit GUI/ALLOW_GIT_COMMIT enablement in write or test mode.
Documentation
Complete usage guide — installation, first launch, STDIO, Secure MCP Tunnel, Streamable HTTP, logs, testing, and troubleshooting.
Deployment guide — native HTTPS, mTLS, reverse proxies, systemd, containers, and Kubernetes.
Security model — repository boundary, HTTP controls, secrets, logs, and trusted test execution.
Security policy — supported security boundary and issue reporting.
Requirements
Python 3.11 or newer.
Git available on
PATH.One local Git working tree to expose.
tunnel-clientonly when using OpenAI Secure MCP Tunnel.
Permission modes
Mode | Read/list/search/status/diff | Apply validated patch | Optional local commit | Run allowlisted verification commands |
| Yes | No | No | No |
| Yes | Yes | Yes when enabled | No |
| Yes | Yes | Yes when enabled | Yes |
Test mode executes repository code with the current operating-system user's permissions. It is not a sandbox and must be enabled only for trusted repositories.
MCP tools
Tool | Purpose |
| List allowed files under the configured repository. |
| Read one allowed UTF-8 text file. |
| Perform bounded fixed-string repository search. |
| Return filtered Git worktree status. |
| Return a bounded, filtered Git diff. |
| Atomically apply one validated unified text patch; one patch may modify multiple files, and any target failure prevents the whole patch from applying. |
| Create one local Git commit for allowlisted pending changes when |
| Run one or a bounded batch of allowlisted test/build/lint/check commands in |
repo_run_test keeps its historical tool name for client compatibility while delegating execution to the controlled command layer. The default allowlist includes python_pytest, go_test, go_build, go_vet, node_test, node_build, node_lint, maven_test, maven_build, gradle_test, and gradle_build.
Use command_key for one command. Use command_keys for a sequential batch of at most 8 commands. The complete batch is allowlist-validated before the first command starts; stop_on_failure=true stops on the first failure, while false continues through the remaining commands. This is bounded in-call execution, not a queue, scheduler, or background task system.
Every started command returns normalized evidence: command identity/kind, status, success, exit_code (with compatibility returncode), stdout/stderr plus truncation flags, and duration/timeout metadata. Timeout or output-limit termination remains a structured failed result with captured output. Command lifecycle metadata is logged, but stdout/stderr are not written to runtime/audit logs.
All eight public tools publish typed MCP input and output contracts. The server relies on MCP SDK structured-output generation instead of client-specific schema patches; GUI connection verification rejects missing/invalid tool schemas before accepting a connection. Optional collection inputs are represented as optional parameters with non-null array schemas rather than nullable unions.
src/tools/contracts.py is the single protocol-contract module for the public tool surface. Protocol regressions are tested against the actual MCPServer.list_tools() result, including the fixed eight-tool surface and presence of outputSchema for every tool.
First-use workflow
Start the GUI.
Select the target Git working tree.
Choose
read,write, ortestmode.Choose STDIO or Streamable HTTP.
For STDIO, select Connect to verify MCP initialize, tool discovery, and repository identity.
For HTTP, configure the Bearer token, select Start, and then select Connect.
Copy the generated client configuration from the MCP Server page.
The complete usage guide contains the full STDIO, Tunnel, HTTP, logging, testing, and troubleshooting procedures.
ChatGPT and other MCP clients
Local Repo MCP can let ChatGPT build and maintain a local Git project within the selected permission mode. It is not limited to ChatGPT: other MCP-compatible coding agents, IDEs, desktop clients, and automation platforms can connect through STDIO or Streamable HTTP and receive the same tools and security controls.
For a new local project, select an empty directory in the GUI, explicitly confirm Git initialization, and use write or test mode. See Client compatibility and local project workflow.
Current GUI behavior: selecting a plain folder triggers a Git check and an explicit confirmation dialog. Accepting runs git init; declining leaves the folder unchanged. Initialization is never silent and does not create commits or remotes. A selected child directory inside a parent Git working tree cannot become a separate security boundary; the GUI asks to switch to the actual Git working-tree root.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceRuntime safety guardrails for AI coding agents. Checks file access, validates shell commands, and scores your repo's AI safety — all via MCP.58MIT
- AlicenseNot gradedqualityCmaintenanceLocal MCP server bridging ChatGPT Web to local tools for file, shell, git, test, and process management with secure policy controls.MIT
- FlicenseNot gradedqualityCmaintenanceA local MCP server that provides controlled repository access with policy-based file filtering, secret redaction, and audit logging for AI coding agents.
- AlicenseBqualityCmaintenanceAgent-native SSH control plane with a local Web Terminal, human-in-the-loop secret input, keychain-backed profiles, and user-confirmed uploads for Codex, Claude Code, and MCP-compatible coding agents.181Apache 2.0
Related MCP Connectors
Git-backed platform for skills, tools, and context for AI agents
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Zero-install security baseline for AI coding agents — OWASP/CWE-cited rules over MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cloud-Xolt/local-repo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server