AI agents

AI agents and Git MCP without write access.

AI agents are more useful when they understand repository state. They are also more dangerous when they can commit, reset, rebase, push, or discard work without a human reviewing the consequence.

Read-only context is the safer default

Model Context Protocol can expose structured context to an assistant. For Git, the safest default is inspection: current branch, worktree status, staged files, recent commits, branch relationships, conflict state, and diff summaries. Write operations should remain explicit actions in the Git client, not silent agent side effects.

Useful context

Branch status, changed files, commit metadata, conflict markers, and whether the repo is ahead, behind, or divergent.

Dangerous authority

Commit, reset, clean, rebase, force push, delete branch, and discard should require clear human confirmation.

Auditability

The user should know what repository context was exposed and which action, if any, they approved afterward.

Good agent tasks for Git context

  • Explain why a branch is divergent and what safe options exist.
  • Draft a commit message from staged changes while the user still owns the commit action.
  • Summarize a semantic diff or normal patch before review.
  • Identify likely conflict areas before a merge or rebase starts.
  • Explain reflog recovery options after a reset or deleted branch.

Privacy boundaries matter

Git context can reveal source code, file names, branch names, remotes, issue IDs, customer names, and secrets accidentally present in diffs. A safe implementation should avoid sending repository data by default and make any diagnostic or AI provider behavior explicit.

FluxGit MCP

Agent context without handing over the repo.

FluxGit plans audited, read-only MCP context for agents. Writes stay controlled by the desktop app, semantic diffs fall back to normal Git diffs when needed, and repository data is not sent by default. The private beta is Windows first.