Local Repo Automation MCP
# Local Repo Automation MCP
An MCP server for inspecting local Git repositories and automating common delivery tasks through `git` and the GitHub CLI (`gh`): status, diffs, commits, pull requests, and deployments.
## Setup
```powershell
npm install
npm run build
```
Set an allowlist before starting the server. Use semicolons on Windows:
```powershell
$env:MCP_ALLOWED_ROOTS = "E:\src;E:\work"
$env:MCP_DEPLOY_COMMAND = "npm run deploy"
npm start
```
## Tests and Docker
```powershell
npm.cmd test
npm.cmd run typecheck
npm.cmd run build
docker build --tag local-repo-automation-mcp:latest .
```
GitHub Actions runs all three Node checks and the Docker build on every push and pull request. Start Docker Desktop before running the image build locally.
The GitHub CLI must be installed and authenticated for pull request creation. Deployment is disabled unless `MCP_DEPLOY_COMMAND` is set. All mutating operations require `confirm: true`.
Add `.vscode/mcp.json` to a VS Code workspace and build this project before connecting the server.
## Tools
- `list_repositories`: list Git repositories below an allowed directory.
- `repository_status`: inspect branch and working-tree state.
- `repository_diff`: read unstaged or staged diffs.
- `commit_repository`: stage selected paths and create a commit.
- `create_pull_request`: push a branch and open a GitHub pull request with `gh`.
- `deploy_repository`: run the configured deployment command in a repository.
TDQS
Scored across 6 tools
Each tool targets a distinct action (diff, commit, PR, deploy, list, status), so there is little overlap. repository_diff and repository_status both inspect state but serve clearly different purposes: one shows changes, the other shows branch/status/history.
Most tools follow a verb_noun pattern (repository_diff, commit_repository, create_pull_request, deploy_repository, list_repositories, repository_status). The pattern is mostly consistent, though repository_status and repository_diff place the noun first while commit_repository and deploy_repository place the verb first.
Six tools is well-scoped for a local repository automation server, covering inspection, committing, PR creation, and deployment without unnecessary bloat.
The set covers the core local workflow: inspect status/diff, commit, push via PR, and deploy. Minor gaps exist such as no explicit branch creation/checkout or push-only tool, but the main lifecycle is covered.