Skip to content

git-mcp provides grouped root tools with action-based subtools. Every tool accepts a repo_path parameter (the absolute path to the Git repository) unless noted otherwise. When GIT_REPO_PATH is configured server-side, repo_path is optional.

All tools accept a response_format parameter: "markdown" (default, human-readable) or "json" (machine-friendly structured data).

Tool Groups

  • Inspectgit_inspect: read-only status, history, diff, and blame operations.
  • Writegit_write: staging, commit, reset, revert, and undo workflows.
  • Branchesgit_branch: list/create/delete/rename/checkout and upstream management.
  • Remotegit_remote: remote management plus fetch/pull/push.
  • Advancedgit_advanced: stash, rebase, cherry-pick, bisect, tags, worktrees, submodules.
  • Contextgit_context with actions summary, search, get_config, set_config, aliases.
  • LFSgit_lfs: Git Large File Storage.
  • Git Flowgit_flow: canonical git-flow-next-style operations plus classic aliases.
  • Workflowgit_workflow: resumable multi-step workflow orchestration.
  • Docsgit_docs: Git documentation search.

Common Parameters

These parameters are shared across most tools:

ParameterTypeDescription
repo_pathstringAbsolute path to the Git repository. Required unless GIT_REPO_PATH is set.
response_format"markdown" | "json"Output format. Defaults to "markdown".

Quick Reference

Status

text
git_status    repo_path  [action=status|diff|diff_main] [mode] [from_ref] [to_ref] [filtered] [base_branch]

History

text
git_history   repo_path  [action=log|show|blame|reflog|lg|who] [limit] [offset] [author] [grep] [since] [until] [file_path] [ref]

Commits

text
git_commits   repo_path  [action=add|restore|commit|reset|revert|undo|nuke|wip|unstage|amend] [all] [paths] [message] [mode] [target] [confirm] [ref]

Branches

text
git_branches  repo_path  [action=list|create|delete|rename|checkout|set_upstream|recent] [name] [old_name] [new_name] [ref] [from_ref] [branch] [upstream] [count]

Remotes

text
git_remotes   repo_path  [action=list|manage|fetch|pull|push] [remote_action] [name] [url] [remote] [branch] [prune] [rebase] [set_upstream] [force_with_lease] [force] [no_verify] [tags]

Workspace

text
git_workspace repo_path [action=stash|stash_all|rebase|cherry_pick|bisect|tag|worktree|submodule] [stash_action] [rebase_action] [cherry_pick_action] [bisect_action] [tag_action] [worktree_action] [submodule_action]
              [message] [index] [include_untracked] [ref] [onto] [good_ref] [bad_ref] [command] [name] [target] [sign] [signing_key] [path] [branch] [url] [recursive]

Context

text
git_context   repo_path  [action=summary|search|get_config|set_config|aliases] [query] [limit] [key] [value]

LFS tool

text
git_lfs  repo_path  action  [patterns] [remote] [include] [exclude] [everything]

Git Flow tool

text
git_flow  repo_path  [action] [operation] [config_action] [topic_action] [control_action] [topic] [name] [new_name] [pattern] [match_mode] [branch_kind] [parent] [prefix] [start_point] [base_ref] [preset] [scope] [config_file] [force] [no_create_branches] [main_branch] [develop_branch] [staging_branch] [production_branch] [remote] [upstream_strategy] [downstream_strategy] [strategy] [fetch] [ff] [keep_branch] [no_backmerge] [rebase_before_finish] [preserve_merges] [publish] [force_delete] [auto_update] [tag] [tag_prefix] [tag_message] [delete_branch]

Workflow tool

text
git_workflow  repo_path  [action=start|status|continue|abort|list] [workflow=snapshot|replay|branch_surgery|publish]
              [base_branch] [log_count] [mode=cherry-pick|am] [target_branch] [source_commits] [patch_files]
              [three_way] [backup_branch] [reset_to] [confirm_hard_reset] [publish] [remote] [force_with_lease]
              [set_upstream] [fetch_first] [rebase_onto]

Docs tool (no repo_path)

text
git_docs  action  query

Released under the MIT License.