AgentStack
MCP unreviewed MIT Self-run

Agit

mcp-fato07-agit · by Fato07

AI-native Git workflow tool with MCP server for agent-driven development

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add mcp-fato07-agit

Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.

Security review

⚠ Flagged

1 finding(s); flagged for manual review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures
  • high Pipes remote content directly into a shell (remote code execution).

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Agit? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

agit

[](https://github.com/Fato07/agit/actions/workflows/ci.yml) [](https://github.com/Fato07/agit/releases) [](https://goreportcard.com/report/github.com/fathindos/agit) [](https://github.com/Fato07/agit/blob/main/go.mod) [](https://opensource.org/licenses/MIT)

Infrastructure-aware Git orchestration for AI agents.

agit gives AI coding agents persistent, queryable awareness of their Git infrastructure. It manages a local registry of repositories, orchestrates Git worktrees for agent isolation, detects cross-worktree conflicts, and coordinates task assignment across multiple agents.

The Problem

AI coding agents (Claude Code, Cursor, Codex, OpenClaw) operate without persistent memory of their infrastructure. Each session starts blind — no knowledge of available repos, active work, or what other agents are doing. When multiple agents work on the same repo, conflicts are discovered only at merge time.

The Solution

agit provides:

  • Persistent registry — agents always know what repos are available via MCP
  • Worktree isolation — each agent gets its own workspace, no stepping on toes
  • Conflict detection — know about overlapping changes before merge time
  • Task coordination — agents claim work atomically, preventing duplication
  • Hook system — trigger custom scripts on worktree, task, and conflict events

Quick Start

# Install (binary)
curl -sSfL https://raw.githubusercontent.com/Fato07/agit/main/install.sh | sh

# Or install from source
go install github.com/fathindos/agit@latest

# Initialize
agit init

# Register your repos
agit add ~/projects/my-app --name my-app
agit add ~/projects/api --name api

# Spawn isolated worktrees for agents
agit spawn my-app --task "refactor auth" --agent claude-1
agit spawn my-app --task "add tests" --agent cursor-1

# Check for conflicts
agit conflicts my-app

# See everything at a glance
agit status

# Merge completed work back
agit merge  --cleanup

Demo

MCP Integration

Add agit to your agent's MCP config for automatic infrastructure awareness:

{
  "mcpServers": {
    "agit": {
      "command": "agit",
      "args": ["serve"]
    }
  }
}

Now any MCP-compatible agent can call agit_list_repos() on startup and immediately know what's available.

Commands

| Command | Description | |---------|-------------| | agit init | Initialize agit (~/.agit/) | | agit add | Register a Git repository | | agit repos | List registered repositories | | agit spawn | Create isolated worktree for an agent | | agit status [repo] | Show worktrees, agents, conflicts | | agit conflicts [repo] | Check for overlapping file changes | | agit tasks | Manage tasks (create/claim/complete/next) | | agit agents | List and manage registered AI agents | | agit merge | Merge worktree back to base branch | | agit cleanup | Remove completed/stale worktrees | | agit serve | Start MCP server (stdio or SSE) | | agit update / agit upgrade | Self-update to the latest release | | agit config show | Display current configuration | | agit config set | Set a configuration value | | agit config path | Print configuration file path | | agit config reset | Reset configuration to defaults |

Global Flags

| Flag | Description | |------|-------------| | --no-color | Disable colored output | | -q, --quiet | Suppress informational messages | | -o, --output | Output format: text (default) or json | | -i, --interactive | Enable interactive selection mode |

Configuration

agit stores its configuration in ~/.agit/config.toml. Use agit config subcommands or edit the file directly.

[server]
transport = "stdio"       # "stdio" or "sse"
port = 3847               # Port for SSE transport

[defaults]
branch_prefix = "agit/"           # Prefix for auto-generated branch names
worktree_dir = ".worktrees"       # Directory for worktrees within repos
cleanup_stale_after = "24h"       # Duration before stale worktrees are cleaned
auto_conflict_check = true        # Check for conflicts automatically

[agent]
heartbeat_interval = "30s"        # Agent heartbeat frequency
stale_after = "5m"                # Duration before agents are marked disconnected

[ui]
color = ""                # "auto", "always", or "never" (empty = auto)
output_format = ""        # "text" or "json" (empty = text)
compact = false           # Compact output mode

[updates]
enabled = true            # Enable automatic update checking
check_interval = "24h"   # How often to check for updates

hook_timeout = "30s"      # Maximum execution time for hooks

[hooks]
# Run shell commands on events (async, non-blocking)
# "worktree.created" = "notify-send 'New worktree created'"
# "task.claimed" = "echo $AGIT_TASK_ID >> /tmp/claimed.log"
# "task.completed" = "./scripts/on-task-done.sh"
# "task.failed" = "curl -X POST https://hooks.example.com/fail"
# "worktree.removed" = "echo cleaned"
# "conflict.detected" = "slack-notify 'Conflict found'"

Supported hook events: worktree.created, worktree.removed, task.claimed, task.completed, task.failed, conflict.detected

Hooks receive environment variables: AGIT_EVENT, plus event-specific variables like AGIT_WORKTREE_ID, AGIT_TASK_ID, AGIT_REPO.

All dot-notation keys for agit config set:

server.transport, server.port, defaults.branch_prefix, defaults.worktree_dir, defaults.cleanup_stale_after, defaults.auto_conflict_check, agent.heartbeat_interval, agent.stale_after, ui.color, ui.output_format, ui.compact, updates.enabled, updates.check_interval, hook_timeout, hooks.

MCP Tools Reference

When running as an MCP server (agit serve), the following tools are available to agents:

| Tool | Description | |------|-------------| | agit_list_repos | List all registered repositories | | agit_repo_status | Get detailed status for a specific repository | | agit_spawn_worktree | Create an isolated worktree for an agent | | agit_remove_worktree | Remove a worktree from disk and registry | | agit_check_conflicts | Scan for file conflicts across active worktrees | | agit_list_tasks | List tasks for a repository | | agit_claim_task | Atomically claim a pending task for an agent | | agit_complete_task | Mark a task as completed with optional result | | agit_merge_worktree | Merge a worktree branch into the default branch | | agit_register_agent | Register a new AI agent | | agit_heartbeat | Update agent heartbeat timestamp | | agit_create_task | Create a new task for a repository | | agit_fail_task | Mark a task as failed with optional reason | | agit_start_task | Mark a claimed task as in-progress with a worktree | | agit_list_agents | List all registered AI agents | | agit_list_worktrees | List worktrees for a repository | | agit_get_task | Get detailed information about a specific task | | agit_add_repo | Register a Git repository via MCP | | agit_cleanup_worktrees | Prune orphaned worktrees | | agit_next_task | Atomically claim the highest-priority pending task |

License

MIT

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.