Git
Summary
This Git MCP server provides AI assistants with capabilities to interact with Git repositories. Developed as an open-source project, it integrates with the simple-git library to enable core Git operations like cloning, committing, and managing branches. The server exposes a standardized interface for Git interactions, abstracting the complexities of version control operations. By leveraging TypeScript and following modern JavaScript practices, it offers a robust and type-safe implementation. This server is particularly useful for developers and DevOps teams looking to incorporate AI-driven Git operations into their workflows, such as automated code reviews, commit analysis, or intelligent branching strategies.
Available Actions(25)
git_add
Stages specified files or patterns. Arguments: path (optional), files (optional)
git_branch
Manages branches (list, create, delete, rename, show current). Arguments: path (optional), mode, branchName (optional), newBranchName (optional), startPoint (optional), force (optional), all (optional), remote (optional)
git_checkout
Switches branches or restores working tree files. Arguments: path (optional), branchOrPath, newBranch (optional), force (optional)
git_cherry_pick
Applies changes introduced by existing commits. Arguments: path (optional), commitRef, mainline (optional), strategy (optional), noCommit (optional), signoff (optional)
git_clean
Removes untracked files. Requires 'force: true'. Arguments: path (optional), force, dryRun (optional), directories (optional), ignored (optional)
git_clear_working_dir
Clears the session-specific working directory. No arguments.
git_clone
Clones a repository into a specified absolute path. Arguments: repositoryUrl, targetPath, branch (optional), depth (optional), quiet (optional)
git_commit
Commits staged changes. Supports author override, signing control. Arguments: path (optional), message, author (optional), allowEmpty (optional), amend (optional), forceUnsignedOnFailure (optional)
git_diff
Shows changes between commits, working tree, etc. Arguments: path (optional), commit1 (optional), commit2 (optional), staged (optional), file (optional), includeUntracked (optional)
git_fetch
Downloads objects and refs from other repositories. Arguments: path (optional), remote (optional), prune (optional), tags (optional), all (optional)
git_init
Initializes a new Git repository at the specified absolute path. Defaults to 'main' for initial branch. Arguments: path, initialBranch (optional), bare (optional), quiet (optional)
git_log
Shows commit logs. Arguments: path (optional), maxCount (optional), author (optional), since (optional), until (optional), branchOrFile (optional)
git_merge
Merges the specified branch into the current branch. Arguments: path (optional), branch, commitMessage (optional), noFf (optional), squash (optional), abort (optional)
git_pull
Fetches from and integrates with another repository or local branch. Arguments: path (optional), remote (optional), branch (optional), rebase (optional), ffOnly (optional)
git_push
Updates remote refs using local refs. Arguments: path (optional), remote (optional), branch (optional), remoteBranch (optional), force (optional), forceWithLease (optional), setUpstream (optional), tags (optional), delete (optional)
git_rebase
Reapplies commits on top of another base tip. Arguments: path (optional), mode (optional), upstream (optional), branch (optional), interactive (optional), strategy (optional), strategyOption (optional), onto (optional)
git_remote
Manages remote repositories (list, add, remove, show). Arguments: path (optional), mode, name (optional), url (optional)
git_reset
Resets current HEAD to a specified state. Supports soft, mixed, hard modes. USE 'hard' WITH CAUTION. Arguments: path (optional), mode (optional), commit (optional)
git_set_working_dir
Sets the default working directory. Can optionally initialize repo if not present. Requires absolute path. Arguments: path, validateGitRepo (optional), initializeIfNotPresent (optional)
git_show
Shows information about Git objects (commits, tags, etc.). Arguments: path (optional), ref, filePath (optional)
git_stash
Manages stashed changes (list, apply, pop, drop, save). Arguments: path (optional), mode, stashRef (optional), message (optional)
git_status
Gets repository status (branch, staged, modified, untracked files). Arguments: path (optional)
git_tag
Manages tags (list, create annotated/lightweight, delete). Arguments: path (optional), mode, tagName (optional), message (optional), commitRef (optional), annotate (optional)
git_worktree
Manages Git worktrees (list, add, remove, move, prune). Arguments: path (optional), mode, worktreePath (optional), commitish (optional), newBranch (optional), force (optional), detach (optional), newPath (optional), verbose (optional), dryRun (optional), expire (optional)
git_wrapup_instructions
Provides a standard Git wrap-up workflow. Arguments: acknowledgement, updateAgentMetaFiles (optional)
コミュニティレビュー
まだレビューはありません. 最初のレビューを投稿しましょう!
会話に参加するにはサインインしてください