Skip to content

Commit 9939c1e

Browse files
cliffhallclaude
andcommitted
docs(git): state that without --repository every reachable repository is in scope
The Configuration section now opens with a note: with no --repository the server reads and writes any Git repository its process can reach, per call, the write tools included; --repository is the only confinement and the server never asks the client for Roots; set it whenever prompts or content are not fully trusted; and it admits the whole enclosing repository, as the existing paragraph describes. Documentation only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 8520fb2 commit 9939c1e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/git/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ python -m mcp_server_git
134134

135135
## Configuration
136136

137+
> [!IMPORTANT]
138+
> **Without `--repository`, the server reads and writes any Git repository the server process can reach.** Each tool call names its own `repo_path`, and that holds for the tools that change a repository too (`git_add`, `git_commit`, `git_reset`, `git_create_branch`, `git_checkout`). `--repository` is the only confinement the server offers: it never asks the client for Roots, in either protocol era. Set `--repository` whenever the server is used with prompts or content that are not fully trusted. It admits the whole enclosing repository, not only the directory you name, as the next paragraph describes.
139+
137140
`--repository` (`-r`) accepts any path inside a Git working tree. At startup the server walks up to the enclosing repository root, the way `git rev-parse --show-toplevel` does, so `--repository .` works when a shared config is launched from any subdirectory of the repository. A path inside the repository therefore allows tool calls anywhere in that repository, not only under the subdirectory given. A path that does not exist, or is not inside a Git repository, is logged as a one-line error at startup.
138141

139142
### Usage with Claude Desktop

0 commit comments

Comments
 (0)