
Git Mcp Server
io.github.cyanheadsPublished by GitHub account cyanheadsv2.15.3Updated Oct 24, 2026
Comprehensive Git MCP server enabling native git tools including clone, commit, worktree, & more.
Overview
A local Git MCP server that gives an AI assistant 28 native git tools to clone, commit, branch, merge, push, and inspect repositories.
- What you can do
- Initialize, clone, check status and clean repositories, and set or clear the session working directory for multi-repo work. Stage changes, create commits, and compare diffs. Read history and inspect objects: log, show, blame, reflog, plus a changelog analysis helper. Manage branches, checkout, merge, rebase, and cherry-pick. Configure remotes, fetch, pull, and push. Tag, stash, reset, and manage worktrees, with a wrap-up prompt for reviewing and committing a session.
- When to use it
- Useful when you want an assistant to work directly with local Git repositories: reviewing changes, writing commits, managing branches, or syncing with remotes without you running each command by hand.
- Requirements
- Runs locally via npx (Node.js 20 or newer) or bunx (Bun 1.2 or newer). Optional environment variables configure the git identity, a base directory, commit signing, logging, and HTTP transport with optional jwt or oauth authentication.
Installation
In SourceWeft
- Open Git Mcp Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@cyanheads/git-mcp-server
A Git MCP server for AI agents. STDIO & Streamable HTTP.
Tools
28 git operations organized into seven categories:
Resources
Prompts
Getting started
Runtime
Works with both Bun and Node.js. Runtime is auto-detected.
MCP client configuration
Add the following to your MCP client config (e.g., cline_mcp_settings.json). Update the environment variables to match your setup — especially the git identity fields.
Bun users: replace "command": "npx" with "command": "bunx".
For Streamable HTTP, set MCP_TRANSPORT_TYPE=http and MCP_HTTP_PORT=3015.
Features
Built on mcp-ts-template.
Security
- All file paths are validated and sanitized to prevent directory traversal.
- Optional
GIT_BASE_DIRrestricts operations to a specific directory tree for multi-tenant sandboxing. - Git commands use validated arguments via process spawning — no shell interpolation.
- JWT and OAuth support for authenticated deployments.
- Optional rate limiting via the DI-managed
RateLimiterservice. - All operations are logged with request context for auditing.
Configuration
All configuration is validated at startup in src/config/index.ts. Key environment variables:
Running the server
Via package manager (no install)
Configure through environment variables or your MCP client config.
Local development
Cloudflare Workers
Project structure
Response format
Configure output format and verbosity via MCP_RESPONSE_FORMAT and MCP_RESPONSE_VERBOSITY.
JSON format (default, optimized for LLM consumption):
Markdown format (human-readable):
The LLM always receives the complete structured data via responseFormatter — full file lists, metadata, timestamps — regardless of what the client displays. Verbosity controls how much detail is included: minimal (core fields only), standard (balanced), or full (everything).
Development guide
See AGENTS.md for architecture, tool development patterns, and contribution rules.
Testing
Tests use Bun's test runner with Vitest compatibility.
Roadmap
The server uses a provider-based architecture for git operations:
- CLI provider (current) — Full 28-tool coverage via native git CLI. Requires local git installation.
- Isomorphic git provider (planned) — Pure JS implementation for edge deployment (Cloudflare Workers, Vercel Edge, Deno Deploy). Uses isomorphic-git.
- GitHub API provider (maybe) — Cloud-native operations via GitHub REST/GraphQL APIs, no local repo required.
Contributing
Issues and pull requests are welcome. Run checks before submitting:
License
Apache 2.0. See LICENSE.
Built with the mcp-ts-template
Source: README.md at commit d34d83a
Tools
0Version history
1- v2.15.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts