Git MCP Server
@cyanheads
Git MCP Server について
A Git MCP server for AI agents. STDIO & Streamable HTTP.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"git-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"@cyanheads/git-mcp-server@latest"
],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"GIT_BASE_DIR": "~/Developer/",
"LOGS_DIR": "~/Developer/logs/git-mcp-server/",
"GIT_USERNAME": "cyanheads",
"GIT_EMAIL": "[email protected]",
"GIT_SIGN_COMMITS": "true"
}
}
}
}ツール
1`git_changelog_analyze`
概要
What is Git MCP Server?
Git MCP Server is a Model Context Protocol server that exposes 28 git operations, one resource, and one prompt to AI agents. It integrates with the MCP ecosystem via STDIO or Streamable HTTP transports and is intended for developers building AI assistants that need programmatic git access.
How to use Git MCP Server?
Install globally with npx or bunx, then configure your MCP client with the server definition, setting environment variables for transport type, git identity, and optional directory restrictions. For Streamable HTTP, set MCP_TRANSPORT_TYPE=http and MCP_HTTP_PORT=3015.
Key features of Git MCP Server
- 28 tools across 7 categories: repository, staging, history, analysis, branching, remotes, and advanced workflows
- One resource exposing the current working directory
- One prompt for session wrap-up with changelog and tagging
- Runs on Node.js ≥20.0.0 or Bun ≥1.2.0 (auto-detected)
- Configurable authentication: none, JWT, or OAuth
- Pluggable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2
Use cases of Git MCP Server
- An AI agent initializes a new repository and performs the first commit
- An agent clones a remote repo, inspects recent log entries, and runs blame analysis
- A multi-repo workflow where the agent switches between working directories using
git_set_working_dir - Automated changelog generation by gathering git context for LLM analysis
- Safe destructive operations (
git clean,git reset --hard) after explicit confirmation
FAQ from Git MCP Server
What transport types does Git MCP Server support?
It supports STDIO (default) and Streamable HTTP. The transport type is set via the MCP_TRANSPORT_TYPE environment variable.
What are the runtime requirements?
The server works with Node.js (version ≥20.0.0) or Bun (version ≥1.2.0). Runtime is auto-detected at startup.
How do I configure the git identity used by the server?
Set the GIT_USERNAME and GIT_EMAIL environment variables. If not provided, the server falls back to the global git configuration.
Is commit signing supported?
Yes, GPG/SSH signing is enabled by default for commits, merges, rebases, cherry-picks, and tags. If signing fails, the operation proceeds unsigned and includes a signed/signingWarning field in the response.
What security measures are in place?
All file paths are validated and sanitized to prevent directory traversal. An optional GIT_BASE_DIR restricts operations to a specific directory tree. Git commands use validated arguments via process spawning with no shell interpolation. JWT and OAuth support is available for authenticated deployments, and optional rate limiting can be enabled.
「バージョン管理」の他のコンテンツ
Linear MCP Server
jerhadfA server that integrates Linear's project management system with the Model Context Protocol (MCP) to allow LLMs to interact with Linear.
AIO-MCP Server
athapong🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from https://github.com/nguyenvanduocit/all-in-one-model-context-protocol
Jira MCP
nguyenvanduocitA Go-based MCP (Model Control Protocol) connector for Jira that enables AI assistants like Claude to interact with Atlassian Jira. This tool provides a seamless interface for AI models to perform common Jira operations including issue management, sprint planning, and workflow tra
MCP Linear
tacticlaunchMCP server that enables AI assistants to interact with Linear project management system through natural language, allowing users to retrieve, create, and update issues, projects, and teams.
Atlassian Bitbucket MCP Server
aashariNode.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.
コメント