Feature: per-toolset (or per-tool) read-only mode instead of global GITHUB_READ_ONLY
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- github, go
调研方向
首先跟踪服务器如何处理 GITHUB_READ_ONLY 和现有的 GITHUB_TOOLSETS 配置,然后确定写入工具在哪里进行分发。将按 toolset 和按 tool 提出的 scope 与当前配置行为进行比较。完成的标准是:选定的写入操作会被拒绝,同时读取操作和明确允许的写入操作继续正常工作,并且为所选配置提供覆盖。
由索引模型根据 Issue 内容生成。
描述
Feature request
GITHUB_READ_ONLY is currently all-or-nothing: when set, the whole server rejects every write operation. There is no way to keep some domains writable while others stay read-only.
Use case
Running the server as a local coding-agent tool with a single GitHub token, I want a common "safe by default" posture:
- Reads everywhere (repos, issues, pull requests) allowed without human confirmation
- Writes (merge PR, close/label issues, push comments) gated behind explicit user approval
Today the only way to approximate this is to launch two full server instances — one with GITHUB_READ_ONLY=1 and one without — and rely on agent-side conventions to route writes to the second instance. That is fragile because nothing on the server side prevents an agent from calling write tools on the writable instance, and it doubles the tool surface / process count.
Proposed solution
Any of the following would fix it:
- Per-toolset read-only, e.g.
GITHUB_READ_ONLY_TOOLSETS=issues,pull_requests(writes rejected only for the listed toolsets), or - Per-tool read-only overrides, e.g. a
GITHUB_READ_ONLY_TOOLS=merge_pull_request,create_issuedeny list, or - A "write-confirm" layer that rejects write tools unless an opt-in env var for that specific call is present.
Option 1 seems the most consistent with the existing GITHUB_TOOLSETS design.
Alternatives considered
- Token scoping (fine-grained PAT without write scopes): does not help, because the same token is also expected to perform approved writes.
- Dual-instance setup: works only as a convention, not enforcement (described above).
- 主要语言
- Go
- 星标
- 33.1k
- 派生
- 5k
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 27
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/github-mcp-server 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
github/github-mcp-server#3235 ·
-
enhancement
难度 1/5 1 小时以内 新手友好度 88/100
github/github-mcp-server#3042 · 2 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
github/github-mcp-server#3032 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 74/100
github/github-mcp-server#2803 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
github/github-mcp-server#2740 ·
查看 github/github-mcp-server 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/registry#1654 ·
-
Type/Bug
难度 2/5 1-3 小时 新手友好度 78/100
OpenNSW/nsw-srilanka#497 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
milvus-io/birdwatcher#545 ·
-
kind/bug
难度 2/5 1-3 小时 新手友好度 88/100
kubernetes-sigs/prow#953 · 1 条评论 ·