git
Git operations scoped to a single repository. Internally shells out to the git binary (which must be on PATH), so behavior matches whatever git is installed.
Usage
bash
native-mcp git [--read-only] REPO_PATHREPO_PATH must be (or be inside) a git working tree. The server validates this on startup with git rev-parse --show-toplevel.
Flags
| Flag | Default | Description |
|---|---|---|
--read-only | off | Hide the add and commit tools. The other tools never modify state. |
Tools
status
git status --short --branch. No arguments.
log
| Field | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max commits to return (default 20, capped at 1000). |
author | string | no | --author=PATTERN filter. |
since | string | no | --since=DATE filter (e.g. '2 weeks ago'). |
diff
| Field | Type | Required | Description |
|---|---|---|---|
staged | bool | no | If true, show the index vs HEAD; otherwise unstaged changes. |
file | string | no | Restrict to one path. |
show
| Field | Type | Required | Description |
|---|---|---|---|
ref | string | no | Commit-ish (default HEAD). |
Runs git show --stat REF.
branch
| Field | Type | Required | Description |
|---|---|---|---|
all | bool | no | If true, include remote-tracking branches (-a). |
add (disabled in --read-only)
| Field | Type | Required | Description |
|---|---|---|---|
paths | array<string> | yes | Paths to stage, relative to the repo root. |
commit (disabled in --read-only)
| Field | Type | Required | Description |
|---|---|---|---|
message | string | yes | Commit message. |
all | bool | no | If true, also stage tracked changes (-a). |
Register in Claude Code
bash
# Read-only browsing of one repo
claude mcp add native-git-ro native-mcp git --read-only /home/you/project
# Full access for an autonomous agent in a sandbox repo
claude mcp add native-git-sandbox native-mcp git /tmp/agent-workspace