Secure Git MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SECURE_GIT_POLICY | Yes | JSON object with exactly one key, "deny", containing regex strings. Matching uses case-sensitive regex search against normalized POSIX repository-relative paths. Example: {"deny":["^private(/|$)","^modules/payments(/|$)"]}. Missing or malformed policy prevents startup; use {"deny":[]} to allow ordinary paths while retaining metadata/path-safety restrictions. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| git_diff_revisionsB | Compare two committed trees, filtering complete changes by permitted literal paths. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_blameC | Blame permitted committed lines; protected historical provenance is omitted and mixed metadata withheld. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_grepB | Search permitted tracked working files or a commit; literal patterns by default. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_ls_filesB | List selected permitted regular files in the index or a commit. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_statusA | Show permitted working tree status. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_diff_unstagedB | Show permitted unstaged file patches. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_diff_stagedB | Show permitted staged file patches. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_diffC | Compare worktree with a commit, omitting protected file patches. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_showB | Show a commit or commit:path; raw blobs/trees are forbidden. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_logC | Show history visible under the path policy. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_branchB | List branch names (not secret-scanned). Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_addA | Stage literal files/directories; reject the entire selection if restricted. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_commitC | Commit only when the complete staged set is permitted. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_restoreB | Destructively restore explicit permitted regular files; directory selectors and ambiguous transitions are refused. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_unstageB | Unstage a permitted literal selection without changing working files or unrelated index entries. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_resetC | Unstage only when the complete staged set is permitted. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_create_branchB | Create a branch without changing working files. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
| git_checkoutB | Checkout only if no protected paths or submodules change. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
Most tools map to clearly distinct git operations, and the four diff variants are separated by explicit language (worktree vs. commit, staged vs. unstaged, two committed trees). The main weak spot is git_unstage vs git_reset, which both describe unstaging a permitted staged set, and git_restore vs git_checkout could be confused by an agent reasoning about destructive state changes.
Every tool uses the same git_<snake_case_operation> pattern, with verbs matching the underlying git subcommand. No mixed conventions or stray casings.
18 tools is on the heavier side, but each corresponds to a real, separate git operation rather than an artificial split. The only near-redundancy is the unstage/reset pair and the four-way diff split, which keeps it just under a full 5.
The read/inspect surface (status, log, show, diff family, blame, grep, ls-files, branch) and the staging-to-commit lifecycle (add, unstage, reset, restore, commit) are well covered. Gaps exist around merge/rebase, branch delete/rename, tags, stash, and any remote push/pull, though a deliberately local, policy-restricted server may exclude these by design.