git-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GIT_DEFAULT_PATH | Yes | Default repository directory |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| git_addA | Stage files for commit. Add file contents to the staging area (index) to prepare for the next commit. |
| git_blameA | 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. |
| git_branchA | Manage branches: list all branches, show current branch, create a new branch, delete a branch, or rename a branch. |
| git_changelog_analyzeA | 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. |
| git_checkoutA | Switch branches or restore working tree files. Can checkout an existing branch, create a new branch, or restore specific files. |
| git_cherry_pickA | Cherry-pick commits from other branches. Apply specific commits to the current branch without merging entire branches. |
| git_cleanA | Remove untracked files from the working directory. Requires force flag for safety. Use dry-run to preview files that would be removed. |
| git_clear_working_dirA | 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. |
| git_cloneA | Clone a repository from a remote URL to a local path. Supports HTTP/HTTPS and SSH URLs, with optional shallow cloning. |
| git_commitA | 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:
Note: Do not use bash heredoc syntax. Literal escape sequences (\n, \t) in the message string are automatically normalized to their actual characters. |
| git_diffB | View differences between commits, branches, or working tree. Shows changes in unified diff format. |
| git_fetchA | Fetch updates from a remote repository. Downloads objects and refs without merging them. |
| git_initA | Initialize a new Git repository at the specified path. Creates a .git directory and sets up the initial branch. |
| git_logA | View commit history with optional filtering by author, date range, file path, or commit message pattern. |
| git_mergeB | Merge branches together. Integrates changes from another branch into the current branch with optional merge strategies. |
| git_pullA | Pull changes from a remote repository. Fetches and integrates changes into the current branch. |
| git_pushC | Push changes to a remote repository. Uploads local commits to the remote branch. |
| git_rebaseB | Rebase commits onto another branch. Reapplies commits on top of another base tip for a cleaner history. |
| git_reflogA | View the reference logs (reflog) to track when branch tips and other references were updated. Useful for recovering lost commits. |
| git_remoteA | Manage remote repositories: list remotes, add new remotes, remove remotes, rename remotes, or get/set remote URLs. |
| git_resetA | Reset current HEAD to specified state. Can be used to unstage files (soft), discard commits (mixed), or discard all changes (hard). |
| git_set_working_dirA | Set the session working directory for all git operations. This allows subsequent git commands to omit the path parameter and use this directory as the default. |
| git_showA | Show details of a git object (commit, tree, blob, or tag). Displays commit information and the diff of changes introduced. |
| git_stashA | Manage stashes: list stashes, save current changes (push), restore changes (pop/apply), or remove stashes (drop/clear). |
| git_statusA | Show the working tree status including staged, unstaged, and untracked files. |
| git_tagA | Manage tags: list all tags, create a new tag, or delete a tag. Tags are used to mark specific points in history (releases, milestones). |
| git_worktreeB | Manage multiple working trees: list worktrees, add new worktrees for parallel work, remove worktrees, or move worktrees to new locations. |
| git_wrapup_instructionsA | Provides the user's desired Git wrap-up workflow and instructions. Returns custom workflow steps (if configured) or default best practices for reviewing, documenting, and committing changes. Includes current repository status to guide next actions. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| git_wrapup | Generates a structured workflow prompt for wrapping up git sessions, including reviewing changes, updating documentation, and committing modifications. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Git Working Directory | Provides the current session working directory for git operations. This is the directory set via git_set_working_dir and used as the default for all git commands. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/git-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server