
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A Model Context Protocol server that provides tools and prompts for reading, searching, and manipulating Git repositories via large language models.
mcp-server-git: an MCP server for Git repository interaction is cataloged as an MCP server attributed to modelcontextprotocol. A Model Context Protocol server that provides tools and prompts for reading, searching, and manipulating Git repositories via large language models. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for mcp-server-git: an MCP server for Git repository interaction are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It speaks both the 2026-07-28 and 2025-11-25 eras over stdio, with tools behaving the same in both.
It is the only confinement the server offers; a tool call's repo_path must be inside that repository.
It overrides configuration so no hook runs and external diff and textconv settings are ignored.
src/git/README.md · e1dc4b18dbb9 · Fetched 2026-11-13 09:43:31 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.
Source: https://github.com/modelcontextprotocol/servers/tree/main/src/git
Requires MCP Python SDK 2.x (mcp>=2.3,<3). The server is built on the SDK's high-level MCPServer: each tool is a typed Python function, and the SDK derives its input schema from the signature.
Please note that mcp-server-git is currently in early development. The functionality and available tools are subject to change and expansion as we continue to develop and improve the server.
git_status
repo_path (string): Path to Git repositorygit_diff_unstaged
repo_path (string): Path to Git repositorycontext_lines (number, optional): Number of context lines to show (default: 3)git_diff_staged
repo_path (string): Path to Git repositorycontext_lines (number, optional): Number of context lines to show (default: 3)git_diff
repo_path (string): Path to Git repositorytarget (string): Target branch or commit to compare with, or a revision range: a..b (from a to b) or a...b (from the merge base of a and b to b). An omitted endpoint means HEAD; each endpoint must resolve and cannot start with -context_lines (number, optional): Number of context lines to show (default: 3)git_commit
repo_path (string): Path to Git repositorymessage (string): Commit messagegit commit without --allow-empty), except while a merge is in progress (MERGE_HEAD present), where git also allows an empty commit. While a merge is in progress the commit concludes it: its parents are HEAD and every MERGE_HEAD commit, and the merge state is clearedgit_add
repo_path (string): Path to Git repositoryfiles (string[]): Non-empty array of file paths to stage; ["."] stages everythinggit_reset
repo_path (string): Path to Git repositorygit_log
repo_path (string): Path to Git repositorymax_count (number, optional): Maximum number of commits to show, at least 1 (default: 10)start_timestamp (string, optional): Start timestamp for filtering commits. Accepts ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')end_timestamp (string, optional): End timestamp for filtering commits. Accepts ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')git_create_branch
repo_path (string): Path to Git repositorybranch_name (string): Name of the new branchbase_branch (string, optional): Branch, tag or commit SHA to create from (defaults to the current branch, or to the current commit when HEAD is detached)git_checkout
repo_path (string): Path to Git repositorybranch_name (string): Name of branch to checkoutHEAD is now detached at <short sha> when branch_name is not a branch (a sha, tag or other revision)git_mergerepo_path (string): Path to Git repositorysource_branch (string): Branch, tag or commit to merge into the current branch (check out the branch to merge into first with git_checkout)fast_forward_only (boolean, optional): Only fast-forward, failing if the branches have diverged (default true). false lets Git create a merge commit when they haveFast-forwarded, Merged ... with merge commit <short sha>, or Already up to dategit merge --abort) and the error names the conflicting files, so the repository is left as it wasgit_showrepo_path (string): Path to Git repositoryrevision (string): The revision (commit hash, branch name, tag) or object spec (HEAD:path/to/file) to showgit_branchrepo_path (string): Path to the Git repository.branch_type (string): Whether to list local branches ('local'), remote branches ('remote') or all branches('all').contains (string, optional): The commit sha that branch should contain. Do not pass anything to this param if no commit sha is specifiednot_contains (string, optional): The commit sha that branch should NOT contain. Do not pass anything to this param if no commit sha is specifiedgit_remotegit remote -vrepo_path (string): Path to the Git repository.<name>\t<url> (fetch) or (push) (a partial clone's fetch line ends with its filter, such as [blob:none]), or No remotes configuredhttps://user:token@host/... or https://token@host/... is shown as <redacted>. An SSH username (ssh://git@host/...) is kept, since it names an account rather than authenticating one; a password after it is redacted. A remote-helper address (https::https://user:token@host/...) has its inner URL redacted the same way. scp-style addresses (git@host:path) and local paths are shown as configured. A line that cannot be parsed is shown as <redacted>, and if a configured remote URL (or insteadOf rewrite) contains a newline, which git itself refuses, the tool returns an error instead of a listing.The server speaks both eras of the Model Context Protocol over stdio, with nothing to configure: a 2026-07-28 client (discovered with server/discover, no session) and a 2025-11-25 client (the initialize handshake). The client's first request decides which. Tools behave the same in both.
Roots is deprecated in 2026-07-28, and this server never asks a client for Roots in either era: repository access comes from --repository alone, or, with no --repository, from each tool call's repo_path. Methods the 2026-07-28 specification removes, such as ping, are answered only on a 2025-11-25 connection.
isError: true whose text is Error executing tool <name>: <message>, so the model can read it and correct the call. This covers git errors (an unknown revision, a failed command), a repo_path that is not a repository or is outside --repository, the flag-injection guards, and arguments that do not match the tool's input schema.-32602 (Unknown tool: <name>), as the specification requires in both eras. Before 2.0.0 it was an isError result.Beside its tools, the server offers two prompts, which a client typically shows the user as slash commands. Each reads the repository when it is requested and returns one user message that embeds the changes, ready to send to the model. They open the repository the way the tools do, so --repository confines them too, and the same flag-injection guards apply. They behave the same in both protocol eras.
git_commit_message
repo_path (string, required): Path to the Git repositorygit_summarize_changes
repo_path (string, required): Path to the Git repositorytarget (string, optional): Branch or commit to diff against. Without it, the working tree's status and its staged and unstaged diffs are summarizedA prompt request that fails (a repo_path that is not a repository or is outside --repository, an unknown target, a target starting with -) is a JSON-RPC -32602 error carrying the message a tool would report, since prompts/get has no isError result.
When using uv no specific installation is needed. We will
use uvx to directly run mcp-server-git.
Alternatively you can install mcp-server-git via pip:
pip install mcp-server-git
After installation, you can run it as a script using:
python -m mcp_server_git
[!IMPORTANT] Without
--repository, the server reads and writes any Git repository the server process can reach. Each tool call names its ownrepo_path, and that holds for the tools that change a repository too (git_add,git_commit,git_reset,git_create_branch,git_checkout,git_merge).--repositoryis the only confinement the server offers: it never asks the client for Roots, in either protocol era. Set--repositorywhenever the server is used with prompts or content that are not fully trusted. It admits the whole enclosing repository, not only the directory you name, as the next paragraph describes.
--repository (-r) accepts any path inside a Git working tree. At startup the server walks up to the enclosing repository root, the way git rev-parse --show-toplevel does, so --repository . works when a shared config is launched from any subdirectory of the repository. A path inside the repository therefore allows tool calls anywhere in that repository, not only under the subdirectory given. A path that does not exist, or is not inside a Git repository, is logged as a one-line error at startup.
A tool call's repo_path must be inside that repository, and so must the directories Git then uses for it: a repository nested inside whose .git file, commondir or core.worktree points outside is refused. A linked worktree can still be the --repository, though its Git directory lives under the main repository's .git; only the worktree itself may use that directory, so a repository nested in the worktree whose .git names it, or the main repository's .git, is refused. With --repository set, the server also refuses a repository whose Git directory:
objects/info/alternates or objects/info/http-alternates with any entry), wherever they are. A clone made with --reference or --shared therefore cannot be used under --repository; git repack -a -d and then deleting objects/info/alternates makes it self-contained.objects, refs, index, HEAD or anywhere else in it) that resolves outside both the allowed repository and that Git directory. A link that stays inside is followed, and what it leads to is checked the same way. A hooks directory linked elsewhere is allowed, since no hook runs.A repository's configuration and hooks travel with it (an unpacked archive, a shared folder, a vendored tree), so the server never runs a program they name, with or without --repository. Every Git command it runs overrides, through GIT_CONFIG_COUNT, the settings that would start one:
core.fsmonitor is false, and core.hooksPath points at the null device, so no hook runs; git_commit also skips the hooks GitPython would run itself (pre-commit, commit-msg, post-commit).--no-ext-diff and --no-textconv, so diff.external, diff.<driver>.command and diff.<driver>.textconv are ignored.filter.<name>.clean, smudge, process) and merge driver (merge.<name>.driver) that the repository's own configuration defines is emptied: files are staged and checked out unfiltered, and a file a merge driver would have merged is a conflict, which git_merge aborts. Drivers from your global or system configuration, such as Git LFS's, keep working.commit.gpgSign and merge.verifySignatures are false, and git_merge passes --no-gpg-sign and --no-verify-signatures. Each branch.<name>.mergeOptions the repository's own configuration sets is emptied, since Git reads it as command-line options. submodule.recurse and merge.autoStash are false, and core.pager is cat.git_status, git_diff_unstaged and git_diff pass --ignore-submodules=dirty, because looking for changes inside a submodule runs Git under the submodule's own configuration. A submodule whose checked-out commit moved is still reported; changes inside one are not, so run the tool on the submodule's path to see them.This needs Git 2.31 or later; with an older Git every tool call fails with an error saying so, rather than run unprotected.
git_commit has no identity setting of its own. It takes the author and the committer from the same places git commit does, in this order:
GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL for the author, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL for the committer. The author and the committer are resolved separately, so set all four (usually to the same name and email).user.name and user.email from Git config: the repository's .git/config, then ~/.gitconfig, then $XDG_CONFIG_HOME/git/config (by default ~/.config/git/config), then /etc/gitconfig.Unlike git commit, the server does not refuse to commit when neither is set. It falls back to the operating-system user and host name, so a commit made in a container is recorded as something like app <app@3f2a1b9c8d7e>. A local install usually finds your own ~/.gitconfig; a Docker container has none, so give it an identity explicitly.
For a local command (uvx, python -m mcp_server_git), add an env block to the server's entry in your client configuration:
"mcpServers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "path/to/git/repo"],
"env": {
"GIT_AUTHOR_NAME": "Your Name",
"GIT_AUTHOR_EMAIL": "you@example.com",
"GIT_COMMITTER_NAME": "Your Name",
"GIT_COMMITTER_EMAIL": "you@example.com"
}
}
}
For Docker, pass the variables to docker run with -e, as the Docker examples below do. Alternatively, mount your gitconfig read-only in place of the four -e pairs. The image runs as the unprivileged app user, whose home is /home/app, so it goes at /home/app/.gitconfig:
"args": [
"run", "--rm", "-i",
"--mount", "type=bind,src=/Users/username/.gitconfig,dst=/home/app/.gitconfig,readonly",
"--mount", "type=bind,src=/Users/username,dst=/Users/username",
"mcp/git"
]
Add this to your claude_desktop_config.json:
"mcpServers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "path/to/git/repo"]
}
}
-e lines set the identity git_commit records; see Commit identityapp user, not root, and trusts every repository mounted into it (safe.directory '*'), since a bind mount rarely shows up owned by that user. On a Linux host, where a bind mount keeps the host's file ownership, add "--user", "1000:1000" (your own id -u and id -g) before mcp/git so the server can write to the repository and its commits leave files you own; with --user, mount a gitconfig at /.gitconfig rather than /home/app/.gitconfig, or use the -e lines. Docker Desktop on macOS and Windows needs neither."mcpServers": {
"git": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "GIT_AUTHOR_NAME=Your Name",
"-e", "GIT_AUTHOR_EMAIL=you@example.com",
"-e", "GIT_COMMITTER_NAME=Your Name",
"-e", "GIT_COMMITTER_EMAIL=you@example.com",
"--mount", "type=bind,src=/Users/username,dst=/Users/username",
"mcp/git"
]
}
}
"mcpServers": {
"git": {
"command": "python",
"args": ["-m", "mcp_server_git", "--repository", "path/to/git/repo"]
}
}
For quick installation, use one of the one-click install buttons below...
For manual installation, you can configure the MCP server using one of these methods:
Method 1: User Configuration (Recommended)
Add the configuration to your user-level MCP configuration file. Open the Command Palette (Ctrl + Shift + P) and run MCP: Open User Configuration. This will open your user mcp.json file where you can add the server configuration.
Method 2: Workspace Configuration
Alternatively, you can add the configuration to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.
For more details about MCP configuration in VS Code, see the official VS Code MCP documentation.
{
"servers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git"]
}
}
}
For Docker installation:
{
"mcp": {
"servers": {
"git": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--mount", "type=bind,src=${workspaceFolder},dst=/workspace",
"mcp/git"
]
}
}
}
}
Add to your Zed settings.json:
{
"context_servers": {
"mcp-server-git": {
"command": "uvx",
"args": ["mcp-server-git"]
}
}
}
{
"context_servers": {
"mcp-server-git": {
"command": "python",
"args": ["-m", "mcp_server_git"]
}
}
}
Agent ToolsAdd Custom MCPInstall button{
"command": "uvx",
"args": ["mcp-server-git", "--repository", "path/to/git/repo"]
}
You can use the MCP inspector to debug the server. For uvx installations:
npx @modelcontextprotocol/inspector uvx mcp-server-git
Or if you've installed the package in a specific directory or are developing on it:
cd path/to/servers/src/git
npx @modelcontextprotocol/inspector uv run mcp-server-git
Running tail -n 20 -f ~/Library/Logs/Claude/mcp*.log will show the logs from the server and may
help you debug any issues.
The test suite drives serve() in-process through an MCP ClientSession
(see tests/conftest.py), and tests/test_eras.py runs a Client against it
as a 2026-07-28 and as a 2025-11-25 client. From src/git:
uv run --frozen pytest # the tests
uv run --frozen pytest --cov --cov-report=term-missing --cov-report=json
The second command adds branch coverage of src/mcp_server_git, printed per
file and written to coverage.json (ignored by git). Every file must stay at
or above 90% of its lines and 90% of its branches. Code that cannot be reached
is marked # pragma: no cover # <reason> rather than lowering that bar.
There are two ways to try your changes in a client:
Run the MCP inspector to test your changes. See Debugging for run instructions.
Test using the Claude desktop app. Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"git": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "GIT_AUTHOR_NAME=Your Name",
"-e", "GIT_AUTHOR_EMAIL=you@example.com",
"-e", "GIT_COMMITTER_NAME=Your Name",
"-e", "GIT_COMMITTER_EMAIL=you@example.com",
"--mount", "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop",
"--mount", "type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro",
"--mount", "type=bind,src=/path/to/file.txt,dst=/projects/path/to/file.txt",
"mcp/git"
]
}
}
}
{
"mcpServers": {
"git": {
"command": "uv",
"args": [
"--directory",
"/<path to mcp-servers>/mcp-servers/src/git",
"run",
"mcp-server-git"
]
}
}
}
Docker build:
cd src/git
docker build -t mcp/git .
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for mcp-server-git: an MCP server for Git repository interaction from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/git)Approximate reported site interactions from 2026-10-27 through 2026-11-25 UTC; not unique visitors or installations.
GitHub API evidence checked 2026-11-13 01:11:48.118Z (UTC). Repository-level counts are shared by all components, not individual server installs. Open issues including pull requests: 15.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.