git-mcp

v0.4.2
io.github.selfagency/git-mcp Checked 4 hours ago Published 1 month ago

A Git MCP server that doesn't suck

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

git_status Git Status Tools

Status and diff tool. Use action=status|diff|diff_main to inspect working tree and branch deltas.

ParameterTypeDescription
actionstring
base_branchstring
filteredboolean
from_refstring
modestring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
to_refstring

git_history Git History Tools

History tool. Use action=log|show|reflog|blame|lg|who to inspect commits, refs, and contributors.

ParameterTypeDescription
actionstring
all_branchesboolean
authorstring
file_pathstring
first_parentboolean
grepstring
limitinteger
no_mergesboolean
offsetinteger
orderstring
pathspecsarray
refstring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
revision_rangestring
simplify_mergesboolean
sincestring
untilstring

git_commits Git Commit Tools

Commit-area tool. Use action=add|restore|commit|reset|revert|undo|nuke|wip|unstage|amend.

ParameterTypeDescription
actionstring
allboolean
amendboolean
confirmboolean
mainlineinteger
messagestring
modestring
no_commitboolean
no_editboolean
no_verifyboolean
pathsarray
refstring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
signbooleanSign the commit. Defaults to the server GIT_AUTO_SIGN_COMMITS setting.
signing_keystring
sourcestring
stagedboolean
targetstring
worktreeboolean

git_branches Git Branch Tools

Branch tool. Use action=list|create|delete|rename|checkout|set_upstream|recent for branch workflows.

ParameterTypeDescription
actionstring
allboolean
branchstring
countinteger
createboolean
forceboolean
from_refstring
namestring
new_namestring
old_namestring
refstring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
upstreamstring

git_remotes Git Remote Tools

Remote tool. Use action=list|manage|fetch|pull|push for network/transport operations.

ParameterTypeDescription
actionstring
atomicboolean
branchstring
ff_onlyboolean
forceboolean
force_with_leaseboolean
namestring
negotiation_tipsarray
no_verifyboolean
pruneboolean
prune_tagsboolean
push_optionsarray
rebaseboolean
rebase_modestring
refspecsarray
remotestring
remote_actionstring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
set_upstreamboolean
tagsboolean
urlstring

git_workspace Git Workspace Tools

Workspace tool for stash/rebase/cherry-pick/merge/bisect/tag/worktree/submodule actions plus stash_all shortcut.

ParameterTypeDescription
actionstring
bad_refstring
bisect_actionstring
branchstring
cherry_pick_actionstring
cherry_pick_mainlineinteger
cherry_pick_no_commitboolean
cherry_pick_record_originboolean
cherry_pick_refsarray
cherry_pick_strategystring
cherry_pick_strategy_optionsarray
commandstring
command_argsarray
conflict_stylestring
good_refstring
include_untrackedboolean
indexinteger
merge_actionstring
merge_ff_onlyboolean
merge_logboolean
merge_no_commitboolean
merge_no_ffboolean
merge_refsarray
merge_squashboolean
merge_strategystring
merge_strategy_optionsarray
messagestring
namestring
ontostring
pathstring
pathsarray
rebase_actionstring
rebase_autosquashboolean
rebase_branchstring
rebase_interactiveboolean
rebase_mergesboolean
rebase_ontostring
rebase_upstreamstring
recursiveboolean
refstring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
signbooleanSign the tag. Defaults to the server GIT_AUTO_SIGN_TAGS setting.
signing_keystring
stash_actionstring
submodule_actionstring
submodule_depthinteger
submodule_jobsinteger
submodule_remoteboolean
tag_actionstring
targetstring
urlstring
worktree_actionstring
worktree_detachedboolean
worktree_expirestring
worktree_forceboolean
worktree_lock_reasonstring

git_context Git Context Tools

Context/config tool. Use action=summary|search|get_config|set_config|aliases for repo context operations.

ParameterTypeDescription
actionstring
keystring
limitinteger
querystring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
valuestring

git_but_check Check GitButler Availability

Detects whether the GitButler `but` CLI is available and returns guidance on whether to prefer `but mcp` / `but` commands over git-mcp tools. When `but` is present, agents should prefer GitButler for version control and run `but teardown` before using git-mcp tools on a GitButler-managed repository.

ParameterTypeDescription
response_formatstringOutput format for the response.

git_jj_check Check Jujutsu Availability

Detect whether the Jujutsu `jj` CLI is available and whether the repository is jj-managed (has a .jj/ directory). When jj-managed, agents should prefer the `jj` CLI for all version control operations, since git-mcp tools operate on the underlying .git and will not reflect jj's change model.

ParameterTypeDescription
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_tangled_check Check Tangled Hosting

Detect whether the repository origin remote points at a Tangled host (tangled.org or a self-hosted knot). Tangled is a decentralized Git host on the AT Protocol — git transport works normally via git-mcp tools, but there is no PR/MR surface.

ParameterTypeDescription
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_entire_check Check Entire Availability

Detect whether the Entire CLI is available and whether the repository is Entire-managed (has a .entire/ directory). When managed, agents should use the `entire` CLI for session, checkpoint, and attribution queries; git-mcp tools do not expose Entire's context layer.

ParameterTypeDescription
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_analytics Git Repository Analytics

Read-only repository analytics computed from local git history. Use action=contributors|churn|activity|summary|file-stats.

ParameterTypeDescription
action *stringAnalytics operation.
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_pr Git Pull Request

Create, list, or merge pull requests / merge requests on the detected forge provider (GitHub, GitLab, Forgejo, Gitea, Bitbucket). Uses the provider CLI (gh/glab/tea) when installed, otherwise the provider REST API with a *_TOKEN env var.

ParameterTypeDescription
action *stringPull request operation.
basestringTarget branch (create, default main).
bodystringPR/MR body/description (create).
headstringSource branch (create, default HEAD).
methodstringMerge method (merge).
numberintegerPR/MR number (merge).
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
statestringFilter for list (default open).
titlestringPR/MR title (create).

git_lfs Git LFS Actions

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.

ParameterTypeDescription
action *string
everythingbooleanPass --all/--everything to include all refs in push/migrate operations.
excludestringComma-separated exclude patterns for migrate or pull operations.
includestringComma-separated include patterns for migrate or pull operations.
patternsarrayFile glob patterns for track/untrack (e.g. ["*.psd", "*.zip"]).
remotestringRemote name for pull/push operations.
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_rewrite Git History Rewrite

Rewrite commit history. Use action=reword|squash|rewrite-messages|backup|restore. History rewriting changes commit hashes and requires force-push; create a backup first.

ParameterTypeDescription
action *stringHistory rewrite operation.
confirmbooleanConfirm destructive history rewrite.
countintegerNumber of commits to squash.
messagestringNew commit message (reword/squash).
messagesobjectMap of commit SHA to replacement message (rewrite-messages).
namestringBackup branch name (backup/restore).
rangestringCommit range to rewrite (e.g. HEAD~5..HEAD).
refstringCommit ref to reword (defaults to HEAD).
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_flow Git Flow Actions

Drives the git-flow-next CLI. The CLI owns the workflow semantics — the finish state machine, conflict recovery, and worktree lifecycle — so it must be installed and on PATH; this tool only builds argv. Prefer operation=config/topic/control with subactions; the legacy action aliases remain for compatibility.

ParameterTypeDescription
actionstringLegacy-compatible action alias.
auto_updatebooleanEnable auto-update on base branch definitions.
base_refstringExplicit starting ref for topic-start.
branch_kindstringWhether a flow config operation targets a base branch or topic branch type.
config_actionstringconfig_action is required for operation=config.
config_filestringPath to a git config file when scope is "file".
control_actionstringContinue or abort an in-progress flow finish operation.
develop_branchstringOverride the develop branch name (default: gitflow.branch.develop config or "develop").
downstream_strategystringMerge strategy for flow branch integration.
fetchbooleanFetch the remote before finish when a remote is configured.
ffbooleanUse fast-forward behavior when the selected strategy allows it.
forcebooleanForce re-initialization even if git-flow is already configured.
force_deletebooleanForce deletion for topic-delete and config flags.
force_worktreebooleanOn finish/delete, remove a git-flow-created worktree even with uncommitted changes.
keep_branchbooleanKeep the topic branch after finish.
keep_worktreebooleanOn finish/delete, keep the branch worktree detached instead of removing it.
main_branchstringOverride the main branch name (default: gitflow.branch.master config or "main").
namestringBranch short name, branch type name, or release/hotfix version depending on the action.
new_namestringNew short name or branch type name for rename operations.
no_create_branchesbooleanSkip base branch creation during init and only write configuration.
operationstringCanonical git_flow operation.
parentstringParent/base branch for flow config mutations.
prefixstringBranch prefix for topic type definitions, such as "feature/".
preserve_mergesbooleanPreserve merges during rebase-based finish flows.
presetstringgit-flow-next preset to initialize.
production_branchstringNOT SUPPORTED by git-flow-next 2.1.0 init; use preset=gitlab instead.
publishbooleanPublish parent/backmerge branches after finish.
rebase_before_finishbooleanRebase the topic branch onto its parent before finishing.
recoverstringWhich in-progress operation control_action targets (default: finish).
remotestringRemote name for publish operations (default: "origin").
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
scopestringGit config scope used for init writes.
sharedbooleanWrite a committable .gitflow file (init, or config edit).
staging_branchstringNOT SUPPORTED by git-flow-next 2.1.0 init; use preset=gitlab instead.
start_pointstringConfigured start point for a topic type.
strategystringIntegration strategy for finish/update operations.
tagbooleanCreate an annotated tag when finishing a release or hotfix (default: true).
tag_messagestringMessage for the version tag.
tag_prefixstringTag prefix for flow config mutations.
topicstringTopic branch type for generalized actions such as topic-start, topic-list, or topic-publish.
topic_actionstringTopic branch lifecycle operation.
upstream_strategystringMerge strategy for flow branch integration.
worktreebooleanWorktree handling for the branch. finish/delete expose only --keep-worktree and --force-worktree; start and checkout expose --worktree/--no-worktree/--worktree-path. Using the wrong pair raises rather…
worktree_pathstringCreate the worktree at this path instead of the computed one.
worktreesbooleanAppend a worktree column to a list (only valid with topic_action=list).

git_workflow Git Workflow Orchestrator

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.

ParameterTypeDescription
actionstringLifecycle action for git_workflow execution and state management.
auto_publishbooleanAutomatically publish after replay/branch_surgery sequence.
backup_branchstringBackup branch name for branch_surgery workflow.
base_branchstringBase branch for snapshot merge-base checks (default: main).
confirm_hard_resetbooleanRequired true when reset_to is provided because hard reset is destructive.
fetch_firstbooleanFetch before publish workflow steps.
force_with_leasebooleanUse --force-with-lease for publish push steps.
log_countintegerCommit count for snapshot log output.
modestringReplay mode for replay workflow.
patch_filesarrayPatch/mailbox file list for replay mode=am.
publishbooleanDeprecated alias for auto_publish; retained for backward compatibility.
rebase_ontostringOptional rebase target before publish push step.
remotestringRemote name for publish-related steps (default: origin).
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
reset_tostringOptional hard-reset target in replay/branch_surgery workflows.
response_formatstringOutput format for the response.
set_upstreambooleanUse --set-upstream for publish push steps.
source_commitsarrayCommit list for replay and branch_surgery flows.
target_branchstringTarget branch for replay/branch_surgery/publish workflows.
three_waybooleanUse --3way when applying patch series via git am.
workflowstringNamed workflow family for multi-step Git orchestration.

git_stash Git Stash

Stash, list, apply, pop, or drop stashes.

ParameterTypeDescription
actionstring
include_untrackedboolean
indexinteger
messagestring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_rebase Git Rebase

Rebase: start, continue, abort, or skip.

ParameterTypeDescription
actionstring
autosquashboolean
branchstring
interactiveboolean
mergesboolean
ontostring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
upstreamstring

git_cherry_pick Git Cherry-Pick

Cherry-pick: start, continue, or abort.

ParameterTypeDescription
actionstring
mainlineinteger
no_commitboolean
record_originboolean
refsarray
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
strategystring
strategy_optionsarray

git_merge Git Merge

Merge: start, continue, or abort.

ParameterTypeDescription
actionstring
conflict_stylestring
ff_onlyboolean
logboolean
no_commitboolean
no_ffboolean
refsarray
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
squashboolean
strategystring
strategy_optionsarray

git_bisect Git Bisect

Bisect: start, good, bad, skip, run, or reset.

ParameterTypeDescription
actionstring
bad_refstring
commandstring
command_argsarray
good_refstring
refstring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_tag Git Tag

Tag: list, create, or delete.

ParameterTypeDescription
actionstring
messagestring
namestring
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
signbooleanSign the tag. Defaults to the server GIT_AUTO_SIGN_TAGS setting.
signing_keystring
targetstring

git_worktree Git Worktree

Worktrees, two ways. Path-addressed (add, remove, lock, unlock, prune, repair) drives plain git worktree and needs nothing but git. Branch-addressed (flow_add, flow_remove, flow_list, flow_path) drives git flow worktree: it addresses worktrees by branch name, computes paths from the gitflow.worktreePath template, and tags provenance so cleanup can tell a git-flow-created worktree (removed) from a hand-made one (detached, work preserved). The flow_* actions require git-flow-next on PATH.

ParameterTypeDescription
actionstring
branchstring
detachedboolean
expirestring
forceboolean
lock_reasonstring
pathstring
pathsarray
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.

git_submodule Git Submodule

Submodule: add, list, update, sync, or set_branch.

ParameterTypeDescription
actionstring
branchstring
depthinteger
jobsinteger
pathstring
pathsarray
recursiveboolean
remoteboolean
repo_pathstringAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatstringOutput format for the response.
urlstring

git_docs Git Documentation

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.

ParameterTypeDescription
action *string
query *stringFor action="search": search terms (e.g. "undo last commit"). For action="man": git command name without "git-" prefix (e.g. "commit", "rebase", "merge").
response_formatstringOutput format for the response.

git_ping Git MCP Ping

Returns a simple response to verify the server is running.

ParameterTypeDescription
messagestring