Power your agent
Lệnh của chính nhà phát hành. Không phải endpoint của PlugMCP.
Host a copy with our keys and logs.
npx -y @cyanheads/[email protected]Claude Code không có liên kết cài đặt cho lệnh cục bộ. Sao chép lệnh bên dưới và chạy trong terminal.
MCP_LOG_LEVEL=<value> GIT_BASE_DIR=<value> claude mcp add cyanheads-git-mcp-server -- npx -y @cyanheads/git-mcp-server@2.15.3Chạy trong terminal.
{ "mcpServers": { "cyanheads-git-mcp-server": { "command": "npx", "args": [ "-y", "@cyanheads/[email protected]" ], "env": { "MCP_LOG_LEVEL": "<value>", "GIT_BASE_DIR": "<value>" } } }}claude_desktop_config.json
URL từ xa hay một lệnh trên máy của bạn? Hai cách cài đặt khác nhau thế nào
Chạy trên PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
Mở28 git operations organized into seven categories:
Works with both Bun and Node.js. Runtime is auto-detected.
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.
{
"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"
}
}
}
}
Bun users: replace "command": "npx" with "command": "bunx".
For Streamable HTTP, set MCP_TRANSPORT_TYPE=http and MCP_HTTP_PORT=3015.
Built on mcp-ts-template.
GIT_BASE_DIR restricts operations to a specific directory tree for multi-tenant sandboxing.RateLimiter service.All configuration is validated at startup in src/config/index.ts. Key environment variables:
npx @cyanheads/git-mcp-server@latest
Configure through environment variables or your MCP client config.
# Build and run
npm run rebuild
npm run start:stdio # or start:http
# Dev mode with hot reload
npm run dev:stdio # or dev:http
# Checks and tests
npm run devcheck # lint, format, typecheck
npm test
npm run build:worker # Build the worker bundle
npm run deploy:dev # Run locally with Wrangler
npm run deploy:prod # Deploy to Cloudflare
Configure output format and verbosity via MCP_RESPONSE_FORMAT and MCP_RESPONSE_VERBOSITY.
JSON format (default, optimized for LLM consumption):
{
"success": true,
"branch": "main",
"staged": ["src/index.ts", "README.md"],
"unstaged": ["package.json"],
"untracked": []
}
Markdown format (human-readable):
# Git Status: main
## Staged (2)
- src/index.ts
- README.md
## Unstaged (1)
- package.json
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).
See AGENTS.md for architecture, tool development patterns, and contribution rules.
Tests use Bun's test runner with Vitest compatibility.
bun test # Run all tests
bun test --coverage # With coverage
bun run devcheck # Lint, format, typecheck, audit
The server uses a provider-based architecture for git operations:
Issues and pull requests are welcome. Run checks before submitting:
npm run devcheck
npm test
Apache 2.0. See LICENSE.
Clone, commit, diff, branch, merge, rebase, cherry-pick, stash, tag, and manage worktrees in local git repos via MCP. STDIO or Streamable HTTP.
{ "mcpServers": { "cyanheads-git-mcp-server": { "command": "npx", "args": [ "-y", "@cyanheads/[email protected]" ], "env": { "MCP_LOG_LEVEL": "<value>", "GIT_BASE_DIR": "<value>" } } }}Công cụ
Chưa có danh sách công cụ. Máy chủ từ xa sẽ có danh sách sau lần kiểm tra tình trạng đầu tiên.
Câu hỏi thường gặp
Sao chép cấu hình stdio cho Cursor, Claude Desktop, Claude Code hoặc VS Code trên trang này. Cấu hình dùng bản cài đặt của nhà phát hành, không phải proxy của PlugMCP.
Nhà phát hành liệt kê các biến môi trường sau: MCP_LOG_LEVEL, GIT_BASE_DIR, MCP_HTTP_HOST, MCP_HTTP_PORT, MCP_HTTP_ENDPOINT_PATH, MCP_AUTH_MODE.
Git chạy cục bộ qua stdio.
Kiểm tra lần cuối: 2026-10-26. Clone, commit, diff, branch, merge, rebase, cherry-pick, stash, tag, and manage worktrees in local git repos via MCP. STDIO or Streamable HTTP.