Five steps from install to your first pushed branch.
MCP Git is an MCP tool: you check it is installed, point your agent at it from the repository you want worked on, and then ask in plain language. The local process needs repository access; remote synchronization also needs network access and credentials for the remote.
- Illustrative$ mcp-git versionmcp-git X.Y.ZStep 1 of 5
Check that it arrived
The MAIT image ships
mcp-gitand updates it with the image. Runs on Linux (amd64, arm64). On macOS and Windows, MCP Git runs in the managed Linux environment that AIDC Launch provides. Check what you have.What you getThe program answers with its version.
- Illustrative$ mcp-git cli git status{"ahead": 0,"behind": 0,"branch": "develop","is_clean": false,"staged": [],"unstaged": [{"change": "<change label>","path": "README.md"}],"untracked_count": 0}Step 2 of 5
Look at a checkout yourself
Start from the repository root: there is no repository flag, so a client-owned server uses its startup directory. The CLI can instead discover an existing Unix server; verify recognizable history as well as the branch before writes. The example below illustrates a checkout after one edit to
README.md. The command ismcp-git cli git status.What you getThe same structured answer the agent will get, so you can compare the two.
{ "mcpServers": { "git": { "command": "mcp-git", "args": ["serve"], "cwd": "/absolute/path/to/repository" } } }Step 3 of 5Connect it to your agent
Any client that accepts an
mcpServerslaunch entry uses this shape. Setcwdto the repository root: the tool calls cannot change that directory.If you reach your tools through the registry instead, add
gitonce withmcp_registry_addand the tools carry thegit__prefix (registry guide).What you getA client that starts the service on its own, and an agent that can call the eight git tools.
- Illustrative conversationYouCommit the README change on a new branch called feature/setup-guide.Tool callgit_branch { "action": "create", "name": "feature/setup-guide" }Tool callgit_branch { "action": "checkout", "name": "feature/setup-guide" }What happensThe branch exists and is checked out. README.md is then edited.Tool callgit_inspect {}What happensBranch feature/setup-guide, ahead 0, behind 0, one unstaged path, README.md.Tool callgit_commit { "subject": "docs(readme): clarify initial setup steps", "bullets": ["explain the first repository check"], "patterns": ["README.md"] }What happensA commit is recorded and its full id comes back, with the author, the summary and a timestamp.AgentI committed README.md as 4c184909 with the subject "docs(readme): clarify initial setup steps".Step 4 of 5
Branch, edit and commit
Ask your agent to commit a change. It creates a branch from
develop, checks it out, reads the status after your edit and records the commit with explicit paths. Create the branch and check it out before the edit: a checkout needs a clean tree, so preserve or finish the step 2 edit first; do not discard work merely to make checkout pass.The subject needs a type such as
docs, an optional scope, a colon and at least ten characters of description. Keep the returnedid: it is how you prove later that the branch was published.What you getOne commit with a recorded id, on a branch that is not
develop. - Illustrative conversationYouPush it.Tool callgit_remote { "action": "push", "remote": "origin", "branch": "feature/setup-guide" }What happens{ "pushed": true }What happensA check on the remote shows refs/heads/feature/setup-guide at 4c184909, the same id the commit returned.AgentThe branch is on origin and its tip is my commit. Pushing develop would have been refused.Step 5 of 5
Push the branch and check it
A zero ahead count does not prove a branch is published. Compare the remote tip with the commit
id, as above.What you getA feature branch you checked on the remote. Nothing was merged into
develop.
A branch that is committed, pushed and checked.
MCP Git is installed, connected to your agent and recording clean commits. Keep one checkout per server: every client that connects shares it, and clients share the configured call allowances. git_repo has capacity 5 with refill 5/min, and other tools have a separate capacity 30 with refill 30/min.