git_archive
Create a git archive (zip or tar).
Browse a remote repository by URL, or drive the working copy — branches, commits, stash, push and pull.
LABSCO SUMMARY
The clone-and-read half is the unusual part: hand it a URL and it fetches the repository into a deterministic temporary directory, reuses that on the next question, and lets you walk the tree, read files and search code without cloning anything yourself. The rest is a full Git surface including the destructive end — reset, clean and rebase are all here — so your local credentials are the boundary.
A Git server with two halves. It clones a repository by URL to inspect its tree, files, history and diffs, and it operates on a working copy — branches, commits, staging, push and pull, stash, tags, rebase, reset and revert.
Git installed on the machine and Node to run the server. No account and no key — it operates with whatever access your local Git credentials already have. Cloned repositories land in a temporary directory keyed by the URL and are reused on later calls.
One command — npm install -g git-commands-mcp
USE CASES
Hand over the URL, get the directory tree back, and read the specific files you care about.
Search the repository for a pattern and get the matching lines with the surrounding context.
Compare the two branches for the file list and commit count, then pull the full commits with their diffs.
Read the working directory's status and diffs before deciding what to stage.
Stage the files, commit with a message, and push to the remote in sequence.
Stash the work in progress, switch to what is urgent, and restore it afterwards.
Read the blame for the file rather than paging through history.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
git_archiveCreate a git archive (zip or tar).
git_attributesManage git attributes for files.
git_blameGet blame information for a file.
git_branch_diffCompare two branches and show files changed between them.
git_checkout_branchCreate and/or checkout a branch.
git_cleanPerform git clean operations.
git_commitCreate a commit with the specified message.
git_commit_historyGet commit history for a branch with optional filtering.
git_commits_detailsGet detailed information about commits including full messages and diffs.
git_configConfigure git settings for the repository.
git_create_tagCreate a tag.
git_delete_branchDelete a branch from the repository.
git_directory_structureClone a Git repository and return its directory structure in a tree format.
git_hooksManage git hooks in the repository.
git_lfsManage Git LFS (Large File Storage).
git_lfs_fetchFetch LFS objects from the remote repository.
git_local_changesGet uncommitted changes in the working directory.
git_merge_branchMerge a source branch into the current or target branch.
git_pullPull changes from a remote repository.
git_pushPush changes to a remote repository.
git_read_filesRead the contents of specified files in a given git repository.
git_rebaseRebase the current branch onto another branch or commit.
git_resetReset repository to specified commit or state.
git_revertRevert the current branch to a commit or state.
git_search_codeSearch for patterns in repository code.
git_stashCreate or apply a stash.
git_trackTrack (stage) specific files or all files.
BEFORE YOU INSTALL
27 tools when we connected. Only seven read-only browsing tools are documented; the undocumented twenty include git_commit, git_push, git_reset, git_clean and git_delete_branch, so a connected agent can change your repository.
CONTEXT COST
Rated by the size of the 27 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"git-commands-mcp": {
"command": "npx",
"args": [
"-y",
"git-commands-mcp"
]
}
}
}npm install -g git-commands-mcp