코딩 에이전트가 git 상태, 커밋, 히스토리 재작성, 스택형 브랜치, worktree 관리 및 원격 저장소 푸시를 수행할 수 있도록 지원합니다.
다른 이름 craft-agent/git-tools, @craftsamo/git-tools
- 스타
- 0
- Tools
- 20
- 다운로드, 30일
- 923
- 최신 버전
- 0.4.0
- 마지막 커밋
- 2026년 11월 13일
- 라이선스
- —
git-tools MCP란?
git-tools은(는) MCP server입니다. 코딩 에이전트가 git 상태, 커밋, 히스토리 재작성, 스택형 브랜치, worktree 관리 및 원격 저장소 푸시를 수행할 수 있도록 지원합니다. 20개 도구를 제공합니다. 예: repo, commit, rebase.
프로젝트 README에서 생성된 요약
git-tools MCP server 정보
git-tools는 AI 코딩 에이전트 내부에서 버전 관리 워크플로우를 관리할 수 있게 해줍니다. 로컬 상태 검사, 커밋 관리, 히스토리 재작성, 스택형 브랜치 처리를 포함하여 저장소의 전체 라이프사이클을 다루는 특화된 도구 세트를 제공합니다. 개발자는 이 서버를 사용하여 여러 계층의 브랜치 스택을 리베이스하거나 여러 worktree를 동시에 관리하는 것과 같은 복잡한 git 작업을 자동화할 수 있습니다.
이 서버는 Claude Code, Codex, Grok Build, Antigravity와 같은 다양한 MCP host에서 사용하도록 설계되었습니다. Node.js 24 이상 버전과 로컬 git 설치가 필요합니다. repo 및 commit toolset은 기본적으로 활성화되어 있지만, 사용자는 worktree 및 push 기능을 선택적으로 사용할 수 있습니다. GitHub 원격 저장소와 상호작용할 때 서버는 사용자의 기존 인증을 사용하여 안전 검사를 수행합니다. 구현 방식이 매우 유연하여, 저장소 히스토리와 충돌을 안전하게 탐색할 수 있도록 읽기 전용 구성이 가능합니다.
활용 사례
- 1저장소 상태 및 충돌 분석에이전트가 현재 브랜치 상태, upstream 관계 및 특정 병합 충돌 마커를 검사할 수 있습니다.
- 2스택형 브랜치 워크플로우 관리에이전트가 브랜치의 계보를 읽어 계층 구조를 파악하고 전체 스택을 한 번에 리베이스할 수 있습니다.
- 3git worktree를 활용한 작업 정리사용자가 에이전트에게 서로 다른 작업을 관리하기 위해 별도의 worktree를 생성하거나 삭제하도록 지시할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
git-tools MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 git-tools MCP 설치
$ claude mcp add git-tools -- npx -y @craftsamo/git-toolsCursor에 git-tools MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"git-tools": {
"command": "npx",
"args": [
"-y",
"@craftsamo/git-tools"
]
}
}
}VS Code에 git-tools MCP 설치
.vscode/mcp.json
{
"servers": {
"git-tools": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@craftsamo/git-tools"
]
}
}
}VS Code CLI에 git-tools MCP 설치
$ code --add-mcp '{"name":"git-tools","type":"stdio","command":"npx","args":["-y","@craftsamo/git-tools"]}'Claude Desktop에 git-tools MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"git-tools": {
"command": "npx",
"args": [
"-y",
"@craftsamo/git-tools"
]
}
}
}Codex에 git-tools MCP 설치
$ codex mcp add git-tools -- npx -y @craftsamo/git-toolsCodex config.toml에 git-tools MCP 설치
~/.codex/config.toml
[mcp_servers.git-tools] command = "npx" args = ["-y", "@craftsamo/git-tools"]
Gemini CLI에 git-tools MCP 설치
$ gemini mcp add -s user git-tools npx -- -y @craftsamo/git-toolsGemini settings.json에 git-tools MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"git-tools": {
"command": "npx",
"args": [
"-y",
"@craftsamo/git-tools"
]
}
}
}git-tools MCP 도구 20
README에서 감지됨repocommitrebaseworktreepushgit_repo_readgit_commit_readgit_commit_stagegit_commit_creategit_commit_amendgit_commit_verifygit_rebase_read
| repo | — | |
| commit | — | |
| rebase | — | |
| worktree | — | |
| push | — | |
| git_repo_read | — | |
| git_commit_read | — | |
| git_commit_stage | — | |
| git_commit_create | — | |
| git_commit_amend | — | |
| git_commit_verify | — | |
| git_rebase_read | — |
도구 20개 모두 보기도구 수 줄이기
git_rebase_startgit_rebase_resumegit_rebase_splitgit_worktree_readgit_worktree_addgit_worktree_removegit_push_readgit_push_send
| git_rebase_start | — | |
| git_rebase_resume | — | |
| git_rebase_split | — | |
| git_worktree_read | — | |
| git_worktree_add | — | |
| git_worktree_remove | — | |
| git_push_read | — | |
| git_push_send | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능craft-agent/git-tools is public and reachablegithub.com/craft-agent/git-tools ↗통과
- 패키지가 이 저장소를 소스로 명시@craftsamo/git-tools names craft-agent/git-tools as sourcenpmjs.com/package/@craftsamo/git-tools ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for @craftsamo/git-toolsnpmjs.com/package/@craftsamo/git-tools/v/0.4.0#provenance ↗통과
- 오픈 소스 라이선스 (OSI)No license결함 발견
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-13github.com/craft-agent/git-tools ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from @craftsamo/git-tools통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음the package checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음20 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기git-tools
Git tools for coding agents: state, commits, rewrites and stacked branches, worktrees and pushing.
The tools cover the state of a working tree, commits, history rewrites and stacked branches, worktrees and pushing, against any git remote. Pull requests and native stacks on GitHub are github-tools'. The toolsets are listed under Tools and skills.
| Harness | Delivery | Pinned by |
|---|---|---|
| OpenCode V2 | native plugin (npm package, with skills) | the version in the package |
| OpenCode V1 | native plugin (npm package, no skills) | the version in the package |
| Claude Code | plugin: MCP server and skills | the release tag, as the ref |
| Codex | plugin: MCP server and skills | the release tag, as the ref |
| Grok Build | plugin: MCP server and skills | the release tag, as @ref |
| Antigravity | plugin: MCP server and skills | the release tag's tree URL |
| Hermes Agent | native plugin (Python, calls the command line) | the release commit, as the SHA |
| other MCP host | MCP server from npm | the version in the package |
The tools need Node.js 24 or later and git. Where
origin is on GitHub, a few safety checks also read it, authenticated as you.
docs/conventions.md describes how the tools are named
and how they behave.
Install
Install from a release, never from the default branch: a release is a tag whose
commit carries the built dist/, and the default branch does not. In the
commands below, <version> is a release's version (1.2.3) and <sha> is the
commit its tag names:
gh api repos/craft-agent/git-tools/commits/v<version> --jq .sha
OpenCode
OpenCode V2 takes the package and its options in opencode.json:
{
"plugins": [{ "package": "@craftsamo/git-tools@<version>", "options": { "read_only": false } }],
"permissions": [{ "action": "git_*", "resource": "*", "effect": "ask" }]
}
OpenCode V1 takes the package as a string, or as a pair with its options:
{
"plugin": [["@craftsamo/git-tools@<version>", { "read_only": false }]],
"permission": { "git_*": "ask" }
}
OpenCode allows any action no rule names, so the plugin's request is granted
silently unless a rule says ask. Read tools never ask, so the git_* glob
is safe.
With the worktree toolset on and the profile not read-only, the V2 plugin
also registers a worktree strategy, so OpenCode's own new worktree and removal
follow the layout and the landed rule of the worktree tools: the name OpenCode
asks for becomes the branch, and a removal git refuses for changed files offers
OpenCode's force prompt where the harness supports it, while the tools
themselves never force. After git_worktree_add or git_worktree_remove the
plugin refreshes OpenCode's worktree list, so the change shows at once.
OpenCode's built-in worktree tools are left as they are; turn them off with
permission rules. V1 has no worktree strategies.
V1 registers no skills. Unpack the package and copy its skills/* folders into
~/.config/opencode/skills/:
npm pack @craftsamo/git-tools@<version>
tar -xzf craftsamo-git-tools-<version>.tgz
mkdir -p ~/.config/opencode/skills
cp -r package/skills/* ~/.config/opencode/skills/
rm -rf package craftsamo-git-tools-<version>.tgz
Claude Code
claude plugin marketplace add craft-agent/git-tools#v<version>
claude plugin install git-tools@craft-agent
Codex
codex plugin marketplace add craft-agent/git-tools --ref v<version>
codex plugin add git-tools@craft-agent
Codex turns - into _ in server names, so it shows the tools as
mcp__git_tools__git_*. It starts the MCP server in the plugin's
install directory and passes no roots, so the server takes each call's directory
from what Codex sends with the call: its sandbox state, which the server asks
for, else the one workspace it names.
The plugin declares default_tools_approval_mode = "writes": Codex asks before
every tool not marked read-only. A user's
[plugins."<plugin>".mcp_servers.<server>] setting can only tighten it. Setting
auto there yields prompt (reads asked too), since Codex treats auto and
writes as incomparable.
Grok Build
grok plugin install craft-agent/git-tools@v<version> --trust
Grok starts the MCP server in the session's working directory.
Antigravity
Install from the tree of the release tag, never from the default branch, which
has no built dist/; Antigravity clones the tag into
~/.gemini/config/plugins/git-tools.
agy plugin install https://github.com/craft-agent/git-tools/tree/v<version>
Hermes Agent
Hermes installs a commit, not a tag, and the plugin installs disabled:
hermes plugins install craft-agent/git-tools --ref <sha>
hermes plugins enable git-tools
If a Hermes gateway is already running, restart it (hermes gateway restart) to
load the plugin.
The plugin runs the Node it found when Hermes started. If a version manager
removes that version while Hermes runs, a call looks for Node again; when it
finds none, restart Hermes from a shell where node runs.
Any other MCP host
Add the server to the host's MCP configuration. Flags go in args:
{
"mcpServers": {
"git-tools": {
"command": "npx",
"args": ["-y", "@craftsamo/git-tools@<version>", "--read-only"]
}
}
}
Tools and skills
Each toolset comes with a skill that tells an agent how to use its tools.
There is one toolset per domain; repo, commit and rebase are on by
default, worktree and push are opt-in.
A skill names its toolset under metadata in its frontmatter
(metadata: { toolset: commit }, written as a block). OpenCode V2 and Hermes
register it only when the settings register at least one of that toolset's
tools, so a profile with the toolset off, or with all its tools removed, does
not see it; a skill without a toolset is always registered. Claude Code,
Codex, Grok Build and Antigravity install the skill folder whole and pass the
settings only to the MCP server, so they list every skill whatever the
settings select. OpenCode V1 registers no skills, and its copied skills are
all listed too.
| Toolset | Covers |
|---|---|
repo |
local reads: status, history, where a change came from, conflicts |
commit |
staging, the checks before a commit, committing, amending and fixups |
rebase |
rebasing, stacked branches rebased together, and the rewrite rule |
worktree |
creating, listing and removing worktrees |
push |
pushing one or more branches, against the remote commit each one expects |
repo
One read tool, which changes nothing and reaches no remote. The git-repo
skill says when to use each method.
| Tool | Method | Reads |
|---|---|---|
git_repo_read |
status |
the branch and its upstream, how it stands against the remote default branch, files by state, an operation in progress, stashes, worktrees, the last fetch |
conflicts |
what a merge, rebase, cherry-pick or revert left: its sides, and each conflicted file's marker regions or its lockfile command | |
conventions |
recent commit subjects with their conventional types and scopes, and the commit config files and pull request template in the tree | |
origin |
the commit a change came from, by sha, blame or pickaxe, with its full message |
commit
One read tool for the checks before a commit, and four write tools. The
git-commit skill says how they fit together.
| Tool | Class | Does |
|---|---|---|
git_commit_read |
read | lint: a candidate message against the neutral rules and the repository's commitlint; secrets: credentials in the staged changes, the unstaged changes or a range; hunks: the unstaged hunks with the digest of their diff; amend: whether to correct a commit by amend, fixup or a new commit |
git_commit_stage |
idempotent change | stages the hunks of a listing, pinned by its digest |
git_commit_create |
add | commits what is staged with the checked message, or a fixup of an earlier commit |
git_commit_amend |
overwrite | replaces HEAD with the staged changes and a message, under the rule for rewriting commits |
git_commit_verify |
administrative | runs a command at each commit of the branch in a throwaway worktree |
rebase
One read tool for the stack of the checked-out branch, and three write tools.
A stack is read from ancestry, so a branch alone is a stack of one layer. The
git-rebase skill says how they fit together.
| Tool | Class | Does |
|---|---|---|
git_rebase_read |
read | stack: the layers of the branch's line, bottom to top, with their commits and fixups, how each stands to its remote branch, and whether the whole stack may be rewritten |
git_rebase_start |
overwrite | rebases every layer onto the latest default branch, or folds the fixups in place, under the rule for rewriting commits; a stop on conflicts is a paused result |
git_rebase_resume |
overwrite | continues, skips or aborts a stopped rebase |
git_rebase_split |
add | cuts the branch into lower layer branches at given commits, or adds an empty layer on top |
worktree
One read tool that lists the worktrees, and two write tools that add one where
the layout puts it and remove one without losing work. The toolset is opt-in.
The git-worktree skill says how they fit together, and the layout is under
Settings.
| Tool | Class | Does |
|---|---|---|
git_worktree_read |
read | list: every worktree of the repository from git alone: its directory, branch and commit, whether it is the main one or the caller's, locked or gone, and whether it sits where the layout puts it |
git_worktree_add |
add | adds a worktree for a branch at <root>/<repository>/<branch>: an existing branch as it is, a new one cut from from, else from origin's fetched default branch, with no upstream and no hooks on the checkout |
git_worktree_remove |
overwrite | removes a worktree, never forced: refuses changed files, commits no ref holds and an operation in progress; deletes its branch only once proven landed (ancestry, or a merged pull request on GitHub), and says why a branch stays |
push
One read tool that previews a push, and one write tool that pushes exactly
what the preview returned, leased on the remote commit each branch expects.
The toolset is opt-in. The git-push skill says how they fit together.
| Tool | Class | Does |
|---|---|---|
git_push_read |
read | preview: per branch of the line, read live from the remote, the kind of push, the commits the remote lacks and what a force drops; refusals, warnings, the secret scan and the published-text rules; and send, the arguments that push exactly this |
git_push_send |
administrative | pushes the preview's send in one atomic push with a lease per branch, after checking it again; a branch or remote that moved is stale, and nothing is pushed |
Adding a tool
- Write the spec in
src/core/<domain>/<verb>.tswithdefineTool: an ID<prefix>_<domain>_<verb>, a title and description, the Zod argument and output schemas, its toolset and write class, andexecute(args, context). A write tool also givestargets(args, context): what the call writes to, as a permission rule should name it. - Test it beside the spec (
<verb>.test.ts), calling it throughinvokeas the entry points do. A tool that runs a program is tested against a fake of that program onPATH; no test reaches a real service. - List it in
src/tools.ts. A new toolset goes intotoolsetsinsrc/project.ts(anddefaultToolsetswhen it is on by default), a setting of the package's own intooptions(andOPTIONSinproject.pywithconfig_schemainplugin.yaml), and a variable the tool reads besides the settings intotoolVariables. - Add or update the toolset's skill,
skills/<prefix>-<toolset>/SKILL.md, whose frontmatter names the toolset undermetadata. - Run
pnpm run build && pnpm run manifeststo list the tool inplugin.yamland its variables in Codex's manifest, then describe it under "Tools and skills".
docs/conventions.md has the rules each step follows.
Reads and writes
Every read tool is named <prefix>_<domain>_read. Reads can run unasked;
writes are confirmed by the harness.
| Harness | Reads without asking |
|---|---|
| OpenCode | always; the plugin asks only before a write |
| Claude Code | the rule mcp__plugin_git-tools_git-tools__*_read in permissions.allow of ~/.claude/settings.json |
| Codex | always; Codex runs tools that declare readOnlyHint unasked, as the read tools do |
| Grok Build | grok --allow 'MCPTool(git-tools__*_read)' --allow 'MCPTool(git_*_read)' (both rules; see below) |
| Antigravity | the rule mcp(git-tools_git-tools/<tool id>) in permissions.allow, one for each read tool |
| Hermes | always; the plugin asks only before a write |
Where a write is asked about, and where it is not:
- OpenCode grants any action no rule names, so a write runs unasked unless
a rule asks for it: add the
git_*rule shown under OpenCode. - Codex asks before every write because of the plugin's approval mode.
Under
codex execit refuses with "MCP tool call requires approval, but approval policy is never". - Grok Build under
grok -prefuses a write it cannot ask about, unless it is allowed beforehand. - Grok Build calls the plugin's tools through its
use_tooltool, and the agent often names a tool without its server first. Grok checks the rules against the name as given, so the server-qualified rule alone does not match that first call. The second rule matches the short name; a write still matches neither. - Antigravity asks before any MCP tool no rule allows, reads included, and
names the plugin's server
git-tools_git-tools(plugin, then server).agy -prefuses a tool it cannot ask about. - Hermes
hermes chat -qrefuses a write it cannot ask about;hermes -zand--yoloskip approval, so writes then run unasked.
git-tools MCP 질문
git-tools MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add git-tools -- npx -y @craftsamo/git-tools를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
git-tools MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
git-tools MCP는 어떤 도구를 제공하나요?
20개 도구를 제공합니다. 예: repo, commit, rebase, worktree, push.
repo toolset은 어떤 기능을 제공하나요?
repo toolset을 통해 상태 확인, 히스토리, origin 정보 및 충돌 감지를 포함한 로컬 읽기 작업을 수행할 수 있습니다.
이 서버를 읽기 전용 모드로 사용할 수 있나요?
네, MCP host에서 서버를 설정할 때 --read-only 플래그를 전달하면 됩니다.
이 도구는 GitHub pull request를 지원하나요?
아니요, pull request와 GitHub 네이티브 stack 기능은 github-tools라는 별도의 도구에서 처리합니다.