Skip to content

Allow disabling enableAllProjectMcpServers via settings input #1042

@wlicamele

Description

@wlicamele

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;

Permalink

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmcpp2Non-showstopper bug or popular feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions