Remove pre-defined GitHub tools list and use readonly MCP server by default#1499
Closed
Remove pre-defined GitHub tools list and use readonly MCP server by default#1499
Conversation
…default Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove pre-defined list of GitHub tools and use MCP server
Remove pre-defined GitHub tools list and use readonly MCP server by default
Oct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The system previously maintained a hardcoded list of 67 GitHub MCP tools in
pkg/constants/constants.gothat were automatically added to every workflow'sallowedlist. This approach had several issues:Solution
This PR removes the hardcoded tool list and instead delegates to the GitHub MCP server's read-only mode:
When no explicit
allowedlist orread-onlysetting is provided, the compiler now automatically enables read-only mode by settingread-only: true. This results in:mcp__githubinstead of enumerating specific toolsGITHUB_READ_ONLY=1for the GitHub MCP server containerImplementation Details
Code Changes
pkg/constants/constants.go: RemovedDefaultGitHubToolsconstant (~70 lines)pkg/workflow/compiler.go: ModifiedapplyDefaultTools()to setread-only: trueby defaultpkg/workflow/claude_engine.go: Updated to use wildcardmcp__githubfor GitHub tools without explicit allowed listpkg/workflow/constants_integration_test.go: Removed obsolete test filepkg/workflow/claude_engine_tools_test.go: Updated test expectations for wildcard behaviordocs/src/content/docs/reference/tools.md: Updated documentation to reflect new behaviorBehavior Matrix
mcp__github(wildcard)GITHUB_READ_ONLY=1allowed: [list_issues, ...]read-only: truemcp__github(wildcard)GITHUB_READ_ONLY=1Benefits
Testing
Migration
This change is backward compatible. Existing workflows with explicit
allowedlists continue to work exactly as before. Only workflows relying on the implicit default behavior will see the change from specific tools to wildcard access, but functionally they get access to the same (or more) read-only tools.Users who want to discover available read-only tools can use:
Fixes the issue described in the problem statement.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.