git: README should state plainly that without --repository every reachable repository is in scope

Fechada Para iniciantes
#5,225 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
1/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
84/100
Tipo de issue
Documentação
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
documentation

Direção de pesquisa

Leia src/git/README.md, especialmente a seção Configuration e a nota existente na linha 137 sobre repositórios que contêm outros repositórios. Adicione uma declaração curta e em destaque que aborde o acesso sem --repository, seu papel como única restrição, Client Roots e quando defini-lo, com um link para a nota existente. O trabalho estará concluído quando esses pontos estiverem claros no README e não houver mudança de comportamento.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

documentation server-git v2

The git server's README does not say plainly what running without --repository means for access.

Problem

Without --repository, mcp-server-git acts on whatever repo_path each tool call names, so every Git repository the server process can reach is open to every tool, including the writing ones (git_add, git_commit, git_reset, git_checkout, git_create_branch). That is the intended behavior, and --repository is the confinement the server offers and enforces.

The README only says this in passing, in the protocol-eras paragraph (src/git/README.md:107: "repository access comes from --repository alone, or, with no --repository, from each tool call's repo_path"). The configuration examples all pass --repository without saying why, and the Configuration section does not mention what leaving it out does. A reader setting the server up has no clear statement that the flag is the only boundary, and that the server never consults the client's Roots.

Related public discussion: #4550.

Expected

A short, prominent statement in the README, near the Configuration section, that:

  • without --repository, the server reads and writes any Git repository the process can reach, per call;
  • --repository is the only confinement, and the server never asks the client for Roots;
  • --repository should be set whenever the server is used with prompts or content that are not fully trusted;
  • --repository admits the whole enclosing repository, not only the subdirectory given (already described at line 137; link to it).

Documentation only; no behavior change.

Linguagem predominante
TypeScript
Estrelas
91.6k
Forks
11.9k
Merge médio
4h 14min
PRs com merge (30d)
228

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de modelcontextprotocol/servers

Todas as issues de modelcontextprotocol/servers

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.