# agentsync [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/jarmstrong158/agentsync  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agentsync

## Description
Multi-agent coordination MCP: claim work, survey peers, resolve conflicts via a git branch as CAS.

## Tools
Capabilities this server exposes over MCP:

- **claim_overlap** — declared-path intersection (intent, path-aware).
- **merge_conflict** — a real `git merge-tree` dry-run merge (textual). Catches

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What agentsync MCP server does

The agentsync MCP server coordinates agents that modify the same Git repository. Each agent records a claim containing its task, files it expects to touch, dependencies, working branch, and status. Other agents can inspect those claims before planning work, then reserve non-overlapping paths.

Coordination state lives in a `claims.json` file on a dedicated `agentsync` branch. Keeping this branch separate from the main development history prevents coordination data from entering normal code history. The board is a shared, long-lived repository artifact, and each collaborator can point the server at their own local clone of that board.

Path checks account for exact matches, parent-directory relationships, and globs. Paths are normalized before comparison, so equivalent forms such as `./auth.py` and `auth.py` are treated as the same path.

## How it works

The server reads the latest coordination state, evaluates the requested claim, and pushes an updated board. Git push acts as a compare-and-swap operation: if another update wins first, the server fetches the newer state and evaluates the request again. This lets a claim observe a competing claim before its own update is committed.

The server performs Git operations in a private worktree under `.git/`, leaving the agent's active code branch undisturbed. `survey()` reports peer tasks, paths, dependencies, branches, statuses, timestamps, claim age, and stale in-progress claims. `claim()` blocks when touched paths overlap an active peer claim or when required paths overlap a peer's in-progress work, unless `force` is requested.

After implementation, `check_conflicts()` compares the current branch with peer branches using two checks: declared path overlap and a textual `git merge-tree` dry run. This can reveal merge collisions that the original claims did not predict.

## Setup and configuration

Install the Python dependency from `requirements.txt`; the project currently requires the `mcp` package. Configure the server as a standard stdio MCP process, providing each agent with its own identifier and local board clone.

`AGENTSYNC_BOARD_REPO` explicitly identifies the board clone, while `AGENTSYNC_AGENT_ID` identifies the collaborating agent. `AGENTSYNC_REPO` remains available as a legacy alias. `AGENTSYNC_REMOTE` defaults to `origin`, and `AGENTSYNC_BRANCH` defaults to `agentsync`. The branch is created automatically on the first `survey()` or `claim()` call when an explicitly addressed board is used.

GitHub operations require the GitHub CLI authenticated with `repo` scope. This applies to repository provisioning, collaborator invitations, and other GitHub-backed operations. `provision()` can create a private repository, initialize it, seed the coordination branch, and invite a collaborator; `add_collaborator()` grants access to an existing repository.

## Tools and capabilities

- `survey()` reads the latest board and identifies peer claims and stale work.
- `claim()` reserves a task and its paths, with optional dependencies, branch, and forced override.
- `release()` abandons the current claim without marking it complete.
- `update_status()` sets `planning`, `in-progress`, or `done`; completed claims receive changed-file information based on the branch diffstat.
- `check_conflicts()` checks declared overlaps and textual merge conflicts.
- `provision()` bootstraps a shared GitHub repository; `add_collaborator()` invites users to an existing one.

The server supports multiple collaborators, not only two. Each agent should use a distinct ID because one ID represents one active claim; forced reuse is available for specified restart or exception cases and produces a warning when protection is displaced.

_Full upstream README: https://allmcps.com/mcp/agentsync/readme_

