-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Problem
The setupClaudeCodeSettings function hardcodes enableAllProjectMcpServers: true after merging user-provided settings, overriding any explicit false value:
// Always set enableAllProjectMcpServers to true
settings.enableAllProjectMcpServers = true;This means passing enableAllProjectMcpServers: false in the settings input has no effect:
settings: |
{
"enableAllProjectMcpServers": false
}Use Case
Our repo has a .mcp.json that configures MCP servers for local development. These use absolute local paths and require AWS credentials that aren't available in CI. When the action loads them, Claude tries to use those tools, they aren't in allowedTools, and we get permission denials on every run.
We'd like to disable project MCP servers for our PR review workflow since the reviewer only needs the GitHub MCP servers the action provides.
Suggested Fix
Respect the user's explicit setting — only default to true if the user hasn't specified a value:
if (settings.enableAllProjectMcpServers === undefined) {
settings.enableAllProjectMcpServers = true;
}