MCP server
Git MCP server
The MCP project's Git reference server lets AI read history and diffs and stage, commit and switch branches in a local repository.
- Official server
- Developer tools
At a glance
- Maintained by
- Model Context Protocol project (Anthropic reference servers)
- Tools exposed
- 10 listed below
- Reviewed
- September 24, 2026
Why it matters
What it does and why it matters
The Git server works on a repository on your own machine, without any hosting service. An assistant can check status, read staged and unstaged diffs, read the log, show a commit and, when asked, stage files, commit, create branches and switch between them.
It is useful for writing clear commit messages from real diffs, understanding what changed between two points and keeping a coding assistant aware of the working state.
This is a reference server from the Model Context Protocol project. Reference servers show how the protocol works and are useful for learning and prototypes. Check the project notes before relying on one in production. It can change the local repository, including commits and branch switches, so keep it pointed at the repository you are working in and review commits before pushing.
Use cases
Best business use cases
Commit messages
History questions
Diff reviews
Branch work
Learning Git
Tools
Available tools
Tool names as published by the maintainer at review time. Versions change, so check the repository for the current list.
Read and write: Read and write: reads history and diffs, and can stage, commit, reset and switch branches in a local repo.
-
git_statusShow the working tree status.
-
git_diff_unstagedShow changes not yet staged.
-
git_diff_stagedShow changes staged for commit.
-
git_diffShow differences between branches or commits.
-
git_commitRecord changes to the repository.
-
git_addAdd file contents to the staging area.
-
git_logShow commit logs with optional date filters.
-
git_create_branchCreate a new branch.
-
git_checkoutSwitch branches.
-
git_showShow the contents of a commit.
Workflows
Example workflows
Commit with a clear message
-
1
Finish a change.
-
2
Ask the assistant to read the staged diff.
-
3
It drafts a commit message.
-
4
You edit and approve it.
-
5
It commits.
Understand a file's history
-
1
Ask about a file.
-
2
The assistant reads the log for it.
-
3
It shows key commits.
-
4
It explains how the file evolved.
-
5
You find the change you were looking for.
Prompts
Example prompts
“Read my staged changes and write a commit message.”
“What changed in src/billing.php over the last ten commits?”
“Create a branch called fix/invoice-rounding and switch to it.”
Setup
Installation and configuration
Examples for Claude Desktop and Claude Code. Replace the placeholder values with your own keys, and store secrets outside version control.
Claude Desktop: claude_desktop_config.json
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"path/to/git/repo"
]
}
}
}
Claude Code: terminal
claude mcp add git -- uvx mcp-server-git --repository path/to/git/repo
- Local server: stdio; mcp-server-git; uvx mcp-server-git; mcp/git.
Security
Security considerations
-
One repository
Point it at a single repository.
-
Review commits
Check commits before pushing.
-
Reference server
Treat it as a reference implementation.
-
No secrets in commits
Watch for secrets before committing.
Related servers
Servers that pair well with it
GitHub
GitHub's official MCP server lets AI read repositories, search code, manage issues and pull requests and, when allowed, change files.
Filesystem
The MCP project's Filesystem reference server lets AI read, write, edit, move and search files, only inside folders you allow.
GitLab
GitLab's built-in MCP server lets AI read projects, code, merge requests and pipelines and create commits and work items. In beta.
Keep exploring
Solutions and services that use it
Related services
View all related services- MCP integration Connect AI assistants to your CRM, files, databases and tools through Model Context Protocol servers, with safe permissions.
- AI copilots AI helpers built into your product or internal tools that draft, summarize and suggest while people decide.
- Automation and Integrations CRM, payment and API integrations, MCP connections and workflows that stop people copying data by hand.
- MVP development A first version with just enough features to put in front of real users and learn what to build next.
- API integration Make two systems share data reliably, with retries, logging and alerts when something goes wrong.
- Legacy modernization Replace an aging system step by step, with the business running normally while the new parts take over.
Solutions
View all solutions- Internal help desk assistant An assistant in Slack or Teams that answers policy and how-to questions from your handbooks and opens tickets when needed.
- Approval workflows Requests, approvals and reminders in one place, with clear owners and deadlines instead of long email threads.
- Automated quoting Draft accurate quotes and proposals from a request, your price rules and past work, for a person to approve.
Industries
View all industriesGuides and articles
View all guides and articles- Where AI helps in development, and where it does not An honest map of the development tasks AI speeds up and the ones that still need experienced people.
- What is AI-accelerated development? How software teams use AI to plan, code, test and document faster, and where people still make every decision.
- How to build an AI workflow with MCP servers Plan, connect and test an AI workflow that uses MCP servers, from a single task to a reliable process.
AI models
View all ai models- Mistral Medium 3.5 A newer open-weight Mistral model for agent and coding work, with image input, tool calling, structured outputs and a 256K window.
- Codestral 25.08 Mistral's low-latency coding model for code completion and generation, with fill-in-the-middle support, tool calling and a 128K window.
- Qwen3-Coder Qwen's open-weight coding models under Apache 2.0, from the efficient Qwen3-Coder-Next to the large 480B model, with tool use and long context.
- Coding Models that write, review and explain code, and power coding assistants and developer tools.
- GPT-6 Sol The middle model of the GPT-6 family, positioned for complex coding and agentic workflows at a mid price level.
Glossary terms
View all glossary terms- AI copilot An AI copilot is an assistant built into a tool people already use, which suggests, drafts and explains while the person stays in control.
- API integration An API integration connects two or more systems through their APIs so data and actions flow between them automatically.
- Claude Code Claude Code is Anthropic's agentic coding tool, which works in a developer's terminal, IDE, desktop app or browser to read code, run commands and make changes.
- Business process automation Business process automation uses software to run a multi-step business process, such as approvals or onboarding, from start to finish with less manual work.
- Model Context Protocol The Model Context Protocol, or MCP, is an open standard for connecting AI assistants to external tools and data in a consistent way.
- No-code No-code tools let people build apps, websites and automations with visual editors instead of writing code.
FAQ
Questions people ask us
Have a question that is not here? Ask us directly.
It is a reference server from the MCP project.
It works on the local repository. Pushing is done separately.
Yes. It can stage, commit, reset and switch branches.