feat: make --strict-mcp-config configurable via settings#788
Open
shahartaite-talon wants to merge 5 commits into
Open
feat: make --strict-mcp-config configurable via settings#788shahartaite-talon wants to merge 5 commits into
shahartaite-talon wants to merge 5 commits into
Conversation
Claude Code rejects both --strict-mcp-config and --mcp-config when an enterprise managed-settings.json is present (e.g. in corporate environments). This makes Tolaria's AI agent unusable for those users since the flags were unconditionally applied. Add a `strict_mcp_config` boolean to app settings (defaults to true, preserving current behavior). When set to false, both --mcp-config and --strict-mcp-config are omitted from the Claude invocation, allowing Claude Code to start in enterprise-managed environments. To use: add `"strict_mcp_config": false` to settings.json. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
strict_mcp_configboolean setting (defaulttrue) that controls whether--strict-mcp-configand--mcp-configflags are passed to Claude Codestrict_mcp_config: falseis set in the app settings JSON, both flags are omitted — allowing Tolaria to work in environments where Claude Code has an enterprisemanaged-settings.json(which rejects these flags)trueProblem
Organizations using Claude Code with enterprise-managed settings (
~/.claude/managed-settings.json) cannot use Tolaria's AI features because Claude Code rejects--strict-mcp-configand--mcp-configwith:Changes
src-tauri/src/settings.rs— Addedstrict_mcp_config: Option<bool>to theSettingsstructsrc-tauri/src/claude_cli.rs— Reads the setting and passes it to the invocation layersrc-tauri/src/claude_invocation.rs— Conditionally applies--strict-mcp-configand--mcp-configflags based on the setting; adds test for the disabled casedocs/ARCHITECTURE.md— Documents the configurable behaviorUsage
Add to
settings.json(macOS:~/Library/Application Support/com.tolaria.app/settings.json):{ "strict_mcp_config": false }Test plan
agent_args_omit_strict_mcp_config_when_disabledverifies both flags are absent when disabledstrict_mcp_config: true(default behavior unchanged)managed-settings.json🤖 Generated with Claude Code