Feedback

Git (selfagency) MCP Server

@selfagency Claim

Basic information

Runtime
TypeScript
Version
1.0.0
Category
License
MIT
Transports
stdio
Author
selfagency
Submitted by
Community
Quality
10
Stars
13

About Git (selfagency) MCP Server

A Git MCP server that doesn't suck

Git (selfagency) is a MCP server in the Ai Ml category listed in the AddMCP.net directory, published by selfagency. It exposes 12 tools, including git_status, git_history, git_commits, git_branches and more. Supported transport: stdio. Runtime: TypeScript. License: MIT. The repository has 13 GitHub stars. Source code is hosted on github.com. Related topics: ai-ml, community, development, git, vcs.

Setup

{
    "mcpServers": {
        "git": {
            "command": "npx",
            "args": [
                "-y",
                "@selfagency/git-mcp@latest"
            ],
            "env": {
                "GIT_REPO_PATH": "/path/to/your/repo"
            }
        }
    }
}

Git (selfagency) MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "git": {
            "command": "npx",
            "args": [
                "-y",
                "@selfagency/git-mcp@latest"
            ],
            "env": {
                "GIT_REPO_PATH": "/path/to/your/repo"
            }
        }
    }
}

Git (selfagency) MCP Server tools

  • git_status — Status and diff tool. Use action=status|diff|diff_main to inspect working tree and branch deltas.
    repo_path:string, action:string, mode:string, from_ref:string, to_ref:string, filtered:boolean, base_branch:string, response_format:string
  • git_history — History tool. Use action=log|show|reflog|blame|lg|who to inspect commits, refs, and contributors.
    repo_path:string, action:string, limit:integer, offset:integer, first_parent:boolean, no_merges:boolean, all_branches:boolean, simplify_merges:boolean, order:string, revision_range:string, pathspecs:array, author:string, …
  • git_commits — Commit-area tool. Use action=add|restore|commit|reset|revert|undo|nuke|wip|unstage|amend.
    repo_path:string, action:string, all:boolean, paths:array, message:string, amend:boolean, no_edit:boolean, sign:boolean, signing_key:string, no_verify:boolean, mode:string, target:string, …
  • git_branches — Branch tool. Use action=list|create|delete|rename|checkout|set_upstream|recent for branch workflows.
    repo_path:string, action:string, all:boolean, name:string, old_name:string, new_name:string, from_ref:string, ref:string, create:boolean, force:boolean, branch:string, upstream:string, …
  • git_remotes — Remote tool. Use action=list|manage|fetch|pull|push for network/transport operations.
    repo_path:string, action:string, remote_action:string, name:string, url:string, remote:string, branch:string, refspecs:array, prune:boolean, prune_tags:boolean, negotiation_tips:array, rebase:boolean, …
  • git_workspace — Workspace tool for stash/rebase/cherry-pick/merge/bisect/tag/worktree/submodule actions plus stash_all shortcut.
    repo_path:string, action:string, stash_action:string, message:string, index:integer, include_untracked:boolean, rebase_action:string, rebase_interactive:boolean, rebase_autosquash:boolean, rebase_merges:boolean, rebase_onto:string, rebase_upstream:string, …
  • git_context — Context/config tool. Use action=summary|search|get_config|set_config|aliases for repo context operations.
    repo_path:string, action:string, query:string, limit:integer, key:string, value:string, response_format:string
  • git_lfs — Manage Git Large File Storage (LFS). Supports tracking/untracking file patterns, listing LFS-tracked files and status, pulling/pushing LFS objects, installing LFS hooks for the repository, and migrating existing files into or out of LFS storage.
    repo_path:string, action:string*, patterns:array, remote:string, include:string, exclude:string, everything:boolean, response_format:string
  • git_flow — Implements git-flow-next-style workflows directly, without requiring the external CLI. The canonical contract uses operation=config/topic/control with subactions, while legacy alias actions remain supported for compatibility. Supports preset init, overview, config CRUD, generalized topic lifecycle operations, and finish recovery.
    repo_path:string, action:string, operation:string, config_action:string, topic_action:string, control_action:string, topic:string, name:string, new_name:string, pattern:string, match_mode:string, branch_kind:string, …
  • git_workflow — Run named multi-step Git workflows with resumable lifecycle controls. Use action=start|status|continue|abort|list with workflow families such as snapshot, replay, branch_surgery, and publish.
    repo_path:string, action:string, workflow:string, base_branch:string, log_count:integer, mode:string, target_branch:string, source_commits:array, patch_files:array, three_way:boolean, backup_branch:string, reset_to:string, …
  • git_docs — Search and browse official Git documentation from git-scm.com. Use action="search" to find relevant commands and concepts by keyword. Use action="man" to fetch the full man page for a specific git command (e.g. query="commit" fetches the git-commit man page). Useful for answering questions about how to use git commands, understanding options, and discovering the right git command for a task.
    action:string*, query:string*, response_format:string
  • git_ping — Returns a simple response to verify the server is running.
    message:string

Overview

What is Git (selfagency)?

Git MCP is a Git server for the Model Context Protocol that exposes the full Git workflow—inspect, write, branch, remote, stash, rebase, LFS, git-flow, and documentation lookup—to any MCP-compatible AI agent. It is built for coding agents in tools like GitHub Copilot, Claude Code, Cursor, and OpenAI Codex.

How to use Git (selfagency)?

Run directly via npx with no installation, or install globally with npm. The repository path is set with the --repo-path CLI argument or the GIT_REPO_PATH environment variable, with a per-call override option. Additional safety and signing behavior is configured through environment variables.

Key features of Git (selfagency)

  • 11 grouped tools with over 60 actions for everyday Git workflows
  • Safety-first: destructive operations require explicit confirmation
  • GPG/SSH signing support for commits and tags
  • Git LFS and Git Flow workflow support without external CLIs
  • Documentation lookup from git-scm.com and man pages
  • URI-addressable read-only MCP Resources for status, log, branches, and diff

Use cases of Git (selfagency)

  • Inspecting repository state and searching history through an AI agent
  • Automating branching, staging, committing, and pushing via coding assistants
  • Performing recovery operations like reflog inspection, undo, and reset
  • Managing Git Flow or LFS workflows without installing separate CLI tools
  • Fetching Git documentation and man pages from within an LLM

Frequently asked questions

1 What are the runtime requirements?

Node.js and a local Git installation. The server is powered by simple-git and cross-platform on macOS, Linux, and Windows (Git for Windows).

2 How does the server handle destructive operations?

Destructive operations require explicit confirmation. Force push and hook bypass are opt-in via environment variables that default to false.

3 How is the repository path configured?

Pass --repo-path on the CLI or set GIT_REPO_PATH as an environment variable. The repo_path can also be overridden per-call.

4 What MCP transport does the server use?

The server communicates over stdio, making it compatible with any MCP client that can call tools and resources.

5 Does the server support commit and tag signing?

Yes. GPG/SSH signing is supported for commits and tags, with optional server-level auto-sign via environment variables.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬