AgentGit MCP server
Commit Nov 14, 2026Provides an agent-native version control system with policy-bound autonomy, tamper-evident audit trails, and crash-safe integration.
Also known as Paffin/AgentGit
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 14, 2026
- License
- Apache-2.0
What is AgentGit MCP?
AgentGit provides an agent-native version control system with policy-bound autonomy, tamper-evident audit trails, and crash-safe integration.
Summary generated from the project's README
About AgentGit MCP server
Managing code repositories where humans, automated agents, and CI services all contribute is what AgentGit enables. It provides a version control system designed for an environment where coding agents have policy-bound autonomy. The system ensures that every change is subject to four independent verdicts: Mergeable, Validated, Approved, and Integrated. This prevents unauthorized or unverified code from entering the main stream by checking repository policies within the same transaction used to move the branch.
Developers use the ag CLI or the Web UI to manage proposals, reviews, and tasks. The system supports atomic handoffs to agent tasks with explicit file scopes and expected results. It is built for reliability, using a core that never calls a language model to ensure that smart components can only propose changes rather than control the underlying storage. Users can set server-enforced attempt limits for tasks and use the ag-mcp component to integrate with MCP clients. The setup requires a Rust environment for local installation or a running ag-server for remote access via gRPC and HTTP/JSON.
What you can do with it
- 1Enforce policy-based code integrationAn operator can ensure that agents only integrate code if they meet specific autonomy and approval requirements.
- 2Automate verified CI testingA developer can run validation checks that tie signed test results to a specific code tree.
- 3Manage agent task limitsAn operator can restrict how many times an agent is allowed to attempt a specific task.
- 4Migrate existing Git repositoriesTeams can upload full Git bundles from GitHub or GitLab to start using the agent-native system.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
AG_BOOTSTRAP_TOKENAG_TOKEN
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablepaffin/agentgit is public and reachablegithub.com/paffin/agentgit ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-07github.com/paffin/agentgit ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubEnglish · Русский · Docs · Roadmap · Comparison
AgentGit is a version control system for repositories that people, coding agents and CI all write to.
A change lands only when the repository's policy says it may, and the policy is checked in the same transaction that moves the branch, so nothing can change between "checked" and "merged". Test results are signed and tied to the exact tree they ran on. The final transaction also rechecks the proposal head and open state. Every agent run has its own identity, and every decision ends up in an audit log you can verify. The core that stores, merges and recovers never calls a language model; anything smart sits on top and can only propose.
This is an early public beta: status and limits are below, and nobody but its authors has run it in production.
Available in the current beta: repository issues with comments, close/reopen, conflict-safe edits and an atomic handoff to agent tasks with an expected result and explicit file scope. See the Web UI guide. Labels, milestones, attachments and provider issue import remain unfinished. Operators can pause and resume new task-bound runs without interrupting existing sessions, and inspect current or historical runs through permanent links. Task creators can reserve a registered agent at creation or reassign queued work; the server and orchestrator enforce the choice. A registered agent still needs a configured executor. The registered-agent view shows expiring executor connection reports and last reported capacity. Its setup wizard prepares repository-scoped credentials and a task executor configuration; host installation remains a separate step. Optional bounded executor output can be viewed, downloaded and deleted from a run page. The current release uses metadata schema 8; take a database backup before upgrading. Older binaries require restoring the pre-upgrade backup.
Review in the current beta: revision-bound line discussions, replies and conflict-safe resolution are shared by Web UI, CLI and MCP. Filter open or resolved threads without losing reply drafts; source anchors retain the exact reviewed revision. CLI JSON response shapes are documented for automation. Upgrade and rollback guidance.
Available since beta.6: operators can disable or re-enable new runs for an individual agent from the browser or ag agent disable NAME --remote origin (enable to restore admission). Existing sessions, keys and history are retained. This is included in beta.6 and newer; see ADR-0026.
Available since beta.6: Tasks can carry a server-enforced attempt limit. ag task attempts TASK --max 5 --expected 3 lets an operator extend an exhausted task without losing its history; restart recovery uses durable run records. Zero keeps the existing repository retry policy. Concurrent operator policy changes are protected from stale automatic cancellation, and late results cannot finish a newer task attempt. Execution limits.
Upgrade: persistent follow-up task links and durable task execution limits require metadata schema 8. Back up before opening existing repositories with beta.6 or newer; rollback uses the pre-upgrade backup. Source-link semantics.
Stream rules can require every line discussion to be resolved before integration, including feedback on earlier revisions.
Review threads support proposed line replacements, with explicit author preview and head-checked application.
Rules also expose protected-path approvers and check timing without editing JSON; runner settings survive form edits.
Coming from GitHub or GitLab?
Open Repositories → Import from GitHub / GitLab to upload a full Git bundle, inspect the branch/tag mapping and publish the verified result. Or run ag migrate repository.bundle ./project --namespace team/project. The source stays unchanged, and its original bundle is retained in backups. Migration guide and metadata limitations.
The beta also supports keyboard-driven file finding, recoverable file drafts, and review drafts that stay while you inspect the diff. Web reviews are bound to the exact head you inspected; an author update rejects a stale submission and preserves your text. These changes are included in beta.2 and documented in the changelog and Web UI guide.
Beta.6 and newer also support editing task instructions before the first run through Web UI, CLI and API, with concurrent-edit protection. This is included in beta.6 and newer. Task editing.
Home keeps queue filters in bookmarkable links and can follow a selected repository live; event bursts share one refresh, while the aggregate view retains bounded polling.
Next priorities are complete review workflows and hosting-metadata migration. The roadmap separates delivered features, published releases and remaining qualification.
See it work
A person, two agents and a CI service share one stream. The output is trimmed from
examples/quickstart.sh, which CI runs on every push and compares line by line with this block.
$ ag integrate prop_6eed… # as agent:refactor-bot — an agent tries to land code on its own
Denied by policy; the stream was not changed:
- actor not allowed to integrate: agents may not integrate unless agent_autonomy.auto_integrate is on …
$ ag integrate prop_6eed… # as user:alice
Blocked (policy v1); the stream was not changed:
- check 'tests' has no trusted passing attestation for this exact tree
- approvals (default): 0 of 1 required
- agent-authored change has no signed provenance
- exclusive lease on 'src/**' held by agent:refactor-bot#run_8f78… (stale_or_missing_token)
candidate tree: 315f74d45183c9e7…
$ ag validate run prop_6eed… --check tests --key ci -- cargo test # as service:ci
check 'tests' PASSED on tree 315f74d45183 (policy v1); attestation att_0f1a… signed by service:ci
$ ag proposal review prop_6eed… --approve # as user:bob
$ ag integrate prop_6eed… --fencing-token 1 # as user:alice
Integrated (merge): stream is now at 793a03b6da69 (version 3, was 70e31c72a4d0), 1 file(s) changed.
$ ag preview prop_2b19… # a concurrent edit to the same line
strategy: Merge (algorithm ag-merge/3+ag-diff/1)
conflict: src/main.rs (content conflict (1 region(s))) # exit code 4 — the stream was not touched
Every refusal says what is missing. Exit code 3 means blocked (supply what is missing and run it again), 4 means refused.
Install
You need Rust 1.89 or newer and a C compiler (SQLite is built in). Linux, macOS and Windows are built and tested in CI;
the sandbox and ag-worker are Linux-only (Windows).
git clone https://github.com/Paffin/AgentGit && cd AgentGit
cargo install --path crates/ag-cli # installs the `ag` binary
The current release target is v0.3.0-beta.7. Use the following archives and install commands after its Release workflow completes. Archives contain ag, ag-server, ag-worker, ag-mcp and orchestrator for Linux and macOS; release verification is tracked by the Release workflow.
curl -fsSL https://raw.githubusercontent.com/Paffin/AgentGit/main/scripts/install.sh | sh -s -- --version 0.3.0-beta.7
docker pull ghcr.io/paffin/agentgit-cli:0.3.0-beta.7
--version is needed while only pre-releases exist. For an existing rc.2 installation, see the previous rc.2 procedure. The rc.2 verification record describes that release's checks and limitations; it is not evidence for rc.3. Install options has the details.
Quick start
mkdir demo && cd demo
ag init --namespace me/demo # creates .ag/ and the stream "main"
echo "# demo" > README.md
ag snapshot -m "first" # record the directory (not yet visible to others)
ag propose -t "Initial import" # verify, publish and open a proposal
ag integrate <proposal-id> # move "main" atomically; any unique id prefix works
ag log
Next, add a policy, start an agent, or run the whole story with
./examples/quickstart.sh. The full walkthrough is Getting started.
Five minutes with a server, nothing to build
ag-server dev # data directory, administrator, demo repository, a sign-in link
ag login http://127.0.0.1:8080 --token-file ./ag-dev-data/dev/token
ag clone http://127.0.0.1:8080/demo/welcome # edit, `ag snapshot`, `ag push -t "my change"`, `ag explain` if refused
ag-server dev prints a link that signs you in to the Web UI and the exact commands above. It is an evaluation mode
(loopback only, plain HTTP, an 8-hour credential), not a deployment. It is included in v0.3.0-beta.7. For the previous v0.2.0-rc.2 archive, Getting started has the same
start on rc.2 in a few more lines.
As a server
cargo install --path crates/ag-server
export AG_BOOTSTRAP_TOKEN=$(openssl rand -hex 32) # the first administrator's credential
ag-server admin --data-dir ./ag-data create-repo acme/web
ag-server admin --data-dir ./ag-data grant --subject user:alice --repo 'acme/*' --role admin
export AG_TOKEN=$(ag-server admin --data-dir ./ag-data mint --subject user:alice --ttl 86400 | tail -n 1)
ag-server serve --data-dir ./ag-data & # 127.0.0.1:8080, gRPC + HTTP/JSON
ag clone http://127.0.0.1:8080/acme/web web && cd web # then edit, `ag snapshot`, `ag push -t "my change"`
The server speaks one protocol, AGWP v1, over gRPC and HTTP/JSON on a single port, and serves the Web UI on it. Compose, Kubernetes, TLS and PostgreSQL with S3 are covered in Deployment.
What it does
- Publishes a change in one verified transaction and moves the stream head by compare-and-swap. A crash at any step leaves exactly one outcome; failures are injected at every protocol step in the tests.
- Merges with a pure, versioned function of base, ours and theirs. Conflicts are typed results reported before anything changes, and a file renamed on one side and edited on the other merges cleanly.
- Binds validation to the candidate tree. An attestation names the tree, the policy version and the environment, and is signed by an issuer the policy trusts. When the stream moves, the old result stops counting.
- Keeps a policy per stream: required checks, approvals bound to the reviewed head, protected paths, and an autonomy envelope that says which paths, and how many files, an agent may land without a person.
- Coordinates agents: an identity per run, tasks, soft and exclusive leases with fencing tokens, conflict prediction and an ordered integration queue.
- Runs untrusted checks in
ag-workerinside a sandbox (rootless namespaces or a container) and signs the result. - Records an append-only reflog and a hash-chained audit log;
ag verifychecks the whole repository. - Imports from and exports to Git with identical tree SHAs, and works fully offline.
- Ships a Web UI, TypeScript and Python SDKs, an MCP server that exposes AgentGit to an agent as tools, and a Go agent platform that can propose changes but never integrate them.
How it compares
GitHub, GitLab and Bitbucket are mature hosting platforms with broader project management, hosted CI, security scanning, permissions at scale and support. AgentGit has repository issues and agent-task handoff; labels, milestones, attachments and hosting-metadata import remain open. The table covers only the question AgentGit is built around: how a change lands when several untrusted actors write to one codebase. Cells about the platforms describe their public documentation; the page linked below has the sources, the access date and the much longer list of what they do better.
| GitHub | GitLab | Bitbucket | AgentGit | |
|---|---|---|---|---|
| Unit of review | pull request | merge request | pull request | proposal |
| Where merge rules are enforced | the platform: branch protection and rulesets | the platform: protected branches, approval rules, push rules (several need Premium) | the platform: branch permissions, merge checks (enforced on Premium in Cloud) | the stream's policy, evaluated in the transaction that moves the head |
| A passing check is bound to the exact tree that lands | in the merge queue, which tests a temporary merge of the queue; otherwise to a commit | with merged results pipelines and merge trains (Premium); otherwise to a pipeline | required builds on the head commit; merge queues build a merge result (paid plans, Pipelines) | always: a signed attestation names the tree, policy version and environment |
| Identity of automated actors | accounts, GitHub Apps, tokens | service accounts, access tokens | accounts, tokens | an identity per agent and per run; credentials can be bound to one run |
| Policy-bound autonomy for agents | built from branch rules and bot permissions | built from the same pieces | built from the same pieces | built in: allowed paths and a file limit per stream |
| Tamper-evident audit | an audit log with export; the docs make no integrity claim | audit events (Ultimate); the docs make no integrity claim | an audit log; not compared | hash-chained, checked by ag audit and ag verify |
| Self-contained and offline | hosted; Enterprise Server for self-managed | SaaS or self-managed | Cloud or Data Center | local mode needs no server; the server is one binary |
| Ecosystem | very large | very large, CI and security built in | large, Jira and Pipelines | small: CLI, SDKs (unpublished), MCP, Web UI |
| Maturity | very high | very high | very high | beta |
The full comparison, including Git, Gerrit and Jujutsu: AgentGit compared.
The Web UI
A new user starts on a home page that says what needs attention, with plain labels (the AgentGit word is in a tooltip), blockers that come with their fix as a button, guided flows to start a repository or give an agent work, rules presets instead of raw JSON, and editing a file and proposing it from the browser. These are included in beta.2. What is still missing is on the roadmap.
Beta.3 adds file-by-file review progress, reload recovery for review drafts, permanent task pages with prerequisite management and confirmed completion/cancellation, and server-side code search with links to matching lines. See the changelog for details and limitations.
A live board of runs, leases, tasks and the merge queue, with four independent verdicts per proposal. These are real screenshots of the UI running against a real server, captured by the end-to-end suite.
How it works
flowchart LR
W["workspace<br/>snapshots"] -->|propose| P["publish<br/>verify every object,<br/>register in ONE transaction"]
P --> Q["proposal<br/>reviews bound to the head"]
Q -->|integrate| C["candidate<br/>fast-forward or<br/>deterministic merge"]
C --> G{"policy, in the<br/>committing transaction"}
G -->|allowed| S[("stream head<br/>compare-and-swap<br/>+ reflog + audit")]
G -->|blocked / denied| Q
C -.->|conflict| W
classDef step fill:#e8eeff,stroke:#5b6cff,color:#1b2150
classDef gate fill:#fff4d6,stroke:#c99a1e,color:#4a3508
classDef done fill:#dcf5e8,stroke:#1f9d67,color:#0f3d2e
class W,P,Q,C step
class G gate
class S done
A proposal has four verdicts. They are independent: none implies another, and each changes on its own.
| Verdict | Question | Decided by | Changes when |
|---|---|---|---|
| Mergeable | Is there one unambiguous result tree? | the merge engine (ag preview) |
a change on either side leaves no single result |
| Validated | Did trusted checks pass on that tree? | signed attestations | the candidate tree or the policy changes |
| Approved | Did enough eligible people approve that head? | reviews and policy | the author pushes again, or the policy's bar moves |
| Integrated | Was the stream updated atomically? | one compare-and-swap transaction | never; it is a fact in history |
Three trust boundaries matter more than the boxes. The core decides without a model, a clock or randomness. The engine runs inside the server, so policy is enforced where untrusted clients connect. Untrusted code runs only in a separate execution plane, which can report a result but never decides whether it counts. Read more in Concepts, the architecture overview and publication and integration.
Guarantees and their tests
Each row names a test in this repository. More than 1,000 Rust tests run in CI, together with the SDK, Web UI and
orchestrator suites against a real ag-server, fuzzing, coverage and mutation gates (Testing).
| Guarantee | Test |
|---|---|
| A crash at any step of publication or integration recovers to exactly one update | crash_at_every_step_recovers_to_exactly_one_integration |
| No lost update under parallel integrators | concurrent_integrations_never_lose_an_update |
| A lost response never causes a double apply | idempotent_replay_and_unknown_outcome_recovery |
| A check on an old candidate is not reused after the stream moves | attestation_cannot_be_reused_after_the_stream_moves |
| A stale lock holder cannot land into a scope someone else now holds | fencing_tokens_are_strictly_increasing_and_reject_stale_holders |
| Byte formats match an independent Python implementation | tests/conformance/ |
| Git history round-trips with identical tree SHAs | history_survives_a_round_trip_with_identical_git_trees |
| Tampering with the audit log or objects is detected | audit_chain_detects_tampering |
The threat model and its known limits are in Security.
Documentation
| Start | Getting started, tutorials, concepts, FAQ, comparison |
| Guides | agents, policy, validation, workers, remote, history, Git bridge |
| Clients | Web UI, SDKs, MCP, orchestrator |
| Reference | CLI, configuration, AGWP v1, OpenAPI, object formats |
| Operations | deployment, high availability, observability, backup, hardening, troubleshooting |
| Design | architecture, ADRs, ADR traceability, security, sandbox |
The docs are checked in CI: the CLI reference is generated from the binary, tutorial commands are run against real
binaries, and scripts/check_docs.py verifies links, test names, ag commands and AG_* variables. The site builds with
mkdocs build --strict and deploys to GitHub Pages from main.
AgentGit MCP questions
What is AgentGit?
AgentGit is a version control system designed for repositories that are written to by people, coding agents, and CI services.
Can I migrate from GitHub or GitLab?
Yes, you can upload a full Git bundle from GitHub or GitLab to AgentGit to inspect branch/tag mapping and publish verified results.