# io.github.cyanheads/git-mcp-server (npm · @cyanheads/git-mcp-server)

Comprehensive Git MCP server enabling native git tools including clone, commit, worktree, & more.

- Trust score: 71/100 (medium)
- Change this week: −10
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-04

## Components

- npm · `@cyanheads/git-mcp-server`: 71/100 (this document), [markdown](https://verifymcp.io/servers/cyanheads-git-mcp-server/cyanheads-git-mcp-server.md), [page](https://verifymcp.io/servers/cyanheads-git-mcp-server/cyanheads-git-mcp-server)

## Channel facts

- Registry: `npm`
- Package: `@cyanheads/git-mcp-server`
- Version: `2.15.1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-04.

- **Supply Chain Security**: 88/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - No install/post-install scripts declared.
  - 34 of 34 dependencies flagged as unhealthy (34 deprecated).
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (Apache-2.0).
  - Actively maintained (last published 89 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 79/100
  - 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 4712 tokens (~162/item across 29 items; 28 tools + 1 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 30/100
  - Stability observed for 9 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
  - Structured output schemas are declared (100% of tools); any adoption earns full credit.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add cyanheads-git-mcp-server -- npx -y @cyanheads/git-mcp-server
```

### Codex

```bash
codex mcp add cyanheads-git-mcp-server -- npx -y @cyanheads/git-mcp-server
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "cyanheads-git-mcp-server": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@cyanheads/git-mcp-server"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add cyanheads-git-mcp-server --command npx --arg -y --arg @cyanheads/git-mcp-server
```

### Hermes

```yaml
mcp_servers:
  cyanheads-git-mcp-server:
    command: "npx"
    args: ["-y", "@cyanheads/git-mcp-server"]
```

### Other

```json
{
  "mcpServers": {
    "cyanheads-git-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/git-mcp-server"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-04 (score 71, +1)

No change was recorded against any check on this day. Stability & Change Management went from 27 to 30. That category is still filling its 30-day observation window: 8 days of observed history at the previous scan, 9 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-03 (score 70, +47)

- [security regression] Provenance: unverified → fail
- [security improvement] Known CVEs: unverified → pass
- [security improvement] Install scripts: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Stability: unverified → 0.27
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Schema quality: unverified → 100
- [functional improvement] License: unverified → pass
- [functional improvement] Tool coverage: unverified → 100
- [functional] Dependency health: partial → 0.00
- [functional] Licence: Apache-2.0

### 2026-08-02 (score 23, −31)

- [security regression] Provenance: fail → unverified
- [security regression] Known CVEs: pass → unverified
- [security regression] Install scripts: pass → unverified
- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet.
- [functional regression] License: pass → unverified
- [functional regression] Capabilities: pass → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional regression] Schema quality: 100 → unverified
- [functional regression] Maintenance: pass → unverified
- [functional] Dependency health: 0.80 → partial
- [functional] Licence: Apache-2.0

### 2026-07-31 (score 54, −9)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 63, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-28 (score 81, +30)

- [security regression] Provenance: unverified → fail
- [security improvement] Known CVEs: unverified → pass
- [security improvement] Install scripts: unverified → pass
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Dependency health: unverified → 0.80
- [functional improvement] License: unverified → pass
- [functional improvement] Schema quality: unverified → excellent
- [functional] Licence: Apache-2.0

### 2026-07-27 (score 51)

First indexed and scored.

## MCP tools (28)

### `git_add` (~139 tokens)

Git Add

Stage files for commit. Add file contents to the staging area (index) to prepare for the next commit.

Input parameters:

- `all` (boolean): Include all items (varies by operation).
- `force` (boolean): Allow adding otherwise ignored files.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `paths` (array): Array of file or directory paths to stage (relative to repository root). Use ["."] to stage all changes. Can be omitted when all or update is true.
- `update` (boolean): Stage only modified and deleted files (skip untracked files).

Output parameters:

- `stagedFiles` (array): Files that were successfully staged.
- `status` (object): Repository status after staging files.
- `success` (boolean): Indicates if the operation was successful.
- `totalFiles` (integer): Total number of files staged.

### `git_blame` (~127 tokens)

Git Blame

Show line-by-line authorship information for a file, displaying who last modified each line and when. For large files, use startLine/endLine to limit output.

Input parameters:

- `endLine` (integer): End line number (1-indexed).
- `filePath` (string, required): Path to the file to blame (relative to repository root).
- `ignoreWhitespace` (boolean): Ignore whitespace changes.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `startLine` (integer): Start line number (1-indexed).

Output parameters:

- `filePath` (string): The file that was blamed.
- `lines` (array): Array of blame information for each line.
- `success` (boolean): Indicates if the operation was successful.
- `totalLines` (integer): Total number of lines in the output.

### `git_branch` (~246 tokens)

Git Branch

Manage branches: list all branches, show current branch, create a new branch, delete a branch, or rename a branch.

Input parameters:

- `all` (boolean): For list mode: show both local and remote branches.
- `branchName` (string): Branch name for create/delete/rename operations.
- `force` (boolean): Force the operation, bypassing safety checks.
- `limit` (integer): For list mode: cap the number of branches returned (applied at the git command). Use on repos with many branches.
- `merged`: For list mode: show only branches merged into HEAD (true) or specified commit (string).
- `mode` (string): The branch operation to perform.
- `newBranchName` (string): New branch name for rename operation.
- `noMerged`: For list mode: show only branches not merged into HEAD (true) or specified commit (string).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `remote` (boolean): For list mode: show only remote branches.
- `startPoint` (string): Starting point (commit/branch) for new branch creation.

Output parameters:

- `branches` (array): List of branches (for list mode).
- `currentBranch` (string): Name of current branch.
- `message` (string): Success message for create/delete/rename modes.
- `mode` (string)
- `success` (boolean): Indicates if the operation was successful.

### `git_changelog_analyze` (~235 tokens)

Git Changelog Analyze

Gather git history context (commits, tags) and structured review instructions to support LLM-driven changelog analysis. Changelog file should be read separately; this tool provides the supporting git data and analysis framework. Pass one or more review types to control what kind of analysis to perform.

Input parameters:

- `branch` (string): Branch to analyze (defaults to current branch).
- `maxCommits` (integer): Maximum recent commits to fetch for cross-referencing (1-1000).
- `maxTags` (integer): Maximum recent tags to fetch for release context (1-1000). Applied at the git command so large tag catalogs do not bloat the response.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `reviewTypes` (array, required): Types of changelog review to perform. At least one required. Options: security, features, storyline, gaps, breaking_changes, quality.
- `sinceTag` (string): Only include git history since this tag (e.g., "v1.2.0"). Narrows the analysis window.

Output parameters:

- `gitContext` (object): Git history context for changelog cross-referencing.
- `reviewInstructions` (string): Analysis instructions for each requested review type. Guides the LLM on what to look for in the changelog.
- `reviewTypes` (array): Review types that were requested.
- `success` (boolean): Indicates if the operation was successful.

### `git_checkout` (~140 tokens)

Git Checkout

Switch branches or restore working tree files. Can checkout an existing branch, create a new branch, or restore specific files.

Input parameters:

- `createBranch` (boolean): Create a new branch with the specified name.
- `force` (boolean): Force the operation, bypassing safety checks.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `paths` (array): Specific file paths to checkout/restore (relative to repository root).
- `target` (required): Branch name, commit hash, or tag to checkout.
- `track` (boolean): Set up tracking relationship with remote branch when creating new branch.

Output parameters:

- `branchCreated` (boolean): True if a new branch was created.
- `filesModified` (array): Files that were modified during checkout.
- `success` (boolean): Indicates if the operation was successful.
- `target` (string): Checked out branch or commit.

### `git_cherry_pick` (~171 tokens)

Git Cherry-Pick

Cherry-pick commits from other branches. Apply specific commits to the current branch without merging entire branches.

Input parameters:

- `abort` (boolean): Abort cherry-pick operation.
- `commits` (array, required): Commit hashes to cherry-pick.
- `continueOperation` (boolean): Continue cherry-pick after resolving conflicts.
- `mainline` (integer): For merge commits, specify which parent to follow (1 for first parent, 2 for second, etc.).
- `noCommit` (boolean): Don't create commit (stage changes only).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `signoff` (boolean): Add Signed-off-by line to the commit message.
- `strategy` (string): Merge strategy to use for cherry-pick.

Output parameters:

- `conflictedFiles` (array): Files with conflicts that need resolution.
- `conflicts` (boolean): Whether operation had conflicts.
- `message` (string): Human-readable next-step guidance, especially for conflicts.
- `pickedCommits` (array): Commits that were successfully cherry-picked.
- `success` (boolean): Indicates if the operation was successful.

### `git_clean` (~115 tokens)

Git Clean

Remove untracked files from the working directory. Requires force flag for safety. Use dry-run to preview files that would be removed.

Input parameters:

- `directories` (boolean): Remove untracked directories in addition to files.
- `dryRun` (boolean): Preview the operation without executing it.
- `force` (boolean): Force the operation, bypassing safety checks.
- `ignored` (boolean): Remove ignored files as well.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.

Output parameters:

- `directoriesRemoved` (array): List of directories that were removed.
- `dryRun` (boolean): Whether this was a dry-run (preview only).
- `filesRemoved` (array): List of files that were removed.
- `success` (boolean): Indicates if the operation was successful.

### `git_clear_working_dir` (~77 tokens)

Git Clear Working Directory

Clear the session working directory setting. This resets the context without restarting the server. Subsequent git operations will require an explicit path parameter unless git_set_working_dir is called again.

Input parameters:

- `confirm` (string, required): Explicit confirmation required to clear working directory. Accepted values: 'Y', 'y', 'Yes', or 'yes'.

Output parameters:

- `message` (string): Confirmation message.
- `previousPath` (string): The working directory that was cleared (if one was set).
- `success` (boolean): Indicates if the operation was successful.

### `git_clone` (~171 tokens)

Git Clone

Clone a repository from a remote URL or local path. Accepts HTTP(S), SSH, git://, file://, and bare filesystem paths, with optional shallow cloning.

Input parameters:

- `bare` (boolean): Create a bare repository (no working directory).
- `branch` (string): Specific branch to clone (defaults to remote HEAD).
- `depth` (integer): Create a shallow clone with history truncated to N commits.
- `mirror` (boolean): Create a mirror clone (implies bare).
- `path` (string, required): Destination path where the repository should be cloned.
- `url` (string, required): Source to clone from: HTTP(S) URL, SSH URL (ssh://… or git@host:path), git:// URL, file:// URL, or a bare filesystem path (e.g. /tmp/repo.git).

Output parameters:

- `branch` (string): The branch that was checked out.
- `commitHash` (string): Current HEAD commit hash.
- `path` (string): Local path where repository was cloned.
- `remoteUrl` (string): The remote URL or path that was cloned.
- `success` (boolean): Indicates if the operation was successful.

### `git_commit` (~263 tokens)

Git Commit

Create a new commit with staged changes in the repository. Records a snapshot of the staging area with a commit message.

\**Commit Message Format:**
Pass commit messages as JSON string parameters. Multi-line messages are supported using standard JSON string escaping.

\**Examples:**
\- Single line: { "message": "feat: add user authentication" }
\- Multi-line: { "message": "feat: add user authentication\n\nImplemented OAuth2 flow with JWT tokens.\nAdded tests for login and logout." }

Note: Do not use bash heredoc syntax. Literal escape sequences (\n, \t) in the message string are automatically normalized to their actual characters.

Input parameters:

- `allowEmpty` (boolean): Allow creating a commit with no changes.
- `amend` (boolean): Amend the previous commit instead of creating a new one. Use with caution.
- `author` (object): Override commit author (defaults to git config).
- `filesToStage` (array): File paths to stage before committing (atomic stage+commit operation).
- `message` (string, required): Commit message.
- `noVerify` (boolean): Bypass pre-commit and commit-msg hooks.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.

Output parameters:

- `author` (string): Author of the commit.
- `commitHash` (string): SHA-1 hash of the created commit.
- `committedFiles` (array): List of files that were committed.
- `deletions` (integer): Number of line deletions.
- `filesChanged` (integer): Number of files changed in this commit.
- `insertions` (integer): Number of line insertions.
- `message` (string): The commit message.
- `signed` (boolean): Whether the commit was signed. False when GIT_SIGN_COMMITS=false or when signing was attempted and fell back to unsigned on failure.
- `signingWarning` (string): Populated only when signing was requested but failed, and the commit was created unsigned as a fallback.
- `status` (object): Repository status after the commit.
- `success` (boolean): Indicates if the operation was successful.
- `timestamp` (integer): Unix timestamp when the commit was created.

### `git_diff` (~272 tokens)

Git Diff

View differences between commits, branches, or working tree. Shows changes in unified diff format.

Input parameters:

- `autoExclude` (boolean): Automatically exclude lock files and other generated files (e.g., package-lock.json, yarn.lock, bun.lock, poetry.lock, go.sum) from diff output to reduce context bloat. Set to false if you need to in…
- `contextLines` (integer): Number of context lines to show around changes.
- `includeUntracked` (boolean): Include untracked files in the diff. Useful for reviewing all upcoming changes.
- `nameOnly` (boolean): Show only names of changed files, not the diff content.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `paths` (array): Limit diff to specific file paths (relative to repository root).
- `source` (string): Source commit/branch to compare from. If target is specified but not source, compares target against working tree.
- `staged` (boolean): Show diff of staged changes instead of unstaged.
- `stat` (boolean): Show diffstat (summary of changes) instead of full diff content.
- `target` (string): Target commit/branch to compare against. If not specified, shows unstaged changes in working tree.

Output parameters:

- `deletions` (integer): Total number of line deletions.
- `diff` (string): The diff output in unified diff format.
- `excludedFiles` (array): Files that were automatically excluded from the diff (e.g., lock files). Call again with autoExclude=false to include them.
- `filesChanged` (integer): Number of files with differences.
- `insertions` (integer): Total number of line insertions.
- `success` (boolean): Indicates if the operation was successful.

### `git_fetch` (~110 tokens)

Git Fetch

Fetch updates from a remote repository. Downloads objects and refs without merging them.

Input parameters:

- `depth` (integer): Create a shallow clone with history truncated to N commits.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `prune` (boolean): Prune remote-tracking references that no longer exist on remote.
- `remote` (string): Remote name (default: origin).
- `tags` (boolean): Fetch all tags from the remote.

Output parameters:

- `fetchedRefs` (array): References that were fetched from the remote.
- `prunedRefs` (array): References that were pruned (deleted locally).
- `remote` (string): Remote name that was fetched from.
- `success` (boolean): Indicates if the operation was successful.

### `git_init` (~87 tokens)

Git Init

Initialize a new Git repository at the specified path. Creates a .git directory and sets up the initial branch.

Input parameters:

- `bare` (boolean): Create a bare repository (no working directory).
- `initialBranch` (string): Name of the initial branch (default: main).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.

Output parameters:

- `initialBranch` (string): Name of the initial branch.
- `isBare` (boolean): Whether this is a bare repository.
- `path` (string): Path where repository was initialized.
- `success` (boolean): Indicates if the operation was successful.

### `git_log` (~270 tokens)

Git Log

View commit history with optional filtering by author, date range, file path, or commit message pattern.

Input parameters:

- `author` (string): Filter commits by author name or email pattern.
- `branch` (string): Show commits from a specific branch or ref (defaults to current branch).
- `filePath` (string): Show commits that affected a specific file path.
- `grep` (string): Filter commits by message pattern (regex supported).
- `maxCount` (integer): Maximum number of items to return (1-1000).
- `oneline` (boolean): Abbreviated output: return only hash, shortHash, and subject per commit. Significantly reduces response size.
- `patch` (boolean): Include the full diff patch for each commit.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `showSignature` (boolean): Show GPG signature verification information for each commit.
- `since` (string): Show commits more recent than a specific date (ISO 8601 format).
- `skip` (integer): Number of items to skip for pagination.
- `stat` (boolean): Include file change statistics for each commit.
- `until` (string): Show commits older than a specific date (ISO 8601 format).

Output parameters:

- `commits` (array): Array of commit objects.
- `note` (string): Set when filters returned zero commits. Echoes the criteria and suggests broadening so callers can self-correct without inspecting the request.
- `success` (boolean): Indicates if the operation was successful.
- `totalCount` (integer): Total number of commits returned (may be limited by maxCount).

### `git_merge` (~148 tokens)

Git Merge

Merge branches together. Integrates changes from another branch into the current branch with optional merge strategies.

Input parameters:

- `abort` (boolean): Abort an in-progress merge that has conflicts.
- `branch` (string, required): Branch to merge into current branch.
- `message` (string): Custom merge commit message.
- `noFastForward` (boolean): Prevent fast-forward merge (create merge commit).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `squash` (boolean): Squash all commits from the branch into a single commit.
- `strategy` (string): Merge strategy to use (ort, recursive, octopus, ours, subtree).

Output parameters:

- `conflictedFiles` (array): Files with conflicts that need resolution.
- `conflicts` (boolean): Whether merge had conflicts.
- `fastForward` (boolean): Whether merge was fast-forward.
- `mergedFiles` (array): Files that were merged.
- `message` (string): Merge commit message.
- `strategy` (string): Merge strategy used.
- `success` (boolean): Indicates if the operation was successful.

### `git_pull` (~112 tokens)

Git Pull

Pull changes from a remote repository. Fetches and integrates changes into the current branch.

Input parameters:

- `branch` (string): Branch name (default: current branch).
- `fastForwardOnly` (boolean): Fail if can't fast-forward (no merge commit).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `rebase` (boolean): Use rebase instead of merge when integrating changes.
- `remote` (string): Remote name (default: origin).

Output parameters:

- `branch` (string): Branch that was pulled.
- `conflictedFiles` (array): Files with conflicts that need resolution (empty if conflicts is false).
- `conflicts` (boolean): Whether pull had conflicts.
- `filesChanged` (array): Files that were changed.
- `remote` (string): Remote name that was pulled from.
- `strategy` (string): Integration strategy used.
- `success` (boolean): Indicates if the operation was successful.

### `git_push` (~216 tokens)

Git Push

Push changes to a remote repository. Uploads local commits to the remote branch.

Input parameters:

- `branch` (string): Branch name (default: current branch).
- `confirmed` (boolean): Explicit confirmation required for force push or branch deletion on protected branches (main, master, production, etc.).
- `delete` (boolean): Delete the specified remote branch.
- `dryRun` (boolean): Preview the operation without executing it.
- `force` (boolean): Force push (overwrites remote history).
- `forceWithLease` (boolean): Safer force push - only succeeds if remote branch is at expected state.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `remote` (string): Remote name (default: origin).
- `remoteBranch` (string): Remote branch name to push to (if different from local branch name).
- `setUpstream` (boolean): Set upstream tracking relationship for the branch.
- `tags` (boolean): Push all tags to the remote.

Output parameters:

- `branch` (string): Branch that was pushed.
- `pushedRefs` (array): References that were successfully pushed.
- `rejectedRefs` (array): References that were rejected by the remote.
- `remote` (string): Remote name that was pushed to.
- `success` (boolean): Indicates if the operation was successful.
- `upstreamSet` (boolean): Whether upstream tracking was set for the branch.

### `git_rebase` (~158 tokens)

Git Rebase

Rebase commits onto another branch. Reapplies commits on top of another base tip for a cleaner history.

Input parameters:

- `branch` (string): Branch to rebase (default: current branch).
- `interactive` (boolean): Interactive rebase (not supported in all providers).
- `mode` (string): Rebase operation mode: 'start', 'continue', 'abort', or 'skip'.
- `onto` (string): Rebase onto different commit than upstream.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `preserve` (boolean): Preserve merge commits during rebase.
- `upstream` (string): Upstream branch to rebase onto (required for start mode).

Output parameters:

- `conflictedFiles` (array): Files with conflicts that need resolution.
- `conflicts` (boolean): Whether rebase had conflicts.
- `currentCommit` (string): Current commit hash if rebase stopped due to conflict.
- `message` (string): Human-readable next-step guidance, especially for conflicts.
- `rebasedCommits` (integer): Number of commits that were rebased.
- `success` (boolean): Indicates if the operation was successful.

### `git_reflog` (~97 tokens)

Git Reflog

View the reference logs (reflog) to track when branch tips and other references were updated. Useful for recovering lost commits.

Input parameters:

- `maxCount` (integer): Maximum number of items to return (1-1000).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `ref` (string): Reference whose reflog to show. Defaults to HEAD.

Output parameters:

- `entries` (array): Array of reflog entries in reverse chronological order.
- `ref` (string): The reference that was queried.
- `success` (boolean): Indicates if the operation was successful.
- `totalEntries` (integer): Total number of reflog entries.

### `git_remote` (~159 tokens)

Git Remote

Manage remote repositories: list remotes, add new remotes, remove remotes, rename remotes, or get/set remote URLs.

Input parameters:

- `mode` (string): The remote operation to perform.
- `name` (string): Remote name for add/remove/rename/get-url/set-url operations.
- `newName` (string): New remote name for rename operation.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `push` (boolean): Set push URL separately (for set-url operation).
- `url` (string): Remote URL for add/set-url operations. Accepts HTTP(S), SSH (ssh://… or git@host:path), git://, or file:// URLs.

Output parameters:

- `added` (object): Added remote (for add mode).
- `mode` (string): Operation mode that was performed.
- `remotes` (array): List of remotes (for list mode).
- `removed` (string): Removed remote name (for remove mode).
- `renamed` (object): Rename information (for rename mode).
- `success` (boolean): Indicates if the operation was successful.
- `url` (string): Remote URL (for get-url mode).

### `git_reset` (~166 tokens)

Git Reset

Reset current HEAD to specified state. Can be used to unstage files (soft), discard commits (mixed), or discard all changes (hard).

Input parameters:

- `confirmed` (boolean): Explicit confirmation required for hard, merge, and keep reset modes on protected branches (main, master, production, etc.).
- `mode` (string): Reset mode: soft (keep changes staged), mixed (unstage changes), hard (discard all changes), merge (reset and merge), keep (reset but keep local changes).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `paths` (array): Specific file paths to reset (leaves HEAD unchanged).
- `target` (string): Target commit to reset to. Defaults to HEAD.

Output parameters:

- `filesReset` (array): Files affected by the reset. For path-only resets, the listed paths. For commit-move resets, files that differ between the old and new HEAD. For --hard with no HEAD move, files whose pending working-…
- `mode` (string): Reset mode that was used.
- `previousCommit` (string): Commit hash HEAD pointed to before the reset (omitted if HEAD did not move).
- `success` (boolean): Indicates if the operation was successful.
- `target` (string): Commit hash HEAD points to after the reset.

### `git_set_working_dir` (~109 tokens)

Git Set Working Directory

Set the session working directory for all git operations so subsequent calls can omit the path parameter. Always returns a repository snapshot (status, recent commits, recent tags, remotes) to orient the caller.

Input parameters:

- `initializeIfNotPresent` (boolean): If not a Git repository, initialize it with 'git init'.
- `path` (string, required): Absolute path to the git repository to use as the working directory.
- `validateGitRepo` (boolean): Validate that the path is a Git repository.

Output parameters:

- `enrichmentWarnings` (array): Actionable notes when snapshot gathering was skipped or partially failed.
- `message` (string): Confirmation message.
- `path` (string): The working directory that was set.
- `repository` (object): Best-effort repository snapshot. Omitted when the path is not a git repository (see enrichmentWarnings).
- `success` (boolean): Indicates if the operation was successful.

### `git_show` (~147 tokens)

Git Show

Show details of a git object (commit, tree, blob, or tag). Displays commit information and the diff of changes introduced.

Input parameters:

- `filePath` (string): View specific file at a given commit reference. When provided, shows the file content from the specified object.
- `format` (string): Output format for the git object. Use "raw" for unprocessed git output.
- `object` (string, required): Git object to show (commit hash, branch, tag, tree, or blob).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `stat` (boolean): Show diffstat instead of full diff.

Output parameters:

- `content` (string): Formatted output showing the object details.
- `metadata` (object): Additional metadata about the object.
- `object` (string): Object identifier.
- `success` (boolean): Indicates if the operation was successful.
- `type` (string): Type of git object shown.

### `git_stash` (~184 tokens)

Git Stash

Manage stashes: list stashes, save current changes (push), restore changes (pop/apply), or remove stashes (drop/clear).

Input parameters:

- `includeUntracked` (boolean): Include untracked files in the stash (for push operation).
- `keepIndex` (boolean): Don't revert staged changes (for push operation).
- `limit` (integer): For list mode: cap the number of stash entries returned (applied at the git command).
- `message` (string): Stash message description (for push operation).
- `mode` (string): The stash operation to perform. Defaults to push (save current changes).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `stashRef` (string): Stash reference like stash@{0} (for pop/apply/drop operations).

Output parameters:

- `applied` (string): Applied stash reference (for pop/apply mode).
- `conflicts` (boolean): Whether operation had conflicts.
- `created` (string): Created stash reference (for push mode).
- `dropped` (string): Dropped stash reference (for drop mode).
- `mode` (string): Operation mode that was performed.
- `stashes` (array): List of stashes (for list mode).
- `success` (boolean): Indicates if the operation was successful.

### `git_status` (~65 tokens)

Git Status

Show the working tree status including staged, unstaged, and untracked files.

Input parameters:

- `includeUntracked` (boolean): Include untracked files in the output.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.

Output parameters:

- `ahead` (integer): Commits ahead of upstream (if tracking).
- `behind` (integer): Commits behind upstream (if tracking).
- `conflictedFiles` (array): Files with merge conflicts that need resolution.
- `currentBranch`: Current branch name.
- `isClean` (boolean): True if working directory is clean (no staged, unstaged, or untracked changes). When includeUntracked is false, untracked files are excluded from this check.
- `stagedChanges` (object): Changes that have been staged for the next commit.
- `success` (boolean): Indicates if the operation was successful.
- `unstagedChanges` (object): Changes in the working directory that have not been staged.
- `untrackedFiles` (array): Files in the working directory not tracked by git.
- `upstream` (string): Upstream ref the current branch is tracking (if any).

### `git_tag` (~277 tokens)

Git Tag

Manage tags: list all tags, create a new tag, delete a tag, or verify a signed tag. Tags are used to mark specific points in history (releases, milestones). Verify runs `git tag -v` and returns a structured result distinguishing unsigned tags, missing trust configuration, bad signatures, and valid signatures.

Input parameters:

- `annotated` (boolean): Create an annotated tag with a default "Tag <name>" message. Only effective when no message is provided and signing is disabled — otherwise the tag is always annotated.
- `commit` (string): Commit to tag (default: HEAD for create operation).
- `force` (boolean): Overwrite an existing tag (create mode only; has no effect on list or delete).
- `limit` (integer): For list mode: cap the number of tags returned (applied at the git command via `--count=N`). Use on repos with many tags.
- `message` (string): Tag message. Providing a message always produces an annotated tag (git does not support messages on lightweight tags). For release tags, summarize notable changes.
- `mode` (string): The tag operation to perform.
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `tagName` (string): Tag name for create/delete/verify operations.

Output parameters:

- `created` (string): Created tag name (for create mode).
- `deleted` (string): Deleted tag name (for delete mode).
- `mode` (string): Operation mode that was performed.
- `rawOutput` (string): Raw stderr from `git tag -v` for callers that need the full verification output (verify mode only).
- `signatureType` (string): Signature algorithm family when detectable from `git tag -v` output (verify mode). Absent for unsigned tags or unparseable output.
- `signed` (boolean): Whether the created tag was signed. Only populated for create mode. False when GIT_SIGN_COMMITS=false or when signing failed and fell back to unsigned.
- `signerIdentity` (string): Signer identity as emitted by git — e.g., `Name <email>` for GPG or the SSH principal. Verify mode only.
- `signerKey` (string): Key material emitted by git — GPG fingerprint/key ID or SSH key fingerprint (`SHA256:…`). Verify mode only; absent when git did not surface it.
- `signingWarning` (string): Populated only when signing was requested but failed, and the tag was created unsigned as a fallback.
- `success` (boolean): Indicates if the operation was successful.
- `tags` (array): List of tags (for list mode).
- `verified` (boolean): Whether the signature validated (for verify mode). `false` for unsigned tags, missing trust config, bad signatures, or unparseable output — inspect `warning` to distinguish.
- `verifiedTag` (string): Verified tag name (for verify mode). Echoes the input so callers can correlate results in batched flows.
- `warning` (string): Populated on verify failure with a human-readable reason distinguishing unsigned tags, missing trust configuration, bad signatures, and unparseable output.

### `git_worktree` (~257 tokens)

Git Worktree

Manage multiple working trees: list worktrees, add new worktrees for parallel work, remove worktrees, or move worktrees to new locations.

Input parameters:

- `branch` (string): For add operation: create a NEW branch with this name in the new worktree. Fails if the branch already exists — use `commitish` to check out an existing branch instead.
- `commitish` (string): For add operation: check out this existing branch/commit/tag in the new worktree (no new branch is created).
- `detach` (boolean): Create worktree with detached HEAD (for add operation).
- `dryRun` (boolean): Preview the operation without executing it (for prune operation).
- `force` (boolean): Force operation (for remove operation with uncommitted changes).
- `mode` (string): The worktree operation to perform.
- `newPath` (string): New path for the worktree (for move operation).
- `path` (string): Path to the Git repository. Defaults to session working directory set via git_set_working_dir.
- `verbose` (boolean): Provide detailed output for worktree operations.
- `worktreePath` (string): Path for the new worktree (for add/move operations).

Output parameters:

- `added` (string): Added worktree path (for add mode).
- `mode` (string): Operation mode that was performed.
- `moved` (object): Move operation info (for move mode).
- `pruned` (array): Pruned worktree paths (for prune mode).
- `removed` (string): Removed worktree path (for remove mode).
- `success` (boolean): Indicates if the operation was successful.
- `worktrees` (array): List of worktrees (for list mode).

### `git_wrapup_instructions` (~157 tokens)

Git Wrap-up Instructions

Returns a Git wrap-up protocol: an acceptance-criteria checklist the agent must satisfy before the session is considered shipped. Uses the operator's custom instructions if configured, otherwise emits a generic goals-strict/mechanism-generic default. Enriches the response with a repository snapshot (status, recent commits, recent tags) so the agent has immediate orientation for the commit and release steps.

Input parameters:

- `acknowledgement` (string, required): Acknowledgement to initiate the wrap-up workflow.
- `createTag` (boolean): Controls whether the tag criterion appears in the emitted protocol. Omit or set `true` to include the tag step. Set `false` to omit it entirely — e.g., when tagging is deferred to a separate release…

Output parameters:

- `enrichmentWarnings` (array): Actionable notes when snapshot gathering was skipped or partially failed.
- `instructions` (string): The wrap-up protocol to satisfy before the session ships.
- `repository` (object): Best-effort repository snapshot. Omitted when no working directory is set or when the path is not a git repository.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/cyanheads-git-mcp-server/cyanheads-git-mcp-server#diagnostics

## Score history

- 2026-08-04: 71
- 2026-08-03: 70
- 2026-08-02: 23
- 2026-08-01: 54
- 2026-07-31: 54
- 2026-07-30: 63
- 2026-07-29: 81
- 2026-07-28: 81
- 2026-07-27: 51

## Links

- npm package: https://www.npmjs.com/package/@cyanheads/git-mcp-server
- Socket report: https://socket.dev/npm/package/@cyanheads/git-mcp-server
- Repository: https://github.com/cyanheads/git-mcp-server
- Changelog RSS feed: https://verifymcp.io/servers/cyanheads-git-mcp-server/cyanheads-git-mcp-server/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/cyanheads-git-mcp-server/cyanheads-git-mcp-server/changelog.json
- HTML version of this page: https://verifymcp.io/servers/cyanheads-git-mcp-server/cyanheads-git-mcp-server
