Git

v2026.11.27
io.github.modelcontextprotocol/server-git Checked 2 hours ago Published 4 days ago

Read, search and manipulate Git repositories: status, diff, log, commit, branch and more

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

git_status

Shows the working tree status

ParameterTypeDescription
repo_path *string

git_diff_unstaged

Shows changes in the working directory that are not yet staged

ParameterTypeDescription
repo_path *string
context_linesinteger

git_diff_staged

Shows changes that are staged for commit

ParameterTypeDescription
repo_path *string
context_linesinteger

git_diff

Shows differences between branches or commits, or across a revision range (main..feature, main...feature)

ParameterTypeDescription
repo_path *string
target *string
context_linesinteger

git_commit

Records changes to the repository

ParameterTypeDescription
message *string
repo_path *string

git_add

Adds file contents to the staging area

ParameterTypeDescription
files *array
repo_path *string

git_reset

Unstages all staged changes

ParameterTypeDescription
repo_path *string

git_log

Shows the commit log, newest commit first. For the latest commits, pass only repo_path (and optionally max_count). start_timestamp and end_timestamp are optional filters for a date range: omit them unless a specific period is asked for, because a range that holds no commits returns none.

ParameterTypeDescription
repo_path *string
end_timestampOptional: only show commits at or before this time. Omit for no upper bound. Accepts: ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute date…
max_countintegerMaximum number of commits to show. Must be at least 1.
start_timestampOptional: only show commits at or after this time. Omit for no lower bound. Accepts: ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates…

git_create_branch

Creates a new branch from an optional base branch or commit

ParameterTypeDescription
branch_name *string
repo_path *string
base_branchBranch, tag or commit SHA to create the branch from. Defaults to the current branch, or to the current commit when HEAD is detached

git_checkout

Switches branches

ParameterTypeDescription
branch_name *string
repo_path *string

git_merge

Merges a branch into the current branch. Fast-forward only unless fast_forward_only is false; refuses a dirty working tree, and aborts a merge that conflicts, leaving the repository unchanged

ParameterTypeDescription
repo_path *string
source_branch *stringBranch, tag or commit to merge into the current branch
fast_forward_onlybooleanOnly fast-forward, failing if the branches have diverged. False allows a merge commit

git_show

Shows the contents of a commit, or of a file or directory given as <revision>:<path>

ParameterTypeDescription
repo_path *string
revision *string

git_branch

List Git branches

ParameterTypeDescription
branch_type *stringWhether to list local branches ('local'), remote branches ('remote') or all branches('all').
repo_path *stringThe path to the Git repository.
containsThe commit sha that branch should contain. Do not pass anything to this param if no commit sha is specified
not_containsThe commit sha that branch should NOT contain. Do not pass anything to this param if no commit sha is specified

git_remote

Lists the repository's remotes with their fetch and push URLs, like `git remote -v`. Credentials embedded in a URL's userinfo, query values or fragment are shown as <redacted>; path segments are shown as configured

ParameterTypeDescription
repo_path *stringThe path to the Git repository.